Enabled lua LSP, might not want that as the lsp server is kinda sus.

made a fake treesitter language to help debug zig's terrible
implementation.
This commit is contained in:
twig 2022-11-26 22:20:41 -08:00
parent 077e070958
commit f730875af9
3 changed files with 33 additions and 18 deletions

View File

@ -29,6 +29,10 @@ require('nvim-treesitter.configs').setup {
indent = {
enable = true,
},
playground = {
enabled = true,
persist_queries = false,
}
}
require('treesitter-context').setup {
enable = true,
@ -56,3 +60,13 @@ require('telescope').setup{
extensions = {
}
}
local parser_config = require "nvim-treesitter.parsers".get_parser_configs()
parser_config.zimbu = {
install_info = {
url = "D:/Code/zig/treesitter",
files = {"src/parser.c"},
generate_requires_npm = true,
requires_generate_from_grammer = true,
},
filetype = "zu",
}

View File

@ -55,25 +55,25 @@ 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,
},
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,

View File

@ -15,4 +15,5 @@ return require('packer').startup(function(use)
use 'neovim/nvim-lspconfig'
use { 'nvim-telescope/telescope.nvim', tag = '0.1.0', requires = {{'nvim-lua/plenary.nvim'}} }
use { 'windwp/nvim-autopairs' }
use { 'nvim-treesitter/playground', requires = {{'nvim-treesitter/nvim-treesitter'}} }
end)