|
|
|
@ -474,7 +474,6 @@ require('lazy').setup({
|
|
|
|
|
{
|
|
|
|
|
'pmizio/typescript-tools.nvim',
|
|
|
|
|
dependencies = { 'nvim-lua/plenary.nvim', 'neovim/nvim-lspconfig' },
|
|
|
|
|
opts = {},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
config = function()
|
|
|
|
@ -608,6 +607,10 @@ require('lazy').setup({
|
|
|
|
|
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
|
|
|
|
capabilities = vim.tbl_deep_extend('force', capabilities, require('cmp_nvim_lsp').default_capabilities())
|
|
|
|
|
|
|
|
|
|
require('lspconfig')['typescript-tools'].setup {
|
|
|
|
|
capabilities = capabilities,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
-- Enable the following language servers
|
|
|
|
|
-- Feel free to add/remove any LSPs that you want here. They will automatically be installed.
|
|
|
|
|
--
|
|
|
|
@ -631,6 +634,24 @@ require('lazy').setup({
|
|
|
|
|
-- tsserver = {},
|
|
|
|
|
--
|
|
|
|
|
|
|
|
|
|
html = {
|
|
|
|
|
cmd = { 'vscode-html-language-server', '--stdio' },
|
|
|
|
|
filetypes = { 'html' },
|
|
|
|
|
capabilities = capabilities,
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
cssls = {
|
|
|
|
|
cmd = { 'vscode-css-language-server', '--stdio' },
|
|
|
|
|
filetypes = { 'css', 'scss', 'less' },
|
|
|
|
|
capabilities = capabilities,
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
jsonls = {
|
|
|
|
|
cmd = { 'vscode-json-language-server', '--stdio' },
|
|
|
|
|
filetypes = { 'json' },
|
|
|
|
|
capabilities = capabilities,
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
lua_ls = {
|
|
|
|
|
-- cmd = {...},
|
|
|
|
|
-- filetypes = { ...},
|
|
|
|
@ -661,25 +682,28 @@ require('lazy').setup({
|
|
|
|
|
vim.list_extend(ensure_installed, {
|
|
|
|
|
'stylua', -- Used to format Lua code
|
|
|
|
|
'lua_ls',
|
|
|
|
|
'prettierd',
|
|
|
|
|
'eslint_d',
|
|
|
|
|
'stylelint',
|
|
|
|
|
'tailwindcss',
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
require('mason-tool-installer').setup { ensure_installed = ensure_installed }
|
|
|
|
|
|
|
|
|
|
require('mason-lspconfig').setup {
|
|
|
|
|
handlers = {
|
|
|
|
|
function(server_name)
|
|
|
|
|
if server_name == 'tsserver' then
|
|
|
|
|
return
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
local server = servers[server_name] or {}
|
|
|
|
|
-- This handles overriding only values explicitly passed
|
|
|
|
|
-- by the server configuration above. Useful when disabling
|
|
|
|
|
-- certain features of an LSP (for example, turning off formatting for tsserver)
|
|
|
|
|
server.capabilities = vim.tbl_deep_extend('force', {}, capabilities, server.capabilities or {})
|
|
|
|
|
if server_name == 'tsserver' then
|
|
|
|
|
return
|
|
|
|
|
end
|
|
|
|
|
require('lspconfig')[server_name].setup(server)
|
|
|
|
|
end,
|
|
|
|
|
['typescript-tools'] = function()
|
|
|
|
|
require('typescript-tools').setup {}
|
|
|
|
|
end,
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
end,
|
|
|
|
|