diff --git a/.config/nvim/lua/options.lua b/.config/nvim/lua/options.lua index dc9d30b..7a5de1e 100644 --- a/.config/nvim/lua/options.lua +++ b/.config/nvim/lua/options.lua @@ -7,9 +7,9 @@ vim.opt.relativenumber = true -- juicy relativity vim.opt.autoindent = true vim.opt.smartindent = true -vim.opt.tabstop = 4 -vim.opt.softtabstop = 4 -vim.opt.shiftwidth = 4 +vim.opt.tabstop = 2 +vim.opt.softtabstop = 2 +vim.opt.shiftwidth = 2 vim.opt.expandtab = true vim.opt.smarttab = true vim.opt.breakindent = true diff --git a/.config/nvim/lua/plugins/treesitter.lua b/.config/nvim/lua/plugins/treesitter.lua index 66e8714..fff4f45 100644 --- a/.config/nvim/lua/plugins/treesitter.lua +++ b/.config/nvim/lua/plugins/treesitter.lua @@ -1,86 +1,86 @@ return { - 'nvim-treesitter/nvim-treesitter', - build = ":TSUpdate", - event = { - "BufReadPost", - "BufNewFile" - }, - dependencies = { - "nvim-treesitter/nvim-treesitter-textobjects", - }, - config = function() - local treesitter = require("nvim-treesitter.configs") + 'nvim-treesitter/nvim-treesitter', + build = ":TSUpdate", + event = { + "BufReadPost", + "BufNewFile" + }, + dependencies = { + "nvim-treesitter/nvim-treesitter-textobjects", + }, + config = function() + local treesitter = require("nvim-treesitter.configs") - treesitter.setup { - -- A list of parser names, or "all" - ensure_installed = { "vimdoc", "javascript", "typescript", "c", "lua", "rust" }, - -- Install parsers synchronously (only applied to `ensure_installed`) - sync_install = false, - -- Automatically install missing parsers when entering buffer - auto_install = true, - indent = { - enable = false, - }, - highlight = { - enable = true, - additional_vim_regex_highlighting = true, - }, - context_commentstring = { - enable = true, - }, - incremental_selection = { - enable = true, - keymaps = { - init_selection = 'c', - node_incremental = "", - scope_incremental = "", - node_decremental = "" - } - }, - textobjects = { - select = { - enable = true, - lookahead = true, -- Automatically jump forward to textobj, similar to targets.vim - keymaps = { - -- You can use the capture groups defined in textobjects.scm - ['aa'] = '@parameter.outer', - ['ia'] = '@parameter.inner', - ['af'] = '@function.outer', - ['if'] = '@function.inner', - ['ac'] = '@class.outer', - ['ic'] = '@class.inner', - }, - }, - move = { - enable = true, - set_jumps = true, -- whether to set jumps in the jumplist - goto_next_start = { - [']m'] = '@function.outer', - [']]'] = '@class.outer', - }, - goto_next_end = { - [']M'] = '@function.outer', - [']['] = '@class.outer', - }, - goto_previous_start = { - ['[m'] = '@function.outer', - ['[['] = '@class.outer', - }, - goto_previous_end = { - ['[M'] = '@function.outer', - ['[]'] = '@class.outer', - }, - }, - swap = { - enable = true, - swap_next = { - [']'] = '@parameter.inner', - }, - swap_previous = { - ['['] = '@parameter.inner', - }, - }, - }, + treesitter.setup { + -- A list of parser names, or "all" + ensure_installed = { "vimdoc", "javascript", "typescript", "c", "lua", "rust" }, + -- Install parsers synchronously (only applied to `ensure_installed`) + sync_install = false, + -- Automatically install missing parsers when entering buffer + auto_install = true, + indent = { + enable = true, + }, + highlight = { + enable = true, + additional_vim_regex_highlighting = true, + }, + context_commentstring = { + enable = true, + }, + incremental_selection = { + enable = true, + keymaps = { + init_selection = 'c', + node_incremental = "", + scope_incremental = "", + node_decremental = "" } - end + }, + textobjects = { + select = { + enable = true, + lookahead = true, -- Automatically jump forward to textobj, similar to targets.vim + keymaps = { + -- You can use the capture groups defined in textobjects.scm + ['aa'] = '@parameter.outer', + ['ia'] = '@parameter.inner', + ['af'] = '@function.outer', + ['if'] = '@function.inner', + ['ac'] = '@class.outer', + ['ic'] = '@class.inner', + }, + }, + move = { + enable = true, + set_jumps = true, -- whether to set jumps in the jumplist + goto_next_start = { + [']m'] = '@function.outer', + [']]'] = '@class.outer', + }, + goto_next_end = { + [']M'] = '@function.outer', + [']['] = '@class.outer', + }, + goto_previous_start = { + ['[m'] = '@function.outer', + ['[['] = '@class.outer', + }, + goto_previous_end = { + ['[M'] = '@function.outer', + ['[]'] = '@class.outer', + }, + }, + swap = { + enable = true, + swap_next = { + [']'] = '@parameter.inner', + }, + swap_previous = { + ['['] = '@parameter.inner', + }, + }, + }, + } + end }