Updated config for 0.11
This commit is contained in:
@@ -11,7 +11,7 @@ return {
|
||||
},
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
config = function()
|
||||
local lspconfig = require("lspconfig")
|
||||
require("lspconfig")
|
||||
local tserrortranslator = require("ts-error-translator")
|
||||
local util = require("lspconfig.util")
|
||||
local on_attach = require("taken.utils.on_attach")
|
||||
@@ -37,20 +37,16 @@ return {
|
||||
"yamlls",
|
||||
"bashls",
|
||||
"marksman",
|
||||
"eslint",
|
||||
-- "eslint",
|
||||
}
|
||||
|
||||
for _, lsp in ipairs(defaultLsps) do
|
||||
lspconfig[lsp].setup({
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
})
|
||||
end
|
||||
|
||||
-- lua
|
||||
lspconfig["lua_ls"].setup({
|
||||
vim.lsp.config("*", {
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
})
|
||||
|
||||
-- lua
|
||||
vim.lsp.config("lua_ls", {
|
||||
settings = {
|
||||
Lua = {
|
||||
hint = {
|
||||
@@ -90,9 +86,7 @@ return {
|
||||
end
|
||||
|
||||
-- python
|
||||
lspconfig["pyright"].setup({
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
vim.lsp.config("pyright", {
|
||||
before_init = function(_, config)
|
||||
local python_path = get_python_path(config.root_dir)
|
||||
if python_path == nil then
|
||||
@@ -103,9 +97,7 @@ return {
|
||||
})
|
||||
|
||||
-- typescript
|
||||
lspconfig["ts_ls"].setup({
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
vim.lsp.config("ts_ls", {
|
||||
settings = {
|
||||
typescript = {
|
||||
inlayHints = {
|
||||
@@ -135,12 +127,16 @@ return {
|
||||
})
|
||||
|
||||
-- powershell
|
||||
lspconfig["powershell_es"].setup({
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
vim.lsp.config("powershell_es", {
|
||||
bundle_path = vim.fn.stdpath("data") .. "/mason/packages/powershell-editor-services",
|
||||
})
|
||||
|
||||
vim.lsp.enable(defaultLsps)
|
||||
vim.lsp.enable("lua_ls")
|
||||
vim.lsp.enable("pyright")
|
||||
vim.lsp.enable("ts_ls")
|
||||
vim.lsp.enable("powershell_es")
|
||||
|
||||
tserrortranslator.setup()
|
||||
end,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user