Neovim: Treesitter, indent config

This commit is contained in:
Mateusz Słodkowicz 2026-03-21 20:46:29 +01:00
parent a0af6e0844
commit 6db3e9995c
Signed by: materus
SSH Key Fingerprint: SHA256:rzVduzTiiszuYfLPYD0SDZV+g8lxhpcRgpbOZA1X0Uo

View File

@ -1,8 +1,8 @@
vim.opt.number = true vim.opt.number = true
vim.opt.expandtab = true vim.opt.expandtab = true
vim.opt.shiftwidth = 4 vim.opt.shiftwidth = 2
vim.opt.softtabstop = 4 vim.opt.softtabstop = 2
vim.opt.tabstop = 4 vim.opt.tabstop = 2
vim.opt.clipboard:append { 'unnamed', 'unnamedplus' } vim.opt.clipboard:append { 'unnamed', 'unnamedplus' }
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
@ -33,7 +33,18 @@ if vim.fn.executable("git") == 1 then
dependencies = {"nvim-tree/nvim-web-devicons","lewis6991/gitsigns.nvim"} dependencies = {"nvim-tree/nvim-web-devicons","lewis6991/gitsigns.nvim"}
}, },
{
'nvim-telescope/telescope.nvim', version = '*',
dependencies = {
'nvim-lua/plenary.nvim',
}
},
{
'nvim-treesitter/nvim-treesitter',
lazy = false,
build = ':TSUpdate'
},
--[[ --[[
{ {
"kevinhwang91/nvim-ufo", "kevinhwang91/nvim-ufo",
@ -43,5 +54,14 @@ if vim.fn.executable("git") == 1 then
} }
require("lazy").setup(plugins, opts) require("lazy").setup(plugins, opts)
if vim.fn.executable("tree-sitter") == 1 then
require('nvim-treesitter').setup {
-- Directory to install parsers and queries to (prepended to `runtimepath` to have priority)
install_dir = vim.fn.stdpath('data') .. '/site',
highlight = {enable = true},
indent = { enable = true},
}
require('nvim-treesitter').install { 'lua' }
end
vim.cmd [[colorscheme dracula]] vim.cmd [[colorscheme dracula]]
end end