2024-06-13 13:22:15 -05:00
|
|
|
if not vim.fn.executable("roc") then
|
|
|
|
return
|
|
|
|
end
|
|
|
|
|
2024-06-12 10:25:28 -05:00
|
|
|
-- make .roc files have the correct filetype
|
|
|
|
vim.api.nvim_create_autocmd({ "BufEnter", "BufWinEnter" }, {
|
|
|
|
pattern = { "*.roc" },
|
|
|
|
command = "set filetype=roc",
|
|
|
|
})
|
|
|
|
|
|
|
|
-- -- add roc tree-sitter
|
|
|
|
-- local parsers = require("nvim-treesitter.parsers").get_parser_configs()
|
|
|
|
--
|
|
|
|
-- parsers.roc = {
|
|
|
|
-- install_info = {
|
|
|
|
-- url = "https://github.com/faldor20/tree-sitter-roc",
|
|
|
|
-- files = { "src/parser.c", "src/scanner.c" },
|
|
|
|
-- },
|
|
|
|
-- }
|
|
|
|
|
|
|
|
return {
|
2024-06-13 13:22:15 -05:00
|
|
|
{ "nvim-treesitter/nvim-treesitter", opts = { ensure_installed = { "roc" } } },
|
2024-06-12 10:25:28 -05:00
|
|
|
{
|
|
|
|
"neovim/nvim-lspconfig",
|
|
|
|
opts = {
|
|
|
|
servers = {
|
|
|
|
roc_ls = {
|
|
|
|
mason = false,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|