Skip to content

Commit

Permalink
nvim: configure sourcekit-lsp
Browse files Browse the repository at this point in the history
Need to work around a bug in  nvim-lspconfig:
  neovim/nvim-lspconfig#3264
  • Loading branch information
gicmo committed Aug 18, 2024
1 parent 1f57401 commit d73ece3
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions nvim/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,23 @@ require("lazy").setup({
capabilities = capabilities,
}
end

lspconfig.sourcekit.setup {
filetypes = { 'swift', 'c', 'cpp', 'objective-c', 'objc', 'objective-cpp' },
on_init = function(client, initialization_result)
if client.server_capabilities then
client.server_capabilities.semanticTokensProvider = nil
end
end,
get_language_id = function(_, ftype)
if ftype == "objc" then
return "objective-c"
elseif ftype == "objcpp" then
return "objective-cpp"
end
return ftype
end,
}
end
},

Expand Down

0 comments on commit d73ece3

Please sign in to comment.