Diary and most lsp only available on ccflow, added hostname guard condition
This commit is contained in:
78
lua/lsp.lua
78
lua/lsp.lua
@@ -66,46 +66,52 @@ function LSPRangeFormatFunction()
|
||||
})
|
||||
end
|
||||
|
||||
|
||||
-- VUE and Typescript as of vue-language-server 3.0.x
|
||||
-- taken from:
|
||||
-- https://github.com/neovim/nvim-lspconfig/blob/master/doc/configs.md#vtsls
|
||||
local vue_language_server_path = '/home/saschal/.config/yarn/global/node_modules'
|
||||
local vue_plugin = {
|
||||
name = '@vue/typescript-plugin',
|
||||
location = vue_language_server_path,
|
||||
languages = { 'vue' },
|
||||
configNamespace = 'typescript',
|
||||
}
|
||||
local vtsls_config = {
|
||||
settings = {
|
||||
vtsls = {
|
||||
tsserver = {
|
||||
globalPlugins = {
|
||||
vue_plugin,
|
||||
local enable_this_lsp = {}
|
||||
if vim.loop.os_gethostname() == 'ccflow' then
|
||||
-- VUE and Typescript as of vue-language-server 3.0.x
|
||||
-- taken from:
|
||||
-- https://github.com/neovim/nvim-lspconfig/blob/master/doc/configs.md#vtsls
|
||||
local vue_language_server_path = '/home/saschal/.config/yarn/global/node_modules'
|
||||
local vue_plugin = {
|
||||
name = '@vue/typescript-plugin',
|
||||
location = vue_language_server_path,
|
||||
languages = { 'vue' },
|
||||
configNamespace = 'typescript',
|
||||
}
|
||||
local vtsls_config = {
|
||||
settings = {
|
||||
vtsls = {
|
||||
tsserver = {
|
||||
globalPlugins = {
|
||||
vue_plugin,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
filetypes = { 'typescript', 'javascript', 'javascriptreact', 'typescriptreact', 'vue' },
|
||||
}
|
||||
vim.lsp.config('vtsls', vtsls_config)
|
||||
filetypes = { 'typescript', 'javascript', 'javascriptreact', 'typescriptreact', 'vue' },
|
||||
}
|
||||
vim.lsp.config('vtsls', vtsls_config)
|
||||
|
||||
-- enable this list of lsps
|
||||
local enable_this_lsp = {
|
||||
'vue_ls',
|
||||
'vtsls',
|
||||
'gopls',
|
||||
'bashls',
|
||||
'html',
|
||||
'lua_ls',
|
||||
'jsonls', -- arch extra: vscode-json-languageserver
|
||||
'kotlin_lsp', -- arch aur: kotlin-lsp-bin
|
||||
'lemminx', -- arch aur: lemminx
|
||||
'clangd',
|
||||
'basedpyright',
|
||||
'wgsl_analyzer',
|
||||
}
|
||||
-- enable this list of lsps
|
||||
enable_this_lsp = {
|
||||
'vue_ls',
|
||||
'vtsls',
|
||||
'gopls',
|
||||
'bashls',
|
||||
'html',
|
||||
'lua_ls',
|
||||
'jsonls', -- arch extra: vscode-json-languageserver
|
||||
'kotlin_lsp', -- arch aur: kotlin-lsp-bin
|
||||
'lemminx', -- arch aur: lemminx
|
||||
'clangd',
|
||||
'basedpyright',
|
||||
'wgsl_analyzer',
|
||||
}
|
||||
else
|
||||
-- any lsp which should be enabled in all situations
|
||||
enable_this_lsp = {
|
||||
}
|
||||
end
|
||||
|
||||
for l in pairs(enable_this_lsp) do
|
||||
vim.lsp.enable(enable_this_lsp[l])
|
||||
|
||||
Reference in New Issue
Block a user