From fa3e94e60b9edc7c3620f43e207b915eae84bab0 Mon Sep 17 00:00:00 2001 From: Elvis Claros Castro Date: Fri, 20 Sep 2024 23:08:00 -0300 Subject: feat: solo dejo phpactor --- lua/pi/lsp/default.lua | 2 +- lua/pi/lsp/null-ls.lua | 5 ++++- lua/pi/lsp/servers/ts_ls.lua | 33 +++++++++++++++++++++++++++++++++ lua/pi/lsp/servers/tsserver.lua | 33 --------------------------------- 4 files changed, 38 insertions(+), 35 deletions(-) create mode 100644 lua/pi/lsp/servers/ts_ls.lua delete mode 100644 lua/pi/lsp/servers/tsserver.lua (limited to 'lua/pi/lsp') diff --git a/lua/pi/lsp/default.lua b/lua/pi/lsp/default.lua index ff5c97e..b2be73e 100644 --- a/lua/pi/lsp/default.lua +++ b/lua/pi/lsp/default.lua @@ -14,7 +14,7 @@ return { rust_analyzer = { enable = true }, svelte = { enable = true }, tailwindcss = { enable = true, filetypes = {"blade", "html", "svelte"} }, - tsserver = { enable = true }, + ts_ls = { enable = true }, volar = { enable = true }, texlab = { enable = true, filetypes = {"tex", "bib"} }, pyright = { enable = true, filetypes = {"python"} }, diff --git a/lua/pi/lsp/null-ls.lua b/lua/pi/lsp/null-ls.lua index 70693d9..a9c4412 100644 --- a/lua/pi/lsp/null-ls.lua +++ b/lua/pi/lsp/null-ls.lua @@ -38,7 +38,10 @@ null_ls.setup { end, }, null_ls.builtins.formatting.pint, - null_ls.builtins.formatting.clang_format, + -- null_ls.builtins.formatting.clang_format, + null_ls.builtins.formatting.clang_format.with { + extra_args = { "--style={IndentWidth: 4}" }, + }, }, } diff --git a/lua/pi/lsp/servers/ts_ls.lua b/lua/pi/lsp/servers/ts_ls.lua new file mode 100644 index 0000000..c68c894 --- /dev/null +++ b/lua/pi/lsp/servers/ts_ls.lua @@ -0,0 +1,33 @@ +local lsp_attach = require "pi.lsp.attach" +local lsp_flags = require "pi.lsp.flags" + +return function(ops) + return vim.tbl_extend("force", { + on_attach = lsp_attach, + flags = lsp_flags, + settings = { + typescript = { + inlayHints = { + includeInlayParameterNameHints = "all", + includeInlayParameterNameHintsWhenArgumentMatchesName = false, + includeInlayFunctionParameterTypeHints = true, + includeInlayVariableTypeHints = true, + includeInlayPropertyDeclarationTypeHints = true, + includeInlayFunctionLikeReturnTypeHints = true, + includeInlayEnumMemberValueHints = true, + }, + }, + javascript = { + inlayHints = { + includeInlayParameterNameHints = "all", + includeInlayParameterNameHintsWhenArgumentMatchesName = false, + includeInlayFunctionParameterTypeHints = true, + includeInlayVariableTypeHints = true, + includeInlayPropertyDeclarationTypeHints = true, + includeInlayFunctionLikeReturnTypeHints = true, + includeInlayEnumMemberValueHints = true, + }, + }, + }, + }, ops) +end diff --git a/lua/pi/lsp/servers/tsserver.lua b/lua/pi/lsp/servers/tsserver.lua deleted file mode 100644 index c68c894..0000000 --- a/lua/pi/lsp/servers/tsserver.lua +++ /dev/null @@ -1,33 +0,0 @@ -local lsp_attach = require "pi.lsp.attach" -local lsp_flags = require "pi.lsp.flags" - -return function(ops) - return vim.tbl_extend("force", { - on_attach = lsp_attach, - flags = lsp_flags, - settings = { - typescript = { - inlayHints = { - includeInlayParameterNameHints = "all", - includeInlayParameterNameHintsWhenArgumentMatchesName = false, - includeInlayFunctionParameterTypeHints = true, - includeInlayVariableTypeHints = true, - includeInlayPropertyDeclarationTypeHints = true, - includeInlayFunctionLikeReturnTypeHints = true, - includeInlayEnumMemberValueHints = true, - }, - }, - javascript = { - inlayHints = { - includeInlayParameterNameHints = "all", - includeInlayParameterNameHintsWhenArgumentMatchesName = false, - includeInlayFunctionParameterTypeHints = true, - includeInlayVariableTypeHints = true, - includeInlayPropertyDeclarationTypeHints = true, - includeInlayFunctionLikeReturnTypeHints = true, - includeInlayEnumMemberValueHints = true, - }, - }, - }, - }, ops) -end -- cgit v1.2.3