nvim: Enable LSP for gleam
This commit is contained in:
parent
c39fd13c76
commit
bfe01585ad
2 changed files with 17 additions and 0 deletions
4
nvim/.config/nvim/after/ftplugin/gleam.lua
Normal file
4
nvim/.config/nvim/after/ftplugin/gleam.lua
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
local lsp_utils = require('lsp-utils')
|
||||||
|
local gleam_config = lsp_utils.gleam_config()
|
||||||
|
|
||||||
|
vim.lsp.start(gleam_config)
|
|
@ -177,6 +177,19 @@ function M.elixir_config()
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function M.gleam_config()
|
||||||
|
local root_files = { 'gleam.toml' }
|
||||||
|
local root_directory = get_root_directory(root_files)
|
||||||
|
|
||||||
|
return {
|
||||||
|
name = "gleam",
|
||||||
|
cmd = { 'gleam', 'lsp' },
|
||||||
|
capabilities = default_capabilities,
|
||||||
|
root_dir = root_directory,
|
||||||
|
filetypes = { 'gleam' },
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
function M.gopls_config()
|
function M.gopls_config()
|
||||||
local root_files = { 'go.mod', 'go.work', '.git' }
|
local root_files = { 'go.mod', 'go.work', '.git' }
|
||||||
local root_directory = get_root_directory(root_files)
|
local root_directory = get_root_directory(root_files)
|
||||||
|
|
Loading…
Reference in a new issue