Fixes
This commit is contained in:
@@ -130,24 +130,26 @@ return {
|
||||
on_attach = on_attach,
|
||||
})
|
||||
|
||||
lspconfig.ts_ls.setup({
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
})
|
||||
-- lspconfig.ts_ls.setup({
|
||||
-- capabilities = capabilities,
|
||||
-- on_attach = on_attach,
|
||||
-- })
|
||||
|
||||
-- local mason_registry = require('mason-registry')
|
||||
-- local vue_language_server_path = mason_registry.get_package('vue-language-server'):get_install_path() .. '/node_modules/@vue/language-server'
|
||||
--
|
||||
-- lspconfig.volar.setup({
|
||||
-- capabilities = capabilities,
|
||||
-- on_attach = on_attach,
|
||||
-- cmd = { "vue-language-server", "--stdio" },
|
||||
-- -- cmd = { "vue-language-server", "--stdio" },
|
||||
-- filetypes = { "vue" },
|
||||
-- settings = {
|
||||
-- typescript = {
|
||||
-- tsdk = '/usr/lib/node_modules/typescript/lib'
|
||||
-- }
|
||||
-- }
|
||||
-- -- settings = {
|
||||
-- -- typescript = {
|
||||
-- -- tsdk = '/usr/lib/node_modules/typescript/lib'
|
||||
-- -- }
|
||||
-- -- }
|
||||
-- })
|
||||
|
||||
-- done in ftplugin
|
||||
lspconfig.jdtls.setup({
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
|
30
nvim/lua/plugins/typescript-tools.lua
Executable file
30
nvim/lua/plugins/typescript-tools.lua
Executable file
@@ -0,0 +1,30 @@
|
||||
return {
|
||||
'pmizio/typescript-tools.nvim',
|
||||
dependencies = { 'nvim-lua/plenary.nvim', 'neovim/nvim-lspconfig' },
|
||||
opts = {},
|
||||
ft = { 'javascript', 'javascriptreact', 'typescript', 'typescriptreact', 'vue' },
|
||||
config = function()
|
||||
require('typescript-tools').setup {
|
||||
on_attach = function(client, bufnr)
|
||||
client.server_capabilities.documentFormattingProvider = false
|
||||
client.server_capabilities.documentRangeFormattingProvider = false
|
||||
end,
|
||||
filetypes = {
|
||||
'javascript',
|
||||
'javascriptreact',
|
||||
'typescript',
|
||||
'typescriptreact',
|
||||
'vue',
|
||||
},
|
||||
settings = {
|
||||
tsserver_plugins = {
|
||||
'@vue/typescript-plugin',
|
||||
},
|
||||
jsx_close_tag = {
|
||||
enable = true,
|
||||
filetypes = { 'javascriptreact', 'typescriptreact' },
|
||||
},
|
||||
},
|
||||
}
|
||||
end,
|
||||
}
|
Reference in New Issue
Block a user