forked from pub-solar/os
Merge pull request 'Add denols to nvim' (#88) from feature/denols into main
Reviewed-on: https://git.b12f.io/pub-solar/os/pulls/88
This commit is contained in:
commit
9375fc4aae
|
@ -79,6 +79,8 @@ lua <<EOF
|
||||||
-- vscode HTML lsp needs this https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#html
|
-- vscode HTML lsp needs this https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#html
|
||||||
capabilities.textDocument.completion.completionItem.snippetSupport = true
|
capabilities.textDocument.completion.completionItem.snippetSupport = true
|
||||||
|
|
||||||
|
local use_denols_for_typescript = not(os.getenv('NVIM_USE_DENOLS') == nil)
|
||||||
|
|
||||||
for lsp_key, lsp_settings in pairs({
|
for lsp_key, lsp_settings in pairs({
|
||||||
'bashls', ------------------------------- Bash
|
'bashls', ------------------------------- Bash
|
||||||
'ccls', --------------------------------- C / C++ / Objective-C
|
'ccls', --------------------------------- C / C++ / Objective-C
|
||||||
|
@ -120,7 +122,13 @@ lua <<EOF
|
||||||
['terraformls'] = { --------------------- Terraform
|
['terraformls'] = { --------------------- Terraform
|
||||||
['filetypes'] = { "terraform", "hcl", "tf" }
|
['filetypes'] = { "terraform", "hcl", "tf" }
|
||||||
},
|
},
|
||||||
'tsserver', ----------------------------- Typescript / JavaScript
|
|
||||||
|
-- The TS/JS server is chosen depending on an environment variable,
|
||||||
|
-- since denols is nicer for Deno based projects
|
||||||
|
------------------------ Deno TS/JS
|
||||||
|
------------------------------------ Typescript / JavaScript
|
||||||
|
(use_denols_for_typescript and 'denols' or 'tsserver'),
|
||||||
|
|
||||||
'vuels', -------------------------------- Vue
|
'vuels', -------------------------------- Vue
|
||||||
'svelte', ------------------------------- Svelte
|
'svelte', ------------------------------- Svelte
|
||||||
['yamlls'] = { -------------------------- YAML
|
['yamlls'] = { -------------------------- YAML
|
||||||
|
@ -204,21 +212,26 @@ lua <<EOF
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Configure diagnostics
|
-- https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#denols
|
||||||
vim.diagnostic.config({
|
vim.g.markdown_fenced_languages = {
|
||||||
virtual_text = false,
|
"ts=typescript"
|
||||||
signs = true,
|
}
|
||||||
underline = true,
|
|
||||||
update_in_insert = false,
|
|
||||||
severity_sort = false,
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Change diagnostic symbols in the sign column (gutter)
|
-- Configure diagnostics
|
||||||
local signs = { Error = " ", Warn = " ", Hint = " ", Info = " " }
|
vim.diagnostic.config({
|
||||||
for type, icon in pairs(signs) do
|
virtual_text = false,
|
||||||
local hl = "DiagnosticSign" .. type
|
signs = true,
|
||||||
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl })
|
underline = true,
|
||||||
end
|
update_in_insert = false,
|
||||||
|
severity_sort = false,
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Change diagnostic symbols in the sign column (gutter)
|
||||||
|
local signs = { Error = " ", Warn = " ", Hint = " ", Info = " " }
|
||||||
|
for type, icon in pairs(signs) do
|
||||||
|
local hl = "DiagnosticSign" .. type
|
||||||
|
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl })
|
||||||
|
end
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
" have a fixed column for the diagnostics to appear in
|
" have a fixed column for the diagnostics to appear in
|
||||||
|
|
Loading…
Reference in a new issue