added typescript LSP support
This commit is contained in:
parent
af38127637
commit
19511c84c6
|
@ -34,8 +34,8 @@ end
|
||||||
|
|
||||||
-- Use a loop to conveniently call 'setup' on multiple servers and
|
-- Use a loop to conveniently call 'setup' on multiple servers and
|
||||||
-- map buffer local keybindings when the language server attaches
|
-- map buffer local keybindings when the language server attaches
|
||||||
-- the packages for these servers are: pyright, rust-analyzer, texlab, and lua-language-server
|
-- the packages for these servers are: pyright, rust-analyzer, texlab, and lua-language-server, deno, den
|
||||||
local servers = { 'pyright', 'texlab'}
|
local servers = { 'pyright', 'texlab', 'denols'}
|
||||||
for _, lsp in ipairs(servers) do
|
for _, lsp in ipairs(servers) do
|
||||||
nvim_lsp[lsp].setup {
|
nvim_lsp[lsp].setup {
|
||||||
flags = {
|
flags = {
|
||||||
|
@ -44,6 +44,11 @@ for _, lsp in ipairs(servers) do
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--deno typescript configuration
|
||||||
|
vim.g.markdown_fenced_languages = {
|
||||||
|
"ts=typescript"
|
||||||
|
}
|
||||||
|
|
||||||
--rust configuration
|
--rust configuration
|
||||||
local rustOpts = {
|
local rustOpts = {
|
||||||
tools = { -- rust-tools options
|
tools = { -- rust-tools options
|
||||||
|
|
|
@ -10,7 +10,7 @@ local luasnip = require 'luasnip'
|
||||||
local lspconfig = require('lspconfig')
|
local lspconfig = require('lspconfig')
|
||||||
|
|
||||||
-- Enable some language servers with the additional completion capabilities offered by nvim-cmp
|
-- Enable some language servers with the additional completion capabilities offered by nvim-cmp
|
||||||
local servers = { 'clangd', 'rust_analyzer', 'pyright', 'tsserver' }
|
local servers = {'texlab', 'rust_analyzer', 'pyright', 'denols'}
|
||||||
for _, lsp in ipairs(servers) do
|
for _, lsp in ipairs(servers) do
|
||||||
lspconfig[lsp].setup {
|
lspconfig[lsp].setup {
|
||||||
-- on_attach = my_custom_on_attach,
|
-- on_attach = my_custom_on_attach,
|
||||||
|
|
Loading…
Reference in a new issue