chore(nvim): plugin changes, new keymaps, augroup

This commit is contained in:
2024-11-28 02:50:07 +02:00
parent 823cdbc07f
commit 6b056f6072
5 changed files with 42 additions and 14 deletions

View File

@@ -68,4 +68,10 @@ vim.api.nvim_create_autocmd({ 'FileType' }, {
callback = function() vim.opt_local.conceallevel = 0 end,
})
vim.api.nvim_create_autocmd({ 'BufRead', 'BufNewFile' }, {
desc = 'Set filetype for SSH config directory',
pattern = '*/?.ssh/{config|shared}.d/*',
command = 'set filetype=sshconfig',
})
-- vim: ts=2 sts=2 sw=2 et

View File

@@ -16,6 +16,24 @@ return {
-- Replaced kylechui/nvim-surround
{ 'echasnovski/mini.surround', version = '*', opts = {} },
-- Move lines and blocks of text
{ 'echasnovski/mini.move', version = '*', opts = {} },
-- Jump to next/previous single character
{
'echasnovski/mini.jump',
version = '*',
opts = {
mappings = {
forward = 'f',
backward = 'F',
forward_till = 't',
backward_till = 'T',
repeat_jump = ';',
},
},
},
-- Icons
{
'echasnovski/mini.icons',
@@ -30,6 +48,9 @@ return {
},
},
-- Highlight cursor word and its matches
{ 'echasnovski/mini.cursorword', version = '*' },
-- Split and join arguments, lists, and other sequences
-- Replaced Wansmer/treesj
{ 'echasnovski/mini.splitjoin', version = '*', opts = {} },

View File

@@ -4,7 +4,6 @@ return {
'kevinhwang91/nvim-ufo',
version = '*',
dependencies = {
{ 'neovim/nvim-lspconfig' },
{ 'kevinhwang91/promise-async' },
{ 'nvim-treesitter/nvim-treesitter' },
{
@@ -61,19 +60,6 @@ return {
},
},
config = function()
local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities.textDocument.foldingRange = {
dynamicRegistration = true,
lineFoldingOnly = true,
}
local language_servers = require('lspconfig').util.available_servers() -- or list servers manually like {'gopls', 'clangd'}
for _, ls in ipairs(language_servers) do
require('lspconfig')[ls].setup {
capabilities = capabilities,
-- you can add other fields for setting up lsp server in this table
}
end
require('ufo').setup {
open_fold_hl_timeout = 150,
close_fold_kinds_for_ft = { 'imports', 'comment' },

View File

@@ -27,6 +27,10 @@ return {
},
},
-- Neovim plugin to animate the cursor with a smear effect in all terminals
-- https://github.com/sphamba/smear-cursor.nvim
{ 'sphamba/smear-cursor.nvim', opts = {} },
-- A neovim plugin that shows colorcolumn dynamically
-- https://github.com/Bekaboo/deadcolumn.nvim
{ 'Bekaboo/deadcolumn.nvim' },

View File

@@ -140,6 +140,12 @@ return {
desc = 'Telescope import',
},
{
'<leader>f',
'<cmd>Telescope find_files<cr>',
desc = 'Find files',
},
-- ── Harpoon ─────────────────────────────────────────────────────────
-- See: lua/plugins/telescope.lua
{ '<leader>h', group = '[h] Harpoon' },
@@ -298,6 +304,11 @@ return {
'<cmd>TransparentToggle<CR>',
desc = 'Toggle Transparency',
},
{
'<leader>tl',
'<cmd>exec &bg=="light"? "set bg=dark" : "set bg=light"<CR>',
desc = 'Toggle Light/Dark Theme',
},
},
-- ── Workspace ───────────────────────────────────────────────────────