diff options
Diffstat (limited to 'lua/alpha')
| -rw-r--r-- | lua/alpha/completition/init.lua | 1 | ||||
| -rw-r--r-- | lua/alpha/dap/configs/kotlin.lua | 18 | ||||
| -rw-r--r-- | lua/alpha/lsp/default.lua | 1 | ||||
| -rw-r--r-- | lua/alpha/lsp/servers/kotlin.lua | 1 | ||||
| -rw-r--r-- | lua/alpha/lsp/servers/kotlin_language_server.lua | 12 | ||||
| -rw-r--r-- | lua/alpha/lsp/servers/phpactor.lua | 4 |
6 files changed, 35 insertions, 2 deletions
diff --git a/lua/alpha/completition/init.lua b/lua/alpha/completition/init.lua index 92e1f91..61a3d1c 100644 --- a/lua/alpha/completition/init.lua +++ b/lua/alpha/completition/init.lua @@ -36,6 +36,7 @@ cmp.setup { ["<c-space>"] = cmp.mapping.complete(), }, sources = { + { name = "dictionary" }, { name = "nvim_lua" }, { name = "nvim_lsp" }, { name = "path" }, diff --git a/lua/alpha/dap/configs/kotlin.lua b/lua/alpha/dap/configs/kotlin.lua new file mode 100644 index 0000000..aa486db --- /dev/null +++ b/lua/alpha/dap/configs/kotlin.lua @@ -0,0 +1,18 @@ +local dap = require('dap') + +dap.adapters.kotlin = { + type = 'executable'; + command = "kotlin-debug-adapter"; +} + +dap.configurations.kotlin = { + { + type = 'kotlin', + request = 'launch', + program = "${file}", + name = 'Launch kotlin program', + projectRoot = "${workspaceFolder}/app", + mainClass = "AppKt", + } +} +dap.defaults.kotlin.auto_continue_if_many_stopped = false diff --git a/lua/alpha/lsp/default.lua b/lua/alpha/lsp/default.lua index 639282d..b436be5 100644 --- a/lua/alpha/lsp/default.lua +++ b/lua/alpha/lsp/default.lua @@ -17,6 +17,7 @@ return { tsserver = { enable = true }, volar = { enable = true }, texlab = { enable = true, filetypes = {"tex", "bib"} }, + kotlin_language_server = { enable = true, filetypes = {"kotlin"}, root_dir = require("lspconfig.util").root_pattern("build.gradle.kts", "pom.xml", ".git") }, }, default_options = function (options) return vim.tbl_deep_extend("force", { diff --git a/lua/alpha/lsp/servers/kotlin.lua b/lua/alpha/lsp/servers/kotlin.lua new file mode 100644 index 0000000..39cdd0d --- /dev/null +++ b/lua/alpha/lsp/servers/kotlin.lua @@ -0,0 +1 @@ +- diff --git a/lua/alpha/lsp/servers/kotlin_language_server.lua b/lua/alpha/lsp/servers/kotlin_language_server.lua new file mode 100644 index 0000000..2a02f7d --- /dev/null +++ b/lua/alpha/lsp/servers/kotlin_language_server.lua @@ -0,0 +1,12 @@ +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/phpactor.lua b/lua/alpha/lsp/servers/phpactor.lua index e6bebcd..ab5d21d 100644 --- a/lua/alpha/lsp/servers/phpactor.lua +++ b/lua/alpha/lsp/servers/phpactor.lua @@ -45,7 +45,7 @@ local function phpactor_attach(_, bufnr) table.insert(out, match) end - vim.api.nvim_buf_set_option(popup.bufnr, "filetype", "markdown") + -- vim.api.nvim_buf_set_option(popup.bufnr, "filetype", "markdown") vim.api.nvim_buf_set_lines(popup.bufnr, 0, 1, false, out) end, {}) end @@ -61,7 +61,7 @@ return function(ops) 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_worse_reflection.inlay_hints.types"] = true, ["language_server_configuration.auto_config"] = false, ["code_transform.import_globals"] = true, ["language_server_phpstan.enabled"] = true, |