nvim-lspconfig icon indicating copy to clipboard operation
nvim-lspconfig copied to clipboard

Add explanation and use cases to readme

Open DonjiKong opened this issue 3 years ago • 2 comments

Language server

No response

Requested feature

I have no idea what the thing does or why I should use it.

Other clients which have this feature

No response

DonjiKong avatar Jul 28 '22 04:07 DonjiKong

First line of the readme says:

Configs for the Nvim LSP client (:help lsp).

We can expand on it:

nvim-lspconfig is a collection of configurations for use with the Nvim builtin LSP client, to save you the trouble of manually creating such configurations. For example to use Nvim LSP with a typescript project, you would need to

  1. install the typescript language server
  2. in your init.lua (or init.vim) configure it like this: https://github.com/neovim/nvim-lspconfig/blob/80fddd28de5fe0642da7adee955f5762b933e730/lua/lspconfig/server_configurations/tsserver.lua#L3-L26

With nvim-lspconfig, you only need to:

  1. install the typescript language server
  2. in your init.lua (or init.vim) call require'lspconfig'.tsserver.setup{}

Is that clear?

justinmk avatar Aug 01 '22 13:08 justinmk

Need to add the above changes to the readme before closing this.

justinmk avatar Aug 23 '22 12:08 justinmk

closed because Readme has been updated.

glepnir avatar May 08 '23 12:05 glepnir