Add treesitter
This commit is contained in:
23
init.lua
23
init.lua
@@ -78,6 +78,7 @@ vim.diagnostic.config({
|
||||
})
|
||||
|
||||
vim.keymap.set("n", "<leader>q", vim.diagnostic.setloclist, { desc = "Open diagnostic [Q]uickfix list" })
|
||||
vim.keymap.set("n", "<leader>so", "<CMD>so<CR>")
|
||||
|
||||
vim.keymap.set("t", "<Esc><Esc>", "<C-\\><C-n>", { desc = "Exit terminal mode" })
|
||||
vim.keymap.set("n", "K", function()
|
||||
@@ -98,6 +99,9 @@ vim.pack.add({
|
||||
github .. "neogitorg/neogit",
|
||||
github .. "stevearc/conform.nvim",
|
||||
{ src = github .. "saghen/blink.cmp", version = vim.version.range("v1.*") },
|
||||
github .. "tjdevries/colorbuddy.nvim",
|
||||
github .. "hgranthorner/ghosttybuddy.nvim",
|
||||
github .. "nvim-treesitter/nvim-treesitter",
|
||||
})
|
||||
|
||||
-- Telescope
|
||||
@@ -162,3 +166,22 @@ vim.api.nvim_create_autocmd("BufWritePre", {
|
||||
|
||||
-- blink.cmp
|
||||
require("blink.cmp").setup()
|
||||
|
||||
-- ghosttybuddy
|
||||
vim.cmd.colorscheme("ghostty")
|
||||
|
||||
-- nvim-treesitter
|
||||
local langs = { "rust", "javascript", "zig", "lua", "vim", "vimdoc" }
|
||||
require("nvim-treesitter").install(langs)
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = langs,
|
||||
callback = function()
|
||||
-- syntax highlighting, provided by Neovim
|
||||
vim.treesitter.start()
|
||||
-- folds, provided by Neovim
|
||||
vim.wo.foldexpr = "v:lua.vim.treesitter.foldexpr()"
|
||||
vim.wo.foldmethod = "expr"
|
||||
-- indentation, provided by nvim-treesitter
|
||||
vim.bo.indentexpr = "v:lua.require'nvim-treesitter'.indentexpr()"
|
||||
end,
|
||||
})
|
||||
|
||||
@@ -5,10 +5,18 @@
|
||||
"src": "https://github.com/saghen/blink.cmp",
|
||||
"version": "1.0.0 - 2.0.0"
|
||||
},
|
||||
"colorbuddy.nvim": {
|
||||
"rev": "8b968581e5c19d22a861d5f3fe5dbd83394fa681",
|
||||
"src": "https://github.com/tjdevries/colorbuddy.nvim"
|
||||
},
|
||||
"conform.nvim": {
|
||||
"rev": "086a40dc7ed8242c03be9f47fbcee68699cc2395",
|
||||
"src": "https://github.com/stevearc/conform.nvim"
|
||||
},
|
||||
"ghosttybuddy.nvim": {
|
||||
"rev": "1aea43228171a123424559002e13a2310c25ec0e",
|
||||
"src": "https://github.com/hgranthorner/ghosttybuddy.nvim"
|
||||
},
|
||||
"gitsigns.nvim": {
|
||||
"rev": "50c205548d8b037b7ff6378fca6d21146f0b6161",
|
||||
"src": "https://github.com/lewis6991/gitsigns.nvim"
|
||||
@@ -25,6 +33,10 @@
|
||||
"rev": "16812abf0e8d8175155f26143a8504e8253e92b0",
|
||||
"src": "https://github.com/neovim/nvim-lspconfig"
|
||||
},
|
||||
"nvim-treesitter": {
|
||||
"rev": "7caec274fd19c12b55902a5b795100d21531391f",
|
||||
"src": "https://github.com/nvim-treesitter/nvim-treesitter"
|
||||
},
|
||||
"oil.nvim": {
|
||||
"rev": "0fcc83805ad11cf714a949c98c605ed717e0b83e",
|
||||
"src": "https://github.com/stevearc/oil.nvim"
|
||||
|
||||
Reference in New Issue
Block a user