This commit is contained in:
2025-09-07 11:18:48 +02:00
parent 6132b60ca3
commit 1c933f1054
15 changed files with 206 additions and 54 deletions

View File

@@ -40,6 +40,7 @@ return {
lua = { 'stylua' },
-- Conform can also run multiple formatters sequentially
python = { 'isort', 'black' },
tex = { 'tex-fmt' },
--
-- You can use 'stop_after_first' to run the first available formatter from the list
-- javascript = { "prettierd", "prettier", stop_after_first = true },

View File

@@ -0,0 +1,20 @@
-- bbye
--
-- Bbye allows you to do delete buffers (close files) without closing your windows or messing up your layout.
--
-- https://github.com/moll/vim-bbye
--
return {
{
'moll/vim-bbye',
keys = {
{ '<leader>bc', '<CMD>Bdelete<CR>', desc = '[c]lose current buffer' },
{
'<leader>bC',
'<CMD>bufdo :Bdelete<CR>',
desc = '[C]lose all buffers',
},
},
},
}

View File

@@ -0,0 +1,32 @@
-- better-escape
--
-- A lot of people have mappings like jk or jj to escape insert mode.
-- The problem with this mappings is that whenever you type a j,
-- neovim wait about 100-500ms (depending on your timeoutlen) to see,
-- if you type a j or a k because these are mapped.
-- Only after that time the j will be inserted.
-- Then you always get a delay when typing a j.
--
-- https://github.com/max397574/better-escape.nvim
--
return {
{
'max397574/better-escape.nvim',
config = function()
require('better_escape').setup {
timeout = vim.o.timeoutlen, -- after `timeout` passes, you can press the escape key and the plugin will ignore it
default_mappings = false, -- setting this to false removes all the default mappings
mappings = {
-- i for insert
i = {
j = {
-- These can all also be functions
j = '<Esc>',
},
},
},
}
end,
},
}

View File

@@ -0,0 +1,12 @@
-- colorizer
--
-- A high-performance color highlighter for Neovim which has no external dependencies! Written in performant Luajit.
--
-- https://github.com/norcalli/nvim-colorizer.lua
--
return {
{
'norcalli/nvim-colorizer.lua',
},
}

View File

@@ -46,48 +46,48 @@ return {
},
{ ft = 'spectre_panel', size = { height = 0.4 } },
},
left = {
-- Neo-tree filesystem always takes half the screen height
{
title = 'Neo-Tree',
ft = 'neo-tree',
filter = function(buf)
return vim.b[buf].neo_tree_source == 'filesystem'
end,
size = { height = 0.5 },
},
{
title = 'Neo-Tree Git',
ft = 'neo-tree',
filter = function(buf)
return vim.b[buf].neo_tree_source == 'git_status'
end,
pinned = true,
collapsed = true, -- show window as closed/collapsed on start
open = 'Neotree position=right git_status',
},
{
title = 'Neo-Tree Buffers',
ft = 'neo-tree',
filter = function(buf)
return vim.b[buf].neo_tree_source == 'buffers'
end,
pinned = true,
collapsed = true, -- show window as closed/collapsed on start
open = 'Neotree position=top buffers',
},
{
title = function()
local buf_name = vim.api.nvim_buf_get_name(0) or '[No Name]'
return vim.fn.fnamemodify(buf_name, ':t')
end,
ft = 'Outline',
pinned = true,
open = 'SymbolsOutlineOpen',
},
-- any other neo-tree windows
'neo-tree',
},
-- left = {
-- -- Neo-tree filesystem always takes half the screen height
-- {
-- title = 'Neo-Tree',
-- ft = 'neo-tree',
-- filter = function(buf)
-- return vim.b[buf].neo_tree_source == 'filesystem'
-- end,
-- size = { height = 0.5 },
-- },
-- {
-- title = 'Neo-Tree Git',
-- ft = 'neo-tree',
-- filter = function(buf)
-- return vim.b[buf].neo_tree_source == 'git_status'
-- end,
-- pinned = true,
-- collapsed = true, -- show window as closed/collapsed on start
-- open = 'Neotree position=right git_status',
-- },
-- {
-- title = 'Neo-Tree Buffers',
-- ft = 'neo-tree',
-- filter = function(buf)
-- return vim.b[buf].neo_tree_source == 'buffers'
-- end,
-- pinned = true,
-- collapsed = true, -- show window as closed/collapsed on start
-- open = 'Neotree position=top buffers',
-- },
-- {
-- title = function()
-- local buf_name = vim.api.nvim_buf_get_name(0) or '[No Name]'
-- return vim.fn.fnamemodify(buf_name, ':t')
-- end,
-- ft = 'Outline',
-- pinned = true,
-- open = 'SymbolsOutlineOpen',
-- },
-- -- any other neo-tree windows
-- 'neo-tree',
-- },
},
},
}

View File

@@ -15,8 +15,8 @@ return {
vim.g.vimtex_mappings_disable = { ['n'] = { 'K' } } -- disable `K` as it conflicts with LSP hover
vim.g.vimtex_quickfix_method = vim.fn.executable 'pplatex' == 1 and 'pplatex' or 'latexlog'
end,
keys = {
{ '<localLeader>l', '', desc = 'LaTeX', ft = 'tex' },
},
-- keys = {
-- { '<localLeader>l', '', desc = 'LaTeX', ft = 'tex' },
-- },
},
}

View File

@@ -18,6 +18,7 @@ return {
local lint = require 'lint'
lint.linters_by_ft = {
markdown = { 'markdownlint' },
tex = { 'lacheck' },
}
-- To allow other plugins to add linters to require('lint').linters_by_ft,

View File

@@ -266,6 +266,7 @@ return {
local ensure_installed = vim.tbl_keys(servers or {})
vim.list_extend(ensure_installed, {
'stylua', -- Used to format Lua code
'tex-fmt',
})
require('mason-tool-installer').setup { ensure_installed = ensure_installed }

View File

@@ -100,9 +100,9 @@ return {
},
}
-- Buffer removing (unshow, delete, wipeout), which saves window layout
local bufremove = require 'mini.bufremove'
bufremove.setup {}
-- -- Buffer removing (unshow, delete, wipeout), which saves window layout
-- local bufremove = require 'mini.bufremove'
-- bufremove.setup {}
local icons = require 'mini.icons'
icons.setup {

View File

@@ -0,0 +1,14 @@
-- suda
--
-- Neovim plugin for seamless sudo file editing with permissions preservation.
--
-- https://github.com/masajinobe-ef/suda.nvim
--
return {
'masajinobe-ef/suda.nvim',
config = function()
require('suda').setup {}
end,
opts = {},
}

View File

@@ -14,7 +14,23 @@ return {
main = 'nvim-treesitter.configs', -- Sets main module to use for opts
-- [[ Configure Treesitter ]] See `:help nvim-treesitter`
opts = {
ensure_installed = { 'bash', 'c', 'diff', 'html', 'latex', 'lua', 'luadoc', 'markdown', 'markdown_inline', 'query', 'r', 'vim', 'vimdoc', 'yaml' },
ensure_installed = {
'bash',
'c',
'diff',
'html',
'hyprlang',
'latex',
'lua',
'luadoc',
'markdown',
'markdown_inline',
'query',
'r',
'vim',
'vimdoc',
'yaml',
},
-- Autoinstall languages that are not installed
auto_install = true,
highlight = {