aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmitayas Banerjee <86668810+amitayas@users.noreply.github.com>2026-02-24 02:40:07 +0530
committerGitHub <noreply@github.com>2026-02-23 16:10:07 -0500
commitcfc12beefe39cdcb77ff81fa49e71cc42cdf4fbc (patch)
treee25bb94764e7dd5f0d5ad3d00ec055bc4bf93be0
parentdocs: update configs.md (diff)
downloadnvim-lspconfig-cfc12beefe39cdcb77ff81fa49e71cc42cdf4fbc.tar
nvim-lspconfig-cfc12beefe39cdcb77ff81fa49e71cc42cdf4fbc.tar.gz
nvim-lspconfig-cfc12beefe39cdcb77ff81fa49e71cc42cdf4fbc.tar.bz2
nvim-lspconfig-cfc12beefe39cdcb77ff81fa49e71cc42cdf4fbc.tar.lz
nvim-lspconfig-cfc12beefe39cdcb77ff81fa49e71cc42cdf4fbc.tar.xz
nvim-lspconfig-cfc12beefe39cdcb77ff81fa49e71cc42cdf4fbc.tar.zst
nvim-lspconfig-cfc12beefe39cdcb77ff81fa49e71cc42cdf4fbc.zip
fix(clangd): languageIds for objc, cuda #4322
Problem: clangd currently receives incorrect languageId values for objc, objcpp and cuda. Solution: Update the filetype to languageId mapping to send the values expected by the language server. ref https://code.visualstudio.com/docs/languages/identifiers
-rw-r--r--lsp/clangd.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/lsp/clangd.lua b/lsp/clangd.lua
index 07ad3470..c1abda42 100644
--- a/lsp/clangd.lua
+++ b/lsp/clangd.lua
@@ -74,6 +74,10 @@ return {
'configure.ac', -- AutoTools
'.git',
},
+ get_language_id = function(_, ftype)
+ local t = { objc = 'objective-c', objcpp = 'objective-cpp', cuda = 'cuda-cpp' }
+ return t[ftype] or ftype
+ end,
capabilities = {
textDocument = {
completion = {