feat: move to new treesitter.
This commit is contained in:
parent
84168cc231
commit
7c2b42d916
14 changed files with 19 additions and 26 deletions
1
ftplugin/bash.lua
Normal file
1
ftplugin/bash.lua
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
vim.treesitter.start()
|
||||||
1
ftplugin/go.lua
Normal file
1
ftplugin/go.lua
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
vim.treesitter.start()
|
||||||
1
ftplugin/html.lua
Normal file
1
ftplugin/html.lua
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
vim.treesitter.start()
|
||||||
1
ftplugin/json.lua
Normal file
1
ftplugin/json.lua
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
vim.treesitter.start()
|
||||||
1
ftplugin/just.lua
Normal file
1
ftplugin/just.lua
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
vim.treesitter.start()
|
||||||
1
ftplugin/lua.lua
Normal file
1
ftplugin/lua.lua
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
vim.treesitter.start()
|
||||||
1
ftplugin/markdown.lua
Normal file
1
ftplugin/markdown.lua
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
vim.treesitter.start()
|
||||||
1
ftplugin/nix.lua
Normal file
1
ftplugin/nix.lua
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
vim.treesitter.start()
|
||||||
1
ftplugin/python.lua
Normal file
1
ftplugin/python.lua
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
vim.treesitter.start()
|
||||||
1
ftplugin/yaml.lua
Normal file
1
ftplugin/yaml.lua
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
vim.treesitter.start()
|
||||||
1
ftplugin/zsh.lua
Normal file
1
ftplugin/zsh.lua
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
vim.treesitter.start()
|
||||||
|
|
@ -16,6 +16,9 @@ vim.lsp.config("*", {
|
||||||
root_markers = { '.git' },
|
root_markers = { '.git' },
|
||||||
})
|
})
|
||||||
|
|
||||||
|
-- fix annoying lua lsp errors
|
||||||
|
require("lazydev").setup()
|
||||||
|
|
||||||
-- enable specific language servers
|
-- enable specific language servers
|
||||||
vim.lsp.enable({
|
vim.lsp.enable({
|
||||||
"nixd",
|
"nixd",
|
||||||
|
|
@ -33,6 +36,3 @@ vim.lsp.enable({
|
||||||
|
|
||||||
-- diagnostic settings
|
-- diagnostic settings
|
||||||
vim.diagnostic.config({ virtual_text = true })
|
vim.diagnostic.config({ virtual_text = true })
|
||||||
|
|
||||||
-- fix annoying lua lsp errors
|
|
||||||
require("lazydev").setup()
|
|
||||||
|
|
|
||||||
|
|
@ -1,28 +1,10 @@
|
||||||
vim.pack.add({
|
vim.pack.add({
|
||||||
{ src = "https://github.com/nvim-treesitter/nvim-treesitter", name = "nvim-treesitter" },
|
{ src = "https://github.com/nvim-treesitter/nvim-treesitter" },
|
||||||
})
|
})
|
||||||
---@diagnostic disable: missing-fields
|
---@diagnostic disable: missing-fields
|
||||||
require'nvim-treesitter'.setup {
|
require 'nvim-treesitter'.setup {}
|
||||||
-- ensure_installed = { "go", "nix" },
|
|
||||||
|
|
||||||
auto_install = true,
|
require 'nvim-treesitter'.install { 'go', 'nix', 'lua', 'json', 'html', 'markdown_inline', 'python', 'bash', 'zsh', 'just', 'yaml' }
|
||||||
|
|
||||||
highlight = {
|
|
||||||
enable = true,
|
|
||||||
},
|
|
||||||
|
|
||||||
incremental_selection = {
|
|
||||||
enable = true,
|
|
||||||
keymaps = {
|
|
||||||
init_selection = "<Leader>ss",
|
|
||||||
node_incremental = "<Leader>si",
|
|
||||||
scope_incremental = "<Leader>sc",
|
|
||||||
node_decremental = "<Leader>sd",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
require'nvim-treesitter'.install { 'go', 'nix'}
|
|
||||||
|
|
||||||
-- run tsupdate when updating nvim-treesitter
|
-- run tsupdate when updating nvim-treesitter
|
||||||
vim.api.nvim_create_autocmd('PackChanged', {
|
vim.api.nvim_create_autocmd('PackChanged', {
|
||||||
|
|
|
||||||
|
|
@ -25,11 +25,11 @@
|
||||||
"src": "https://github.com/neovim/nvim-lspconfig"
|
"src": "https://github.com/neovim/nvim-lspconfig"
|
||||||
},
|
},
|
||||||
"nvim-treesitter": {
|
"nvim-treesitter": {
|
||||||
"rev": "cb2cb74f3c3cbbcc17e79cada2060165d616d849",
|
"rev": "544320a9cf5d6bf539ec1cc54d393064015670c4",
|
||||||
"src": "https://github.com/nvim-treesitter/nvim-treesitter"
|
"src": "https://github.com/nvim-treesitter/nvim-treesitter"
|
||||||
},
|
},
|
||||||
"render-markdown.nvim": {
|
"render-markdown.nvim": {
|
||||||
"rev": "1641b434bda26e0f4e3610985b3357fc213cf834",
|
"rev": "bd482f9a4827c9422231a7db1439c5cff1e69ae0",
|
||||||
"src": "https://github.com/MeanderingProgrammer/render-markdown.nvim"
|
"src": "https://github.com/MeanderingProgrammer/render-markdown.nvim"
|
||||||
},
|
},
|
||||||
"rose-pine": {
|
"rose-pine": {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue