diff options
| author | Andrés Martínez <37532652+amg98@users.noreply.github.com> | 2024-09-14 09:52:17 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-09-14 15:52:17 +0800 |
| commit | 170c9647612a4ad85373f1f70a03d4b79dbc0241 (patch) | |
| tree | be7e57b47f19bde23ede02318fddce17e8a07eb1 /lua | |
| parent | docs: update server_configurations.md (diff) | |
| download | nvim-lspconfig-170c9647612a4ad85373f1f70a03d4b79dbc0241.tar nvim-lspconfig-170c9647612a4ad85373f1f70a03d4b79dbc0241.tar.gz nvim-lspconfig-170c9647612a4ad85373f1f70a03d4b79dbc0241.tar.bz2 nvim-lspconfig-170c9647612a4ad85373f1f70a03d4b79dbc0241.tar.lz nvim-lspconfig-170c9647612a4ad85373f1f70a03d4b79dbc0241.tar.xz nvim-lspconfig-170c9647612a4ad85373f1f70a03d4b79dbc0241.tar.zst nvim-lspconfig-170c9647612a4ad85373f1f70a03d4b79dbc0241.zip | |
fix: sourcekit lsp filetypes (#3301)
* fix: sourcekit lsp filetypes
Co-authored-by: glepnir <glephunter@gmail.com>
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/lspconfig/server_configurations/sourcekit.lua | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lua/lspconfig/server_configurations/sourcekit.lua b/lua/lspconfig/server_configurations/sourcekit.lua index a906f083..9bb0e3e1 100644 --- a/lua/lspconfig/server_configurations/sourcekit.lua +++ b/lua/lspconfig/server_configurations/sourcekit.lua @@ -3,7 +3,7 @@ local util = require 'lspconfig.util' return { default_config = { cmd = { 'sourcekit-lsp' }, - filetypes = { 'swift', 'c', 'cpp', 'objective-c', 'objective-cpp' }, + filetypes = { 'swift', 'objc', 'objcpp', 'c', 'cpp' }, root_dir = function(filename, _) return util.root_pattern 'buildServer.json'(filename) or util.root_pattern('*.xcodeproj', '*.xcworkspace')(filename) @@ -11,6 +11,10 @@ return { or util.root_pattern('compile_commands.json', 'Package.swift')(filename) or util.find_git_ancestor(filename) end, + get_language_id = function(_, ftype) + local t = { objc = 'objective-c', objcpp = 'objective-cpp' } + return t[ftype] or ftype + end, }, docs = { description = [[ |
