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:
parent
077e070958
commit
f730875af9
14
init.lua
14
init.lua
|
@ -29,6 +29,10 @@ require('nvim-treesitter.configs').setup {
|
||||||
indent = {
|
indent = {
|
||||||
enable = true,
|
enable = true,
|
||||||
},
|
},
|
||||||
|
playground = {
|
||||||
|
enabled = true,
|
||||||
|
persist_queries = false,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
require('treesitter-context').setup {
|
require('treesitter-context').setup {
|
||||||
enable = true,
|
enable = true,
|
||||||
|
@ -56,3 +60,13 @@ require('telescope').setup{
|
||||||
extensions = {
|
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",
|
||||||
|
}
|
||||||
|
|
|
@ -55,25 +55,25 @@ lspconfig.sumneko_lua.setup{
|
||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
flags = lsp_flags,
|
flags = lsp_flags,
|
||||||
settings = {
|
settings = {
|
||||||
Lua = {
|
Lua = {
|
||||||
runtime = {
|
runtime = {
|
||||||
-- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim)
|
-- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim)
|
||||||
version = 'LuaJIT',
|
version = 'LuaJIT',
|
||||||
},
|
},
|
||||||
diagnostics = {
|
diagnostics = {
|
||||||
-- Get the language server to recognize the `vim` global
|
-- Get the language server to recognize the `vim` global
|
||||||
globals = {'vim'},
|
globals = {'vim'},
|
||||||
},
|
},
|
||||||
workspace = {
|
workspace = {
|
||||||
-- Make the server aware of Neovim runtime files
|
-- Make the server aware of Neovim runtime files
|
||||||
library = vim.api.nvim_get_runtime_file("", true),
|
library = vim.api.nvim_get_runtime_file("", true),
|
||||||
},
|
},
|
||||||
-- Do not send telemetry data containing a randomized but unique identifier
|
-- Do not send telemetry data containing a randomized but unique identifier
|
||||||
telemetry = {
|
telemetry = {
|
||||||
enable = false,
|
enable = false,
|
||||||
},
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
|
||||||
}
|
}
|
||||||
lspconfig.rust_analyzer.setup{
|
lspconfig.rust_analyzer.setup{
|
||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
|
|
|
@ -15,4 +15,5 @@ return require('packer').startup(function(use)
|
||||||
use 'neovim/nvim-lspconfig'
|
use 'neovim/nvim-lspconfig'
|
||||||
use { 'nvim-telescope/telescope.nvim', tag = '0.1.0', requires = {{'nvim-lua/plenary.nvim'}} }
|
use { 'nvim-telescope/telescope.nvim', tag = '0.1.0', requires = {{'nvim-lua/plenary.nvim'}} }
|
||||||
use { 'windwp/nvim-autopairs' }
|
use { 'windwp/nvim-autopairs' }
|
||||||
|
use { 'nvim-treesitter/playground', requires = {{'nvim-treesitter/nvim-treesitter'}} }
|
||||||
end)
|
end)
|
||||||
|
|
Loading…
Reference in New Issue