aboutsummaryrefslogtreecommitdiffstats
path: root/lua/alpha/lsp/servers
diff options
context:
space:
mode:
authorElvis Claros Castro <elvis@claros.ar>2024-07-12 11:18:14 -0300
committerElvis Claros Castro <elvis@claros.ar>2024-07-12 11:18:14 -0300
commitea0f4bf8ffade657b1d45152dbc183d4679e75c4 (patch)
treecc1fb023bc308e019ddce33a4b0aed39f56805dc /lua/alpha/lsp/servers
parent1fd0af14d592d612c2aaab7717c04c8806ba3daa (diff)
downloadnvim-conf-ea0f4bf8ffade657b1d45152dbc183d4679e75c4.tar.gz
nvim-conf-ea0f4bf8ffade657b1d45152dbc183d4679e75c4.zip
Feat: PI
Diffstat (limited to 'lua/alpha/lsp/servers')
-rw-r--r--lua/alpha/lsp/servers/emmet_ls.lua12
-rw-r--r--lua/alpha/lsp/servers/html.lua14
-rw-r--r--lua/alpha/lsp/servers/jsonls.lua14
-rw-r--r--lua/alpha/lsp/servers/kotlin_language_server.lua12
-rw-r--r--lua/alpha/lsp/servers/lua_ls.lua36
-rw-r--r--lua/alpha/lsp/servers/phpactor.lua80
-rw-r--r--lua/alpha/lsp/servers/python.lua16
-rw-r--r--lua/alpha/lsp/servers/rust_analyzer.lua24
-rw-r--r--lua/alpha/lsp/servers/texlab.lua16
-rw-r--r--lua/alpha/lsp/servers/tsserver.lua33
-rw-r--r--lua/alpha/lsp/servers/vscode_smarty_langserver.lua25
11 files changed, 0 insertions, 282 deletions
diff --git a/lua/alpha/lsp/servers/emmet_ls.lua b/lua/alpha/lsp/servers/emmet_ls.lua
deleted file mode 100644
index c4f1cb6..0000000
--- a/lua/alpha/lsp/servers/emmet_ls.lua
+++ /dev/null
@@ -1,12 +0,0 @@
-local lsp_attach = require "alpha.lsp.attach"
-local lsp_flags = require "alpha.lsp.flags"
-
-return function(ops)
- local capabilities = require("cmp_nvim_lsp").default_capabilities(vim.lsp.protocol.make_client_capabilities())
- return vim.tbl_extend("force", {
- on_attach = lsp_attach,
- flags = lsp_flags,
- capabilities = capabilities,
- filetypes = { "html", "typescriptreact", "javascriptreact", "css", "sass", "scss", "less", "blade", "vue" },
- }, ops)
-end
diff --git a/lua/alpha/lsp/servers/html.lua b/lua/alpha/lsp/servers/html.lua
deleted file mode 100644
index 7b8ef54..0000000
--- a/lua/alpha/lsp/servers/html.lua
+++ /dev/null
@@ -1,14 +0,0 @@
-local lsp_attach = require "alpha.lsp.attach"
-local lsp_flags = require "alpha.lsp.flags"
-
-return function(ops)
- local config = {
- on_attach = lsp_attach,
- flags = lsp_flags,
- }
- if vim.fn.executable "html-languageserver" == 1 then
- config.cmd = { "html-languageserver", "--stdio" }
- end
-
- return vim.tbl_extend("force", config, ops)
-end
diff --git a/lua/alpha/lsp/servers/jsonls.lua b/lua/alpha/lsp/servers/jsonls.lua
deleted file mode 100644
index 9c731ab..0000000
--- a/lua/alpha/lsp/servers/jsonls.lua
+++ /dev/null
@@ -1,14 +0,0 @@
-local lsp_attach = require "alpha.lsp.attach"
-local lsp_flags = require "alpha.lsp.flags"
-
-return function(ops)
- local config = {
- on_attach = lsp_attach,
- flags = lsp_flags,
- }
- if vim.fn.executable "json-languageserver" == 1 then
- config.cmd = { "json-languageserver", "--stdio" }
- end
-
- return vim.tbl_extend("force", config, ops)
-end
diff --git a/lua/alpha/lsp/servers/kotlin_language_server.lua b/lua/alpha/lsp/servers/kotlin_language_server.lua
deleted file mode 100644
index 2a02f7d..0000000
--- a/lua/alpha/lsp/servers/kotlin_language_server.lua
+++ /dev/null
@@ -1,12 +0,0 @@
-local lsp_attach = require "alpha.lsp.attach"
-local lsp_flags = require "alpha.lsp.flags"
-return function(ops)
- return vim.tbl_extend("force", {
- on_attach = lsp_attach,
- flags = lsp_flags,
- settings = {
- ["kotlin-language-server"] = {
- }
- }
- }, ops)
-end
diff --git a/lua/alpha/lsp/servers/lua_ls.lua b/lua/alpha/lsp/servers/lua_ls.lua
deleted file mode 100644
index c5f72bf..0000000
--- a/lua/alpha/lsp/servers/lua_ls.lua
+++ /dev/null
@@ -1,36 +0,0 @@
-local lsp_attach = require "alpha.lsp.attach"
-local lsp_flags = require "alpha.lsp.flags"
-
-return function(ops)
- if ops.neodev == true then
- require("neodev").setup()
- end
-
- return vim.tbl_extend("force", {
- on_attach = lsp_attach,
- flags = lsp_flags,
- settings = {
- Lua = {
- runtime = {
- version = "LuaJIT",
- },
- diagnostics = {
- globals = { "vim" },
- },
- workspace = {
- library = vim.api.nvim_get_runtime_file("", true),
- checkThirdParty = false,
- },
- telemetry = {
- enable = false,
- },
- hint = {
- enable = true,
- },
- completion = {
- callSnippet = "Replace",
- },
- },
- },
- }, ops)
-end
diff --git a/lua/alpha/lsp/servers/phpactor.lua b/lua/alpha/lsp/servers/phpactor.lua
deleted file mode 100644
index ab5d21d..0000000
--- a/lua/alpha/lsp/servers/phpactor.lua
+++ /dev/null
@@ -1,80 +0,0 @@
-local lsp_attach = require "alpha.lsp.attach"
-local lsp_flags = require "alpha.lsp.flags"
-
-local function phpactor_attach(_, bufnr)
- vim.api.nvim_buf_create_user_command(bufnr, "LspPhpactorReindex", function()
- vim.lsp.buf_notify(bufnr, "phpactor/index/reindex", {})
- end, {})
-
- vim.api.nvim_buf_create_user_command(bufnr, "LspPhpactorStatus", function()
- local results, _ = vim.lsp.buf_request_sync(bufnr, "phpactor/status", { ["return"] = true })
-
- local content = ""
-
- for _, res in pairs(results or {}) do
- if res ~= nil and res["result"] ~= nil then
- content = content .. res["result"]
- end
- end
-
- local Popup = require "nui.popup"
- local event = require("nui.utils.autocmd").event
-
- local popup = Popup {
- enter = true,
- focusable = true,
- border = {
- style = "rounded",
- },
- position = "50%",
- size = {
- width = "80%",
- height = "60%",
- },
- }
-
- -- mount/open the component
- popup:mount()
-
- -- unmount component when cursor leaves buffer
- popup:on(event.BufLeave, function()
- popup:unmount()
- end)
- local out = {}
- for match in string.gmatch(content, "[^\n]+") do
- table.insert(out, match)
- end
-
- -- vim.api.nvim_buf_set_option(popup.bufnr, "filetype", "markdown")
- vim.api.nvim_buf_set_lines(popup.bufnr, 0, 1, false, out)
- end, {})
-end
-
-return function(ops)
- return vim.tbl_extend("force", {
- on_attach = function(client, bufnr)
- lsp_attach(client, bufnr)
- phpactor_attach(client, bufnr)
- end,
- flags = lsp_flags,
- filetypes = { "php", "blade" },
- init_options = {
- ["language_server_worse_reflection.inlay_hints.enable"] = true,
- ["language_server_worse_reflection.inlay_hints.params"] = true,
- ["language_server_worse_reflection.inlay_hints.types"] = true,
- ["language_server_configuration.auto_config"] = false,
- ["code_transform.import_globals"] = true,
- ["language_server_phpstan.enabled"] = true,
- ["language_server_phpstan.level"] = 7,
- ["language_server_phpstan.bin"] = "phpstan",
- },
- handlers = {
- ["textDocument/inlayHint"] = function(err, result, ...)
- for _, res in ipairs(result) do
- res.label = res.label .. ": "
- end
- vim.lsp.handlers["textDocument/inlayHint"](err, result, ...)
- end,
- },
- }, ops)
-end
diff --git a/lua/alpha/lsp/servers/python.lua b/lua/alpha/lsp/servers/python.lua
deleted file mode 100644
index 6cdbf9e..0000000
--- a/lua/alpha/lsp/servers/python.lua
+++ /dev/null
@@ -1,16 +0,0 @@
-local lsp_attach = require "alpha.lsp.attach"
-local lsp_flags = require "alpha.lsp.flags"
-return function (ops)
- return vim.tbl_extend("force", {
- on_attach = lsp_attach,
- flags = lsp_flags,
- settings = {
- ["pyright"] = {
- disableOrganizeImports = false,
- disableDiagnostics = false,
- disableLanguageServices = false,
- typeCheckingMode = "strict",
- }
- }
- }, ops)
-end
diff --git a/lua/alpha/lsp/servers/rust_analyzer.lua b/lua/alpha/lsp/servers/rust_analyzer.lua
deleted file mode 100644
index c0db321..0000000
--- a/lua/alpha/lsp/servers/rust_analyzer.lua
+++ /dev/null
@@ -1,24 +0,0 @@
-local lsp_attach = require "alpha.lsp.attach"
-local lsp_flags = require "alpha.lsp.flags"
-
-return function(ops)
- return vim.tbl_extend("force", {
- on_attach = lsp_attach,
- flags = lsp_flags,
- settings = {
- ["rust-analyzer"] = {
- checkOnSave = {
- allFeatures = true,
- overrideCommand = {
- "cargo",
- "clippy",
- "--workspace",
- "--message-format=json",
- "--all-targets",
- "--all-features",
- },
- },
- },
- },
- }, ops)
-end
diff --git a/lua/alpha/lsp/servers/texlab.lua b/lua/alpha/lsp/servers/texlab.lua
deleted file mode 100644
index d749db9..0000000
--- a/lua/alpha/lsp/servers/texlab.lua
+++ /dev/null
@@ -1,16 +0,0 @@
-local lsp_attach = require "alpha.lsp.attach"
-local lsp_flags = require "alpha.lsp.flags"
-return function(ops)
- return vim.tbl_extend("force", {
- on_attach = lsp_attach,
- flags = lsp_flags,
- settings = {
- ["texlab"] = {
- latexFormatter = "latexindent",
- latexindent = {
- modifyLineBreaks = false
- }
- }
- }
- }, ops)
-end
diff --git a/lua/alpha/lsp/servers/tsserver.lua b/lua/alpha/lsp/servers/tsserver.lua
deleted file mode 100644
index e27d94a..0000000
--- a/lua/alpha/lsp/servers/tsserver.lua
+++ /dev/null
@@ -1,33 +0,0 @@
-local lsp_attach = require "alpha.lsp.attach"
-local lsp_flags = require "alpha.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/alpha/lsp/servers/vscode_smarty_langserver.lua b/lua/alpha/lsp/servers/vscode_smarty_langserver.lua
deleted file mode 100644
index e404698..0000000
--- a/lua/alpha/lsp/servers/vscode_smarty_langserver.lua
+++ /dev/null
@@ -1,25 +0,0 @@
-local lsp_attach = require "alpha.lsp.attach"
-local lsp_flags = require "alpha.lsp.flags"
-
-return function(ops)
- return vim.tbl_extend("force", {
- on_attach = lsp_attach,
- flags = lsp_flags,
- settings = {
- css = {
- validate = true
- },
- smarty = {
- pluginDirs = {}
- },
- ["smarty_ls"] = {
- checkOnSave = {
- overrideCommand = {
- "smarty-language-server",
- "--stdio",
- },
- },
- },
- },
- }, ops)
-end