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:
parent
75c7e93a3f
commit
aa5fa13989
30
init.lua
30
init.lua
|
@ -69,15 +69,21 @@ local parser_config = require "nvim-treesitter.parsers".get_parser_configs()
|
|||
-- },
|
||||
-- filetype = "zu",
|
||||
--}
|
||||
--vim.filetype.add({
|
||||
-- extension = {
|
||||
-- odin = "odin"
|
||||
-- }
|
||||
--})
|
||||
--parser_config.odin = {
|
||||
-- install_info = {
|
||||
-- url = "D:\\Code\\odin\\tree-sitter-odin",
|
||||
-- files = {"src/parser.c"}
|
||||
-- },
|
||||
-- filetype = "odin",
|
||||
--}
|
||||
vim.filetype.add({
|
||||
extension = {
|
||||
odin = "odin"
|
||||
}
|
||||
})
|
||||
|
||||
if (vim.loop.os_uname().sysname == "Windows_NT") then
|
||||
url = "D:\\Code\\odin\\tree-sitter-odin"
|
||||
else
|
||||
url = "~/code/odin/tree-sitter-odin"
|
||||
end
|
||||
parser_config.odin = {
|
||||
install_info = {
|
||||
url = url,
|
||||
files = {"src/parser.c"}
|
||||
},
|
||||
filetype = "odin",
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ local function get_build_cmd()
|
|||
return "build.bat"
|
||||
else
|
||||
-- TODO(twig): this is untested!
|
||||
return "build.sh"
|
||||
return "./build.sh"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -60,31 +60,9 @@ lspconfig.clangd.setup{
|
|||
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{
|
||||
on_attach = on_attach,
|
||||
}
|
||||
lspconfig.ols.setup{
|
||||
on_attach = on_attach,
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue