diff options
| author | 27Onion Nebell <57032603+onion108@users.noreply.github.com> | 2026-01-30 05:30:15 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-01-29 16:30:15 -0500 |
| commit | 4dca148b3204e5b9aa24b72f8e2d64551e09a2be (patch) | |
| tree | 31bde4bd933473408117bcc8701162af0e657ea3 | |
| parent | docs: update configs.md (diff) | |
| download | nvim-lspconfig-4dca148b3204e5b9aa24b72f8e2d64551e09a2be.tar nvim-lspconfig-4dca148b3204e5b9aa24b72f8e2d64551e09a2be.tar.gz nvim-lspconfig-4dca148b3204e5b9aa24b72f8e2d64551e09a2be.tar.bz2 nvim-lspconfig-4dca148b3204e5b9aa24b72f8e2d64551e09a2be.tar.lz nvim-lspconfig-4dca148b3204e5b9aa24b72f8e2d64551e09a2be.tar.xz nvim-lspconfig-4dca148b3204e5b9aa24b72f8e2d64551e09a2be.tar.zst nvim-lspconfig-4dca148b3204e5b9aa24b72f8e2d64551e09a2be.zip | |
fix(csharp_ls): use the correct language id #4298
In [recent commit](https://github.com/razzmatazz/csharp-language-server/commit/f51cd9dec8b10b7fd8f475dac3a904e1da2c7217),
`csharp-language-server` started checking the language id due to the
support of Razor documents. Since vim's file type for C# is `cs` so all
things like hover documentation, go-to-definition etc. stopped working
after this commit when using the default config. This PR fixes that by
adding `get_language_id` to `csharp_ls.lua`.
| -rw-r--r-- | lsp/csharp_ls.lua | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lsp/csharp_ls.lua b/lsp/csharp_ls.lua index dd8c427a..e284090b 100644 --- a/lsp/csharp_ls.lua +++ b/lsp/csharp_ls.lua @@ -29,4 +29,10 @@ return { init_options = { AutomaticWorkspaceInit = true, }, + get_language_id = function(_, ft) + if ft == 'cs' then + return 'csharp' + end + return ft + end, } |
