Added odin tree-sitter and ols support, removed lua LSP because they

changed the name and it's still a sketchy pos.
This commit is contained in:
Tyler White 2023-03-07 10:35:43 -08:00
parent 75c7e93a3f
commit aa5fa13989
3 changed files with 22 additions and 38 deletions

View File

@ -69,15 +69,21 @@ local parser_config = require "nvim-treesitter.parsers".get_parser_configs()
-- }, -- },
-- filetype = "zu", -- filetype = "zu",
--} --}
--vim.filetype.add({ vim.filetype.add({
-- extension = { extension = {
-- odin = "odin" odin = "odin"
-- } }
--}) })
--parser_config.odin = {
-- install_info = { if (vim.loop.os_uname().sysname == "Windows_NT") then
-- url = "D:\\Code\\odin\\tree-sitter-odin", url = "D:\\Code\\odin\\tree-sitter-odin"
-- files = {"src/parser.c"} else
-- }, url = "~/code/odin/tree-sitter-odin"
-- filetype = "odin", end
--} parser_config.odin = {
install_info = {
url = url,
files = {"src/parser.c"}
},
filetype = "odin",
}

View File

@ -21,7 +21,7 @@ local function get_build_cmd()
return "build.bat" return "build.bat"
else else
-- TODO(twig): this is untested! -- TODO(twig): this is untested!
return "build.sh" return "./build.sh"
end end
end end
end end

View File

@ -60,31 +60,9 @@ lspconfig.clangd.setup{
end end
} }
} }
-- honestly don't need this, telemetry is a big yikes.
lspconfig.sumneko_lua.setup{
on_attach = on_attach,
flags = lsp_flags,
settings = {
Lua = {
runtime = {
-- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim)
version = 'LuaJIT',
},
diagnostics = {
-- Get the language server to recognize the `vim` global
globals = {'vim'},
},
workspace = {
-- Make the server aware of Neovim runtime files
library = vim.api.nvim_get_runtime_file("", true),
},
-- Do not send telemetry data containing a randomized but unique identifier
telemetry = {
enable = false,
},
},
},
}
lspconfig.rust_analyzer.setup{ lspconfig.rust_analyzer.setup{
on_attach = on_attach, on_attach = on_attach,
} }
lspconfig.ols.setup{
on_attach = on_attach,
}