summaryrefslogtreecommitdiff
path: root/.config/nvim/lua/lang/kotlin.lua
diff options
context:
space:
mode:
authorGustaf Rydholm <gustaf.rydholm@gmail.com>2021-08-10 23:15:04 +0200
committerGustaf Rydholm <gustaf.rydholm@gmail.com>2021-08-10 23:15:04 +0200
commit540268d618627079c9b958a955b586e1888b46a8 (patch)
tree1a22a5feb457135178b9d4fe8b6c1755f5ca66bc /.config/nvim/lua/lang/kotlin.lua
parente79bd3273f58ba38e8fcd716090b89326791afbb (diff)
Major refactor of nvim
Diffstat (limited to '.config/nvim/lua/lang/kotlin.lua')
-rw-r--r--.config/nvim/lua/lang/kotlin.lua63
1 files changed, 0 insertions, 63 deletions
diff --git a/.config/nvim/lua/lang/kotlin.lua b/.config/nvim/lua/lang/kotlin.lua
deleted file mode 100644
index 3fe1dc9..0000000
--- a/.config/nvim/lua/lang/kotlin.lua
+++ /dev/null
@@ -1,63 +0,0 @@
-local M = {}
-
-M.config = function()
- O.lang.kotlin = {}
-end
-
-M.format = function()
- -- TODO: implement formatter for language
- return "No formatter available!"
-end
-
-M.lint = function()
- -- TODO: implement linters (if applicable)
- return "No linters configured!"
-end
-
-M.lsp = function()
- if require("utils").check_lsp_client_active "kotlin_language_server" then
- return
- end
-
- --- default config for gradle-projects of the
- --- kotlin-language-server: https://github.com/fwcd/kotlin-language-server
- ---
- --- This server requires vim to be aware of the kotlin-filetype.
- --- You could refer for this capability to:
- --- https://github.com/udalov/kotlin-vim (recommended)
- --- Note that there is no LICENSE specified yet.
-
- local util = require "lspconfig/util"
-
- local bin_name = DATA_PATH .. "/lspinstall/kotlin/server/bin/kotlin-language-server"
- if vim.fn.has "win32" == 1 then
- bin_name = bin_name .. ".bat"
- end
-
- local root_files = {
- "settings.gradle", -- Gradle (multi-project)
- "settings.gradle.kts", -- Gradle (multi-project)
- "build.xml", -- Ant
- "pom.xml", -- Maven
- }
-
- local fallback_root_files = {
- "build.gradle", -- Gradle
- "build.gradle.kts", -- Gradle
- }
-
- require("lspconfig").kotlin_language_server.setup {
- cmd = { bin_name },
- on_attach = require("lsp").common_on_attach,
- root_dir = function(fname)
- return util.root_pattern(unpack(root_files))(fname) or util.root_pattern(unpack(fallback_root_files))(fname)
- end,
- }
-end
-
-M.dap = function()
- -- TODO: implement dap
- return "No DAP configured!"
-end
-
-return M