From 469cb3c87462678880cbe03ff4cb94c340064744 Mon Sep 17 00:00:00 2001 From: RiverMatsumoto Date: Thu, 1 Jan 2026 02:08:36 -1000 Subject: [PATCH] tab options --- init.lua | 51 ++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 38 insertions(+), 13 deletions(-) diff --git a/init.lua b/init.lua index 7f44a6d9..9d523303 100644 --- a/init.lua +++ b/init.lua @@ -37,6 +37,23 @@ require('lazy').setup({ 'nvim-treesitter/nvim-treesitter', lazy = false, build = ':TSUpdate', + opts = { + ensure_installed = { + 'lua', + 'rust', + 'python', + 'javascript', + 'typescript', + 'c', + 'c_sharp', + 'cpp', + 'bash', + 'json', + 'yaml', + 'toml', + }, + highlight = { enable = true }, + }, }, { @@ -220,9 +237,15 @@ require('lazy').setup({ dependencies = 'nvim-tree/nvim-web-devicons', opts = { options = { + mode = 'buffers', -- tabs or buffers diagnostics = 'nvim_lsp', show_buffer_close_icons = false, show_close_icon = false, + hover = { + enabled = true, + delay = 200, + reveal = {'close'} + }, }, }, }, @@ -934,7 +957,7 @@ local smear = require 'smear_cursor' local smear_profiles = { silver_blade = { -- General - cursor_color = "#ffe6b2", + cursor_color = '#ffe6b2', smear_between_buffers = true, smear_between_neighbor_lines = true, min_horizontal_distance_smear = 0, @@ -1116,7 +1139,6 @@ local smear_profiles = { particle_switch_octant_braille = 0.3, particles_over_text = false, }, - } local smear_profile_order = { @@ -1208,19 +1230,23 @@ local function set_indent(ts) vim.opt_local.softtabstop = ts end -vim.api.nvim_create_autocmd("FileType", { - pattern = { "lua", "javascript", "typescript", "tsx", "json", "yaml", "toml", "html", "css", "rust", "c", "cpp" }, - callback = function() set_indent(2) end, +vim.api.nvim_create_autocmd('FileType', { + pattern = { 'lua', 'javascript', 'typescript', 'tsx', 'json', 'yaml', 'toml', 'html', 'css', 'rust', 'c', 'cpp' }, + callback = function() + set_indent(2) + end, }) -vim.api.nvim_create_autocmd("FileType", { - pattern = { "python", "sh", "bash", "zsh", "go" }, - callback = function() set_indent(4) end, +vim.api.nvim_create_autocmd('FileType', { + pattern = { 'python', 'sh', 'bash', 'zsh', 'go' }, + callback = function() + set_indent(4) + end, }) -- Makefiles must use real tabs -vim.api.nvim_create_autocmd("FileType", { - pattern = { "make" }, +vim.api.nvim_create_autocmd('FileType', { + pattern = { 'make' }, callback = function() vim.opt_local.expandtab = false vim.opt_local.tabstop = 8 @@ -1402,9 +1428,6 @@ vim.keymap.set({ 'i', 'c' }, '', '', { noremap = true, desc = 'Delete vim.keymap.set('n', '', 'BufferLineCycleNext', { desc = 'Go to next tab' }) vim.keymap.set('n', '', 'BufferLineCyclePrev', { desc = 'Go backwards a tab' }) --- install treesitter parsers -require('nvim-treesitter').install { 'c', 'rust' } - vim.keymap.set('n', 'tc', ':tabclose', { desc = 'Close current tab' }) vim.keymap.set('n', 'fk', ':FloatermKill!', { desc = 'Kill all floaterm terminals' }) vim.keymap.set('x', 'S', '(nvim-surround-visual)', { remap = true }, { desc = 'Surround selected text' }) @@ -1453,3 +1476,5 @@ vim.api.nvim_set_keymap('i', '', '', { noremap = true }) -- git coauthors vim.keymap.set('n', 'ga', ':Telescope coauthors') +-- install treesitter parsers +require('nvim-treesitter').install { 'c', 'rust', 'gdscript', 'c#' }