Add gleam

This commit is contained in:
Pablu23
2024-08-04 13:36:48 +02:00
parent 15585a2f55
commit 27737530bc
3 changed files with 13 additions and 3 deletions

View File

@@ -40,10 +40,19 @@ return {
fallbackFlags = { '--std=c++20' }
},
})
end
end,
}
})
local lspconfig = require("lspconfig")
lspconfig.gleam.setup({
capabilities = capabilities,
handlers = handlers,
cmd = { "gleam", "lsp" },
root_dir = lspconfig.util.root_pattern("gleam.toml", ".git"),
filetypes = { "gleam" },
})
vim.keymap.set("n", "K", vim.lsp.buf.hover, {})
vim.keymap.set("n", "gd", vim.lsp.buf.definition, {})
vim.keymap.set({ "n", "v" }, "<leader>ca", vim.lsp.buf.code_action, {})

View File

@@ -21,9 +21,10 @@ return {
visible = false,
show_hidden_count = true,
hide_dotfiles = false,
hide_gitignored = false,
hide_gitignored = true,
hide_by_name = {
'.git',
'bin',
},
},
},

View File

@@ -4,7 +4,7 @@ return {
config = function()
local config = require("nvim-treesitter.configs")
config.setup({
ensure_installed = { "lua", "go", "zig", "markdown", "json", "yaml", "javascript", "typescript", "bash", "python", "c_sharp", "cpp" },
ensure_installed = { "lua", "go", "zig", "markdown", "json", "yaml", "javascript", "typescript", "bash", "python", "c_sharp", "cpp", "gleam" },
highlight = { enable = true },
indent = { enable = true },
})