diff options
| author | Alexandre Teoi <ateoi@users.noreply.github.com> | 2025-04-26 17:02:15 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-26 13:02:15 -0700 |
| commit | ee7866cc04e1cf2ae0f94cf5570c5311b0f45c2a (patch) | |
| tree | c8ad6df632645494b0e97cf25efe916c7b23f24f /lsp/efm.lua | |
| parent | docs: update configs.md (diff) | |
| download | nvim-lspconfig-ee7866cc04e1cf2ae0f94cf5570c5311b0f45c2a.tar nvim-lspconfig-ee7866cc04e1cf2ae0f94cf5570c5311b0f45c2a.tar.gz nvim-lspconfig-ee7866cc04e1cf2ae0f94cf5570c5311b0f45c2a.tar.bz2 nvim-lspconfig-ee7866cc04e1cf2ae0f94cf5570c5311b0f45c2a.tar.lz nvim-lspconfig-ee7866cc04e1cf2ae0f94cf5570c5311b0f45c2a.tar.xz nvim-lspconfig-ee7866cc04e1cf2ae0f94cf5570c5311b0f45c2a.tar.zst nvim-lspconfig-ee7866cc04e1cf2ae0f94cf5570c5311b0f45c2a.zip | |
feat(efm): add vim.lsp.config support #3786
Diffstat (limited to 'lsp/efm.lua')
| -rw-r--r-- | lsp/efm.lua | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/lsp/efm.lua b/lsp/efm.lua new file mode 100644 index 00000000..4515dafd --- /dev/null +++ b/lsp/efm.lua @@ -0,0 +1,24 @@ +--- @brief +--- +--- https://github.com/mattn/efm-langserver +--- +--- General purpose Language Server that can use specified error message format generated from specified command. +--- +--- Requires at minimum EFM version [v0.0.38](https://github.com/mattn/efm-langserver/releases/tag/v0.0.38) to support +--- launching the language server on single files. +--- +--- Note: In order for neovim's built-in language server client to send the appropriate `languageId` to EFM, **you must +--- specify `filetypes` in your call to `vim.lsp.config`**. Otherwise the server will be launch on the `BufEnter` instead +--- of the `FileType` autocommand, and the `filetype` variable used to populate the `languageId` will not yet be set. +--- +--- ```lua +--- vim.lsp.config('efm', { +--- filetypes = { 'python','cpp','lua' } +--- settings = ..., -- You must populate this according to the EFM readme +--- }) +--- ``` + +return { + cmd = { 'efm-langserver' }, + root_markers = { '.git' }, +} |
