Skip to content

Commit

Permalink
feat(pack): add kotlin language pack (#366)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sacro authored Jul 5, 2023
1 parent 052923f commit f43c76d
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
12 changes: 12 additions & 0 deletions lua/astrocommunity/pack/kotlin/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@

# Kotlin Language Pack

Requires:
- `JDK-17` or higher to function.

This plugin pack does the following:

- Adds `kotlin` treesitter parsers
- Adds `kotlin_language_server` language server
- Adds `ktlint` through null-ls
- Adds `kotlin-debug-adapter` debug adapter for nvim-dap
28 changes: 28 additions & 0 deletions lua/astrocommunity/pack/kotlin/init.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
local utils = require "astronvim.utils"

return {
{
"nvim-treesitter/nvim-treesitter",
opts = function(_, opts)
if opts.ensure_installed ~= "all" then
opts.ensure_installed = utils.list_insert_unique(opts.ensure_installed, "kotlin")
end
end,
},
{
"williamboman/mason-lspconfig.nvim",
opts = function(_, opts)
opts.ensure_installed = utils.list_insert_unique(opts.ensure_installed, "kotlin_language_server")
end,
},

{
"jay-babu/mason-null-ls.nvim",
opts = function(_, opts) opts.ensure_installed = utils.list_insert_unique(opts.ensure_installed, "ktlint") end,
},

{
"jay-babu/mason-nvim-dap.nvim",
opts = function(_, opts) opts.ensure_installed = utils.list_insert_unique(opts.ensure_installed, "kotlin") end,
},
}

0 comments on commit f43c76d

Please sign in to comment.