lol huge updates

This commit is contained in:
sankalp committed 2024-08-16 02:51:57 +05:45
1 parent c9d290595f
commit a2b0f73e33
55 files changed
+1259 -290

No files matched your search

+73
View File
@@ -0,0 +1,73 @@
local fn = vim.fn
local api = vim.api
local ns_id = vim.api.nvim_create_namespace('md-codeblaock')
local M = {}
vim.cmd([[
hi DError guibg=#2F1D29 guifg=#EB4838
hi DBError guibg=#2F1D29
hi DWarn guibg=#322425 guifg=#FA9535
hi DBWarn guibg=#322425
]])
function get_hl_group_bg_color(hl_group)
local hl_info = vim.api.nvim_get_hl_by_name(hl_group, true)
if hl_info and hl_info.background then
local bg_color = string.format('#%06x', hl_info.background)
return bg_color
else
return nil
end
end
function hl_line(bufnr, line, hl, vtext)
local text = string.rep(' ', fn.winwidth(fn.bufwinnr(bufnr)))
local opts = {
virt_text = { { ' ' .. vtext .. text, hl.vig } },
hl_eol = true,
virt_text_pos = 'overlay',
}
api.nvim_buf_add_highlight(bufnr, ns_id, hl.gui, line, 0, -1)
pcall(api.nvim_buf_set_extmark, bufnr, ns_id, line, fn.len(fn.getline(line + 1)), opts)
end
function show_diag(bufnr, level, message, lnum)
local hl = {
[1] = {
gui = 'DBError',
vig = 'DError',
},
[2] = {
gui = 'DBWarn',
vig = 'DWarn',
},
[3] = {
gui = 'DBWarn',
vig = 'DWarn',
},
[4] = {
gui = 'DBWarn',
vig = 'DWarn',
},
[5] = {
gui = 'DBWarn',
vig = 'DWarn',
},
}
hl_line(bufnr, lnum, hl[level], message)
end
vim.lsp.handlers['textDocument/publishDiagnostics'] = function(_, result, ctx, _)
if not result.diagnostics then
return
end
local bufnr = vim.uri_to_bufnr(result.uri)
vim.api.nvim_buf_clear_namespace(bufnr, ns_id, 0, -1)
for _, diagnostic in ipairs(result.diagnostics) do
local line = diagnostic.range.start.line
local severity = diagnostic.severity
local message = diagnostic.message
show_diag(bufnr, severity, message, line)
end
end
return M
+21 -11
View File
@@ -1,5 +1,3 @@
local opts = { noremap = true, silent = true }
-- Increment / Decrement
vim.keymap.set('n', '+', '<C-a>')
vim.keymap.set('n', '-', '<C-x>')
@@ -11,8 +9,14 @@ vim.keymap.set('n', '<C-a>', 'gg<S-v>G')
vim.keymap.set('x', '<leader>p', '"_dP')
-- Delete without yanking
vim.keymap.set('n', '<leader>d', '"_d')
vim.keymap.set('v', '<leader>d', '"_d')
vim.keymap.set('n', '<leader>d', '"_d', { desc = 'Delete highlighted text' })
vim.keymap.set('v', '<leader>d', '"_d', { desc = 'Delete highlighted text' })
-- save file
vim.keymap.set('n', '<leader>w', ':w<CR>', { desc = 'Save file' })
-- save and quit
vim.keymap.set('n', '<leader>Q', '<cmd>wq!<CR>', { desc = 'Force save and quit' })
-- Clear highlights on search when pressing <Esc> in normal mode
vim.keymap.set('n', '<Esc>', '<cmd>nohlsearch<CR>')
@@ -25,10 +29,14 @@ vim.keymap.set('n', '<A-Right>', '<cmd>vertical resize +2<cr>', { desc = 'Increa
-- Visual vim.keymap.sets
vim.keymap.set('v', '<leader>r', '"hy:%s/<C-r>h//g<left><left>') -- Replace all instances of highlighted words
vim.keymap.set('v', '<C-s>', ':sort<CR>') -- Sort highlighted text in visual mode with Control+S
vim.keymap.set('v', '<A-s>', ':sort<CR>') -- Sort highlighted text in visual mode with Control+S
vim.keymap.set('v', 'K', ":m '>-2<CR>gv=gv") -- Move current line up
vim.keymap.set('v', 'J', ":m '>+1<CR>gv=gv") -- Move current line down
-- for buffers
vim.api.nvim_set_keymap('n', '<Tab>', ':bnext<CR>', { noremap = true, silent = true })
vim.api.nvim_set_keymap('n', '<S-Tab>', ':bprev<CR>', { noremap = true, silent = true })
--utility vim.keymap.setpings
vim.keymap.set('n', 'n', 'nzzzv') -- keep the cursor centered when doing 'n'
vim.keymap.set('n', 'N', 'Nzzzv') -- keep the cursor centered when doing 'N'
@@ -46,8 +54,8 @@ vim.keymap.set({ 'i' }, '<C-l>', '<Right>', { desc = 'Move cursor to right' })
vim.keymap.set({ 'i' }, '<C-h>', '<Left>', { desc = 'Move cursor to right' })
-- Better window management
vim.keymap.set('n', 'hs', ':split<Return>', opts)
vim.keymap.set('n', 'vs', ':vsplit<Return>', opts)
vim.keymap.set('n', 'vs', ':vsp<CR>', { noremap = true, silent = true })
vim.keymap.set('n', 'hs', ':sp<CR>', { noremap = true, silent = true })
vim.keymap.set('n', '<C-h>', '<C-w>h', { desc = 'Move to left split' })
vim.keymap.set('n', '<C-j>', '<C-w>j', { desc = 'Move to below split' })
vim.keymap.set('n', '<C-k>', '<C-w>k', { desc = 'Move to above split' })
@@ -61,8 +69,13 @@ vim.keymap.set('n', '<A-Right>', '<cmd>vertical resize +2<CR>', { desc = 'Resize
vim.keymap.set('v', '<', '<gv', { desc = '(V) Indent to left' })
vim.keymap.set('v', '>', '>gv', { desc = '(V) Indent to right' })
vim.keymap.set('n', '<Leader>lo', '<cmd>lopen<CR>', { desc = 'Open location list' })
vim.keymap.set('n', '<Leader>lc', '<cmd>lclose<CR>', { desc = 'Close location list' })
vim.keymap.set('n', '<Leader>ln', '<cmd>lnext<CR>', { desc = 'Next location list item' })
vim.keymap.set('n', '<Leader>lp', '<cmd>lprev<CR>', { desc = 'Previous location list item' })
-- insert semicolon in the end
-- vim.keymap.set('i', '<A-;>', '<Esc>miA;<Esc>`ii', { desc = 'insert semicolon in the end' })
vim.keymap.set('i', '<A-;>', '<Esc>miA;<Esc>`ii', { desc = 'insert semicolon in the end' })
-- Change text without putting it into the vim register,
vim.keymap.set({ 'n', 'x' }, 'c', '"_c', { desc = 'Change without yanking' })
@@ -79,6 +92,3 @@ vim.keymap.set('i', 'jj', '<ESC>')
vim.keymap.set('t', 'jk', '<C-\\><C-n>')
vim.keymap.set('t', 'kj', '<C-\\><C-n>')
vim.keymap.set('t', '<ESC>', '<C-\\><C-n>')
-- save file
vim.keymap.set({ 'i', 'v', 'n', 's' }, '<A-s>', '<cmd>wa<cr><esc>', { desc = 'Save all file' })
-1
View File
@@ -19,7 +19,6 @@ vim.opt.rtp:prepend(lazypath)
require('lazy').setup({
spec = {
{ import = 'plugins' },
-- { import = 'plugins.themes' },
},
install = {
missing = true,
+1 -1
View File
@@ -44,7 +44,7 @@ return {
end
dashboard.section.buttons.val = {
dashboard.button('n', '' .. ' New File', '<cmd>ene<CR>'),
dashboard.button('spc e', '' .. ' File Tree', ':Neotree toggle left<CR>'),
dashboard.button('e', '' .. ' File Tree', ':Telescope file_browser <CR>'),
dashboard.button('f', '' .. ' Find files', ':Telescope find_files <CR>'),
dashboard.button('o', '' .. ' Recent files', ':Telescope oldfiles <CR>'),
dashboard.button('l', '󰒲 ' .. ' Lazy', ':Lazy <CR>'),
+1
View File
@@ -2,6 +2,7 @@
return {
'windwp/nvim-autopairs',
event = 'InsertEnter',
enabled = false,
config = function(_, opts)
require('nvim-autopairs').setup(opts)
+40
View File
@@ -0,0 +1,40 @@
return {
'utilyre/barbecue.nvim',
name = 'barbecue',
version = '*',
event = { 'BufReadPost', 'BufAdd', 'BufNewFile' },
dependencies = {
'SmiteshP/nvim-navic',
'nvim-tree/nvim-web-devicons', -- optional dependency
},
opts = {},
keys = {
{
'<leader>bq',
function()
require('barbecue.ui').toggle()
end,
desc = 'toggle barbecue',
},
},
config = function()
require('barbecue').setup({
create_autocmd = false, -- prevent barbecue from updating itself automatically
})
vim.api.nvim_create_autocmd({
'WinScrolled', -- or WinResized on NVIM-v0.9 and higher
'BufWinEnter',
'CursorHold',
'InsertLeave',
-- include this if you have set `show_modified` to `true`
-- "BufModifiedSet",
}, {
group = vim.api.nvim_create_augroup('barbecue.updater', {}),
callback = function()
require('barbecue.ui').update()
end,
})
end,
}
-37
View File
@@ -1,37 +0,0 @@
return {
'akinsho/bufferline.nvim',
event = { 'BufReadPost', 'BufAdd', 'BufNewFile' },
version = '*',
dependencies = 'nvim-tree/nvim-web-devicons',
keys = {
{ '<tab>', '<cmd>BufferLineCycleNext<CR>', desc = 'Next Buffer' },
{ '<S-tab>', '<cmd>BufferLineCyclePrev<CR>', desc = 'Previous Buffer' },
},
opts = {
options = {
debug = { logging = true },
mode = 'buffers',
indicator = { icon = '▍', style = 'none' },
sort_by = 'insert_after_current',
move_wraps_at_ends = true,
right_mouse_command = 'vert sbuffer %d',
show_close_icon = false,
show_buffer_close_icons = false,
diagnostics = 'nvim_lsp',
diagnostics_indicator = function(count, level)
local icon = level:match('error') and '' or ''
return ' ' .. icon .. count
end,
diagnostics_update_in_insert = false,
hover = { enabled = true, reveal = { 'close' } },
offsets = {
{
filetype = 'neo-tree',
text = ' File Explorer',
highlight = 'Directory',
separator = false,
},
},
},
},
}
+82
View File
@@ -0,0 +1,82 @@
return {
'willothy/nvim-cokeline',
dependencies = {
'nvim-lua/plenary.nvim', -- Required for v0.4.0+
'nvim-tree/nvim-web-devicons', -- If you want devicons
'stevearc/resession.nvim', -- Optional, for persistent history
},
config = function()
local get_hex = require('cokeline.hlgroups').get_hl_attr
local yellow = vim.g.terminal_color_3
require('cokeline').setup({
default_hl = {
fg = function(buffer)
return buffer.is_focused and get_hex('Normal', 'fg') or get_hex('Comment', 'fg')
end,
bg = function()
return get_hex('ColorColumn', 'bg')
end,
},
sidebar = {
filetype = { 'NvimTree', 'neo-tree' },
components = {
{
text = function(buf)
-- Center the text by adding padding spaces
local total_width = vim.api.nvim_win_get_width(0)
local padding = math.floor((total_width - #buf.filetype) / 2)
return string.rep(' ', padding) .. buf.filetype .. string.rep(' ', padding)
end,
fg = yellow,
bg = function()
return get_hex('NvimTreeNormal', 'bg')
end,
bold = true,
},
},
},
components = {
{
text = function(buffer)
return (buffer.index ~= 1) and '▏' or ''
end,
},
{
text = ' ',
},
{
text = function(buffer)
return buffer.devicon.icon
end,
fg = function(buffer)
return buffer.devicon.color
end,
},
{
text = ' ',
},
{
text = function(buffer)
return buffer.filename .. ' '
end,
bold = function(buffer)
return buffer.is_focused
end,
},
{
text = '',
on_click = function(_, _, _, _, buffer)
buffer:delete()
end,
},
{
text = ' ',
},
},
})
end,
}
-30
View File
@@ -1,30 +0,0 @@
return {
'navarasu/onedark.nvim',
lazy = false,
priority = 1000,
config = function()
local onedark = require('onedark')
onedark.setup({
style = 'deep',
transparent = true,
term_colors = false,
ending_tildes = false,
cmp_itemkind_reverse = false,
-- toggle_style_key = '<leader>ot',
-- toggle_style_list = { 'dark', 'darker', 'cool', 'warm', 'warmer', 'deep', 'light' },
-- Options are italic, bold, underline, none and combos 'italic,bold'
code_style = {
comments = 'italic',
keywords = 'none',
functions = 'none',
strings = 'none',
variables = 'none',
},
lualine = { transparent = true },
diagnostics = { darker = true, undercurl = true, background = false },
})
onedark.load()
end,
}
-10
View File
@@ -1,10 +0,0 @@
return {
{
'echasnovski/mini.comment',
version = false,
event = { 'BufReadPost', 'BufNewFile' },
config = function()
require('mini.comment').setup()
end,
},
}
+6 -3
View File
@@ -1,7 +1,7 @@
-- configure autocomplete
return {
'hrsh7th/nvim-cmp',
event = { 'InsertEnter', 'CmdlineEnter' },
event = { 'InsertEnter' },
dependencies = {
-- autocomplete plugins
'hrsh7th/cmp-buffer',
@@ -17,7 +17,6 @@ return {
'onsails/lspkind.nvim',
-- snippet plugin
{ 'L3MON4D3/LuaSnip', event = { 'BufReadPost', 'BufNewFile' } },
{ 'rafamadriz/friendly-snippets', event = { 'BufReadPost', 'BufNewFile' } },
},
config = function()
local cmp = require('cmp')
@@ -29,6 +28,10 @@ return {
keyword_length = 1,
completeopt = 'menu,menuone',
},
window = {
completion = cmp.config.window.bordered(),
documentation = cmp.config.window.bordered(),
},
formatting = {
fields = { 'kind', 'abbr', 'menu' },
format = function(entry, vim_item)
@@ -64,7 +67,7 @@ return {
{ name = 'cmdline' },
},
}),
cmp.setup.cmdline({ '/', '?' }, {
cmp.setup.cmdline('/', {
mapping = cmp.mapping.preset.cmdline(),
sources = {
{ name = 'buffer' },
+2 -29
View File
@@ -1,32 +1,5 @@
-- Neovim plugin to improve the default vim.ui interfaces
return {
'stevearc/dressing.nvim',
event = { 'BufReadPre', 'BufNewFile' },
config = function()
require('dressing').setup({
win_options = {
winblend = 10,
winhighlight =
'Normal:DressingInputNormalFloat,NormalFloat:DressingInputNormalFloat,FloatBorder:DressingInputFloatBorder',
},
input = {
enabled = true,
default_prompt = 'Input:',
prompt_align = 'left',
insert_only = true,
start_in_insert = true,
border = 'rounded',
relative = 'cursor',
prefer_width = 40,
width = nil,
max_width = { 140, 0.9 },
min_width = { 20, 0.2 },
get_config = nil,
},
select = {
enabled = true,
backend = { 'telescope', 'fzf_lua', 'fzf', 'nui', 'builtin' },
trim_prompt = true,
},
})
end,
event = 'VeryLazy',
}
+7
View File
@@ -0,0 +1,7 @@
return {
'soulis-1256/eagle.nvim',
event = { 'BufReadPre', 'BufNewFile' },
config = function()
require('eagle').setup({})
end,
}
+14
View File
@@ -0,0 +1,14 @@
return {
'folke/flash.nvim',
event = { 'CursorHold', 'CursorHoldI' },
vscode = true,
opts = {},
-- stylua: ignore
keys = {
{ "s", mode = { "n", "x", "o" }, function() require("flash").jump() end, desc = "Flash" },
{ "S", mode = { "n", "o", "x" }, function() require("flash").treesitter() end, desc = "Flash Treesitter" },
{ "r", mode = "o", function() require("flash").remote() end, desc = "Remote Flash" },
{ "R", mode = { "o", "x" }, function() require("flash").treesitter_search() end, desc = "Treesitter Search" },
{ "<c-s>", mode = { "c" }, function() require("flash").toggle() end, desc = "Toggle Flash Search" },
},
}
+10
View File
@@ -0,0 +1,10 @@
--open files in neovim without creating a nested sessions
return {
'willothy/flatten.nvim',
priority = 1001,
opts = {
window = {
open = 'alternate',
},
},
}
+3
View File
@@ -0,0 +1,3 @@
return {
'm-demare/hlargs.nvim',
}
+9
View File
@@ -0,0 +1,9 @@
return {
'ziontee113/icon-picker.nvim',
enabled = true,
cmd = { 'IconPickerInsert' },
vim.keymap.set('n', '<Leader>se', '<cmd>IconPickerInsert emoji<cr>'),
config = function()
require('icon-picker').setup({ disable_legacy_commands = true })
end,
}
+6
View File
@@ -0,0 +1,6 @@
-- Incremental rename
return {
'smjonas/inc-rename.nvim',
cmd = 'IncRename',
config = true,
}
+10
View File
@@ -0,0 +1,10 @@
return {
{
'nmac427/guess-indent.nvim',
enabled = true,
config = function()
require('guess-indent').setup({})
end,
event = 'BufReadPost',
},
}
+13
View File
@@ -0,0 +1,13 @@
return {
{
'folke/lazydev.nvim',
ft = 'lua', -- only load on lua files
cmd = 'LazyDev',
lazy = true,
event = 'LspAttach',
opts = {
library = {},
},
},
{ 'Bilal2453/luvit-meta', lazy = true }, -- optional `vim.uv` typings
}
+162 -35
View File
@@ -1,43 +1,170 @@
return {
{
'neovim/nvim-lspconfig',
event = { 'BufReadPre', 'BufNewFile' },
'neovim/nvim-lspconfig',
lazy = true,
event = { 'BufReadPre', 'BufNewFile' },
dependencies = {
'hrsh7th/cmp-nvim-lsp',
{ 'antosha417/nvim-lsp-file-operations', config = true },
},
config = function()
-- import lspconfig plugin
local lspconfig = require('lspconfig')
-- import cmp-nvim-lsp plugin
local cmp_nvim_lsp = require('cmp_nvim_lsp')
config = function()
local lspconfig = require('lspconfig')
local handlers = {
['textDocument/hover'] = vim.lsp.with(vim.lsp.handlers.hover, { border = 'rounded' }),
['textDocument/signatureHelp'] = vim.lsp.with(vim.lsp.handlers.signature_help, { border = 'rounded' }),
}
local capabilities = require('cmp_nvim_lsp').default_capabilities()
local keymap = vim.keymap -- for conciseness
lspconfig.lua_ls.setup({
settings = {
Lua = {
diagnostics = {
globals = { 'vim' },
vim.api.nvim_create_autocmd('LspAttach', {
group = vim.api.nvim_create_augroup('UserLspConfig', {}),
callback = function(ev)
-- Buffer local mappings.
-- See `:help vim.lsp.*` for documentation on any of the below functions
local opts = { buffer = ev.buf, silent = true }
-- set keybinds
opts.desc = 'Show LSP references'
keymap.set('n', 'gR', '<cmd>Telescope lsp_references<CR>', opts) -- show definition, references
opts.desc = 'Go to declaration'
keymap.set('n', 'gD', vim.lsp.buf.declaration, opts) -- go to declaration
opts.desc = 'Show LSP definitions'
keymap.set('n', 'gd', '<cmd>Telescope lsp_definitions<CR>', opts) -- show lsp definitions
opts.desc = 'Show LSP implementations'
keymap.set('n', 'gi', '<cmd>Telescope lsp_implementations<CR>', opts) -- show lsp implementations
opts.desc = 'Show LSP type definitions'
keymap.set('n', 'gt', '<cmd>Telescope lsp_type_definitions<CR>', opts) -- show lsp type definitions
opts.desc = 'See available code actions'
keymap.set({ 'n', 'v' }, '<leader>ca', vim.lsp.buf.code_action, opts) -- see available code actions, in visual mode will apply to selection
opts.desc = 'Smart rename'
keymap.set('n', '<leader>rn', vim.lsp.buf.rename, opts) -- smart rename
opts.desc = 'Show buffer diagnostics'
keymap.set('n', '<leader>D', '<cmd>Telescope diagnostics bufnr=0<CR>', opts) -- show diagnostics for file
opts.desc = 'Show line diagnostics'
keymap.set('n', '<leader>d', vim.diagnostic.open_float, opts) -- show diagnostics for line
opts.desc = 'Show documentation for what is under cursor'
keymap.set('n', 'K', vim.lsp.buf.hover, opts) -- show documentation for what is under cursor
opts.desc = 'Restart LSP'
keymap.set('n', '<leader>rs', ':LspRestart<CR>', opts) -- mapping to restart lsp if necessary
end,
})
-- used to enable autocompletion (assign to every lsp server config)
local capabilities = cmp_nvim_lsp.default_capabilities()
-- configure matlab server
lspconfig['clangd'].setup({
capabilities = capabilities,
on_attach = on_attach,
})
-- configure bash server
lspconfig['bashls'].setup({
capabilities = capabilities,
on_attach = on_attach,
})
-- configure html server
lspconfig['html'].setup({
capabilities = capabilities,
on_attach = on_attach,
})
-- configure typescript server with plugin
lspconfig['tsserver'].setup({
capabilities = capabilities,
on_attach = on_attach,
})
-- configure css server
lspconfig['cssls'].setup({
capabilities = capabilities,
on_attach = on_attach,
})
-- configure tailwindcss server
lspconfig['tailwindcss'].setup({
capabilities = capabilities,
on_attach = on_attach,
})
-- configure svelte server
lspconfig['svelte'].setup({
capabilities = capabilities,
on_attach = function(client, bufnr)
on_attach(client, bufnr)
vim.api.nvim_create_autocmd('BufWritePost', {
pattern = { '*.js', '*.ts' },
callback = function(ctx)
if client.name == 'svelte' then
client.notify('$/onDidChangeTsOrJsFile', { uri = ctx.file })
end
end,
})
end,
})
-- configure python server
lspconfig['pyright'].setup({
capabilities = capabilities,
on_attach = on_attach,
})
-- configure lua server (with special settings)
lspconfig['lua_ls'].setup({
capabilities = capabilities,
on_attach = on_attach,
settings = { -- custom settings for lua
Lua = {
-- make the language server recognize "vim" global
diagnostics = {
globals = { 'vim' },
},
workspace = {
-- make language server aware of runtime files
library = {
[vim.fn.expand('$VIMRUNTIME/lua')] = true,
[vim.fn.stdpath('config') .. '/lua'] = true,
},
},
},
capabilities = capabilities,
handlers = handlers,
})
},
})
lspconfig.clangd.setup({
capabilities = capabilities,
handlers = handlers,
})
lspconfig.gdscript.setup({
capabilities = capabilities,
})
lspconfig.pyright.setup({
capabilities = capabilities,
handlers = handlers,
})
lspconfig.tsserver.setup({
capabilities = capabilities,
handlers = handlers,
})
end,
},
local x = vim.diagnostic.severity
local config = {
-- Enable virtual text
virtual_text = { -- or false for disable
prefix = '', -- ■  󰊠
suffix = '',
format = function(diagnostic)
local prefix = '󰊠 '
local suffix = ' '
-- return full message with custom prefix & suffix
return prefix .. diagnostic.message .. suffix
end,
},
update_in_insert = true,
signs = { text = { [x.ERROR] = '', [x.WARN] = '', [x.HINT] = '󰌵', [x.INFO] = '' } },
underline = false,
severity_sort = true,
float = {
focusable = false,
style = 'minimal',
border = 'rounded',
source = 'always',
header = '',
prefix = '',
},
}
vim.diagnostic.config(config)
-- add borders to lsp info window
require('lspconfig.ui.windows').default_options.border = 'single'
end,
}
+41
View File
@@ -0,0 +1,41 @@
return {
'nvimdev/lspsaga.nvim',
lazy = true,
event = 'LspAttach',
config = function()
vim.keymap.set(
'n',
'<leader>ot',
'<cmd>Lspsaga outline<cr>',
{ desc = 'Lspsaga | Code Outline', silent = true }
)
require('lspsaga').setup({
ui = {
theme = 'round',
border = 'rounded',
winblend = 0,
expand = '',
collaspe = '',
preview = '',
code_action = '󱧣 ',
diagnostic = '',
hover = '',
kind = {},
},
lightbulb = {
enable = false,
enable_in_insert = true,
sign = true,
sign_priority = 40,
virtual_text = true,
},
symbol_in_winbar = {
enable = false,
separator = '',
hide_keyword = true,
show_file = true,
folder_level = 0,
},
})
end,
}
+23 -14
View File
@@ -5,22 +5,26 @@ return {
},
event = { 'BufReadPost', 'BufAdd', 'BufNewFile' },
config = function()
-- Eviline config for lualine
-- Author: shadmansaleh
-- Credit: glepnir
local lualine = require('lualine')
-- Color table for highlights
local colors = {
bg = 'none',
fg = '#bbc2cf',
yellow = '#ECBE7B',
cyan = '#008080',
darkblue = '#081633',
green = '#98be65',
orange = '#FF8800',
violet = '#a9a1e1',
magenta = '#c678dd',
blue = '#51afef',
red = '#ec5f67',
}
-- Color table for highlights
-- stylua: ignore
local colors = {
bg = 'none',
fg = '#bbc2cf',
yellow = '#ECBE7B',
cyan = '#008080',
darkblue = '#081633',
green = '#98be65',
orange = '#FF8800',
violet = '#a9a1e1',
magenta = '#c678dd',
blue = '#51afef',
red = '#ec5f67',
}
local conditions = {
buffer_not_empty = function()
@@ -42,6 +46,11 @@ return {
-- Disable sections and component separators
component_separators = '',
section_separators = '',
disabled_filetypes = {
'NeoTree',
'NvimTree',
'Outline',
},
theme = {
-- We are going to use lualine_c an lualine_x as left and
-- right section. Both are highlighted by c theme . So we
+19
View File
@@ -0,0 +1,19 @@
-- snippet plugin
return {
'L3MON4D3/LuaSnip',
event = { 'BufReadPost', 'BufNewFile' },
dependencies = {
'rafamadriz/friendly-snippets',
'mstuttgart/odoo-snippets',
},
opts = {
history = true,
updateevents = 'TextChanged,TextChangedI',
},
keys = function()
return {}
end,
config = function()
require('luasnip.loaders.from_vscode').lazy_load()
end,
}
+2 -1
View File
@@ -2,7 +2,7 @@ return {
'williamboman/mason.nvim',
cmd = { 'Mason', 'MasonInstall', 'MasonInstallAll', 'MasonUpdate' },
dependencies = {
'williamboman/mason-lspconfig.nvim',
{ 'williamboman/mason-lspconfig.nvim', event = { 'BufReadPre', 'BufNewFile' } },
'WhoIsSethDaniel/mason-tool-installer.nvim',
},
config = function()
@@ -29,6 +29,7 @@ return {
'html',
'cssls',
'tailwindcss',
'svelte',
'lua_ls',
'pyright',
'jdtls',
+39
View File
@@ -0,0 +1,39 @@
return {
{
'echasnovski/mini.nvim',
event = { 'BufReadPost', 'BufAdd', 'BufNewFile' },
version = false,
config = function()
require('mini.comment').setup({})
require('mini.pairs').setup({})
require('mini.move').setup({})
require('mini.cursorword').setup()
-- require("mini.tabline").setup()
local statusline = require('mini.statusline')
statusline.setup({ use_icons = true })
---@diagnostic disable-next-line: duplicate-set-field
statusline.section_location = function()
return '%2l:%-2v'
end
require('mini.bracketed').setup({
file = { suffix = '' },
window = { suffix = '' },
quickfix = { suffix = '' },
yank = { suffix = '' },
treesitter = { suffix = 'n' },
})
require('mini.surround').setup({
mappings = {
add = 'gsa', -- Add surrounding in Normal and Visual modes
delete = 'gsd', -- Delete surrounding
replace = 'gsr', -- Replace surrounding
find = 'gsf', -- Find surrounding (to the right)
find_left = 'gsF', -- Find surrounding (to the left)
highlight = 'gsh', -- Highlight surrounding
update_n_lines = 'gsn', -- Update `n_lines`
},
})
end,
},
}
+32
View File
@@ -0,0 +1,32 @@
return {
'mvllow/modes.nvim',
tag = 'v0.2.0',
config = function()
require('modes').setup({
colors = {
visual = '#f5c359',
delete = '#c75c6a',
copy = '#78ccc5',
insert = '#c5739a',
},
-- Set opacity for cursorline and number background
line_opacity = 0.15,
-- Enable cursor highlights
set_cursor = true,
-- Enable cursorline initially, and disable cursorline for inactive windows
-- or ignored filetypes
set_cursorline = true,
-- Enable line number highlights to match cursorline
set_number = true,
-- Disable modes highlights in specified filetypes
-- Please PR commonly ignored filetypes
ignore_filetypes = { 'NvimTree', 'TelescopePrompt' },
})
end,
}
+12
View File
@@ -0,0 +1,12 @@
return {
'bluz71/vim-moonfly-colors',
name = 'moonfly',
lazy = false,
priority = 1000,
config = function()
require('moonfly').custom_colors({
bg = '#000000',
})
vim.cmd([[colorscheme moonfly]])
end,
}
+27
View File
@@ -0,0 +1,27 @@
return {
'SmiteshP/nvim-navbuddy',
dependencies = {
'neovim/nvim-lspconfig',
'SmiteshP/nvim-navic',
'MunifTanjim/nui.nvim',
},
keys = {
{ '<leader>nv', '<cmd>Navbuddy<cr>', desc = 'Nav' },
},
config = function()
local actions = require('nvim-navbuddy.actions')
local navbuddy = require('nvim-navbuddy')
navbuddy.setup({
window = {
border = 'double',
},
mappings = {
['k'] = actions.next_sibling,
['i'] = actions.previous_sibling,
['j'] = actions.parent,
['l'] = actions.children,
},
lsp = { auto_attach = true },
})
end,
}
+2 -2
View File
@@ -7,7 +7,7 @@ return {
'MunifTanjim/nui.nvim',
},
keys = {
-- { '<leader>ee', ':Neotree toggle float<CR>', silent = true, desc = 'Float File Explorer' },
{ '<leader>e', ':Neotree toggle left<CR>', silent = true, desc = 'Left File Explorer' },
{ '<leader>ee', ':Neotree toggle float<CR>', silent = true, desc = 'Float File Explorer' },
{ '<leader><tab>', ':Neotree toggle left<CR>', silent = true, desc = 'Left File Explorer' },
},
}
+28
View File
@@ -0,0 +1,28 @@
-- Smooth scrolling neovim plugin written in lua
return {
'karb94/neoscroll.nvim',
event = { 'CursorHold', 'CursorHoldI' },
config = function()
require('neoscroll').setup({
mappings = { -- Keys to be mapped to their corresponding default scrolling animation
'<C-u>',
'<C-d>',
'<C-b>',
'<C-f>',
'<C-y>',
'<C-e>',
'zt',
'zz',
'zb',
},
hide_cursor = true, -- Hide cursor while scrolling
stop_eof = true, -- Stop at <EOF> when scrolling downwards
respect_scrolloff = false, -- Stop scrolling when the cursor reaches the scrolloff margin of the file
cursor_scrolls_alone = true, -- The cursor will keep on scrolling even if the window cannot scroll further
easing = 'linear', -- Default easing function
pre_hook = nil, -- Function to run before the scrolling animation starts
post_hook = nil, -- Function to run after the scrolling animation ends
performance_mode = false, -- Disable "Performance Mode" on all buffers.
})
end,
}
+73
View File
@@ -0,0 +1,73 @@
return {
'nvim-neotest/neotest',
dependencies = { 'haydenmeade/neotest-jest', 'marilari88/neotest-vitest' },
cmd = 'Neotest',
config = function()
require('neotest').setup({
status = { virtual_text = true },
output = { open_on_run = true },
adapters = {
require('neotest-vitest'),
require('neotest-jest')({
jestCommand = 'npm test --',
jestConfigFile = 'custom.jest.config.ts',
env = { CI = true },
cwd = function(path)
return vim.fn.getcwd()
end,
}),
},
})
end,
keys = {
{
'<leader>tw',
function()
require('neotest').run.run(vim.fn.expand('%'))
end,
desc = 'Run File',
},
{
'<leader>tT',
function()
require('neotest').run.run(vim.loop.cwd())
end,
desc = 'Run All Test Files',
},
{
'<leader>tr',
function()
require('neotest').run.run()
end,
desc = 'Run Nearest',
},
{
'<leader>ts',
function()
require('neotest').summary.toggle()
end,
desc = 'Toggle Summary',
},
{
'<leader>to',
function()
require('neotest').output.open({ enter = true, auto_close = true })
end,
desc = 'Show Output',
},
{
'<leader>tO',
function()
require('neotest').output_panel.toggle()
end,
desc = 'Toggle Output Panel',
},
{
'<leader>tS',
function()
require('neotest').run.stop()
end,
desc = 'Stop',
},
},
}
-9
View File
@@ -1,9 +0,0 @@
return {
'2kabhishek/nerdy.nvim',
dependencies = {
'stevearc/dressing.nvim',
'nvim-telescope/telescope.nvim',
},
cmd = 'Nerdy',
vim.keymap.set('n', '<Leader>si', '<cmd>Nerdy<cr>'), --> nerd icons
}
+92 -22
View File
@@ -1,32 +1,102 @@
-- override nvim ui
return {
'folke/noice.nvim',
event = 'VeryLazy',
enabled = false,
enabled = true,
dependencies = {
'nvim-treesitter/nvim-treesitter',
'MunifTanjim/nui.nvim',
'rcarriga/nvim-notify',
},
config = function()
require('noice').setup({
cmdline = {
format = {
cmdline = { pattern = '^:', icon = '', lang = 'vim' },
filter = { pattern = '^:%s*!', icon = '', lang = 'bash' },
lua = { pattern = { '^:%s*lua%s+', '^:%s*lua%s*=%s*', '^:%s*=%s*' }, icon = '', lang = 'lua' },
help = { pattern = '^:%s*he?l?p?%s+', icon = ' ' },
search_down = { kind = 'search', pattern = '^/', icon = '', lang = 'regex' },
search_up = { kind = 'search', pattern = '^%?', icon = '', lang = 'regex' },
input = { view = 'cmdline_input', icon = '' },
opts = {
cmdline = {
view = 'cmdline',
format = {
cmdline = { icon = '▍' },
substitute = {
pattern = '^:%%?s/',
icon = ' ',
ft = 'regex',
opts = { border = { text = { top = ' sub (old/new/) ' } } },
},
input = { view = 'cmdline_input', icon = '█' },
},
},
routes = {
{
view = 'notify',
filter = { event = 'msg_showmode' },
},
{
filter = {
event = 'msg_show',
kind = '',
find = 'written',
},
opts = { skip = true },
},
},
lsp = {
progress = {
enabled = false,
-- Lsp Progress is formatted using the builtins for lsp_progress. See config.format.builtin
-- See the section on formatting for more details on how to customize.
format = 'lsp_progress',
format_done = 'lsp_progress_done',
throttle = 1000 / 30, -- frequency to update lsp progress message
view = 'mini',
},
override = {
-- override the default lsp markdown formatter with Noice
['vim.lsp.util.convert_input_to_markdown_lines'] = true,
-- override the lsp markdown formatter with Noice
['vim.lsp.util.stylize_markdown'] = true,
-- override cmp documentation with Noice (needs the other options to work)
['cmp.entry.get_documentation'] = true,
},
hover = {
enabled = true,
silent = false, -- set to true to not show a message if hover is not available
view = nil, -- when nil, use defaults from documentation
opts = {}, -- merged with defaults from documentation
},
signature = {
enabled = false,
auto_open = {
enabled = true,
trigger = true, -- Automatically show signature help when typing a trigger character from the LSP
luasnip = true, -- Will open signature help when jumping to Luasnip insert nodes
throttle = 50, -- Debounce lsp signature help request by 50ms
},
view = nil, -- when nil, use defaults from documentation
opts = {}, -- merged with defaults from documentation
},
message = {
-- Messages shown by lsp servers
enabled = true,
view = 'notify',
opts = {},
},
-- defaults for hover and signature help
documentation = {
view = 'hover',
opts = {
lang = 'markdown',
replace = true,
render = 'plain',
format = { '{message}' },
win_options = { concealcursor = 'n', conceallevel = 3 },
},
},
lsp = {
signature = {
enabled = false,
},
},
presets = {
command_palette = true,
},
})
end,
},
presets = {
-- you can enable a preset by setting it to true, or a table that will override the preset config
-- you can also add custom presets that you can enable/disable with enabled=true
bottom_search = true, -- use a classic bottom cmdline for search
command_palette = false, -- position the cmdline and popupmenu together
long_message_to_split = true, -- long messages will be sent to a split
inc_rename = false, -- enables an input dialog for inc-rename.nvim
lsp_doc_border = true, -- add a border to hover docs and signature help
},
},
}
+1 -1
View File
@@ -1,6 +1,6 @@
return {
'nvimtools/none-ls.nvim', -- configure formatters & linters
event = { 'CursorHold', 'CursorHoldI' },
event = { 'BufReadPre', 'BufNewFile' },
dependencies = {
'jay-babu/mason-null-ls.nvim',
},
+1
View File
@@ -0,0 +1 @@
return { 'MunifTanjim/nui.nvim', lazy = true }
+12
View File
@@ -0,0 +1,12 @@
return {
'nacro90/numb.nvim',
config = function()
require('numb').setup({
show_numbers = true, -- Enable 'number' for the window while peeking
show_cursorline = true, -- Enable 'cursorline' for the window while peeking
hide_relativenumbers = true, -- Enable turning off 'relativenumber' for the window while peeking
number_only = false, -- Peek only when the command is only a number instead of when it starts with a number
centered_peeking = true, -- Peeked line will be centered relative to window
})
end,
}
+32
View File
@@ -0,0 +1,32 @@
return {
'mfussenegger/nvim-dap',
dependencies = {
'leoluz/nvim-dap-go',
'rcarriga/nvim-dap-ui',
'nvim-neotest/nvim-nio',
},
lazy = true,
config = function()
require('dap-go').setup()
require('dapui').setup()
local dap = require('dap')
local keymap = vim.keymap
local dapui = require('dapui')
keymap.set('n', '<leader>dt', dap.toggle_breakpoint, {})
keymap.set('n', '<leader>dc', dap.continue, {})
dap.listeners.before.attach.dapui_config = function()
dapui.open()
end
dap.listeners.before.launch.dapui_config = function()
dapui.open()
end
dap.listeners.before.event_terminated.dapui_config = function()
dapui.close()
end
dap.listeners.before.event_exited.dapui_config = function()
dapui.close()
end
end,
}
+1
View File
@@ -0,0 +1 @@
return { 'nvim-lua/plenary.nvim', lazy = true }
+31
View File
@@ -0,0 +1,31 @@
return {
'HiPhish/rainbow-delimiters.nvim',
config = function()
local rainbow_delimiters = require('rainbow-delimiters')
require('rainbow-delimiters.setup').setup({
{
strategy = {
[''] = rainbow_delimiters.strategy['global'],
vim = rainbow_delimiters.strategy['local'],
},
query = {
[''] = 'rainbow-delimiters',
lua = 'rainbow-blocks',
},
priority = {
[''] = 110,
lua = 210,
},
highlight = {
'RainbowDelimiterRed',
'RainbowDelimiterYellow',
'RainbowDelimiterBlue',
'RainbowDelimiterOrange',
'RainbowDelimiterGreen',
'RainbowDelimiterViolet',
'RainbowDelimiterCyan',
},
},
})
end,
}
+28
View File
@@ -0,0 +1,28 @@
return {
'NStefan002/screenkey.nvim',
cmd = 'Screenkey',
version = '*',
vim.keymap.set('n', '<leader>kt', '<cmd>Screenkey<CR>', { desc = 'Toggle keys' }),
config = function()
require('screenkey').setup({
-- see :h nvim_open_win
win_opts = {
relative = 'editor',
anchor = 'SE',
width = 40,
height = 1,
border = 'single',
},
-- compress input when repeated <compress_after> times
compress_after = 3,
-- clear the input after <clear_after> seconds of inactivity
clear_after = 3,
-- temporarily disable screenkey (for example when inside of the terminal)
disable = {
filetypes = {}, -- for example: "toggleterm"
-- :h 'buftype'
buftypes = {}, -- for example: "terminal"
},
})
end,
}
+10
View File
@@ -0,0 +1,10 @@
return {
'nvim-pack/nvim-spectre',
build = false,
cmd = 'Spectre',
opts = { open_cmd = 'noswapfile vnew' },
-- stylua: ignore
keys = {
{ "<leader>sr", function() require("spectre").open() end, desc = "Replace in Files (Spectre)" },
},
}
+22
View File
@@ -0,0 +1,22 @@
return {
{
'luukvbaal/statuscol.nvim',
event = 'BufReadPre',
config = function()
local builtin = require('statuscol.builtin')
require('statuscol').setup({
setopt = true,
separator = '',
foldfunc = 'builtin',
relculright = true,
segments = {
{ text = { '%s' }, click = 'v:lua.ScSa' },
{
text = { builtin.lnumfunc, ' ' },
click = 'v:lua.ScLa',
},
},
})
end,
},
}
-15
View File
@@ -1,15 +0,0 @@
return {
'echasnovski/mini.surround',
event = { 'BufReadPre', 'BufNewFile', 'BufWritePre' },
opts = {
mappings = {
add = 'gsa', -- Add surrounding in Normal and Visual modes
delete = 'gsd', -- Delete surrounding
find = 'gsf', -- Find surrounding (to the right)
find_left = 'gsF', -- Find surrounding (to the left)
highlight = 'gsh', -- Highlight surrounding
replace = 'gsr', -- Replace surrounding
update_n_lines = 'gsn', -- Update `n_lines`
},
},
}
+35 -20
View File
@@ -3,71 +3,73 @@ return {
'nvim-telescope/telescope.nvim',
cmd = 'Telescope',
version = false,
lazy = true,
dependencies = {
{ 'nvim-lua/plenary.nvim' },
{ 'nvim-tree/nvim-web-devicons' },
{ 'nvim-telescope/telescope-fzf-native.nvim', build = 'zig' },
{ 'nvim-telescope/telescope-ui-select.nvim' },
{ 'nvim-telescope/telescope-file-browser.nvim' },
},
keys = {
{
'<leader>ff',
'<leader>sf',
function()
require('telescope.builtin').find_files()
end,
desc = 'Find File (CWD)',
},
{
'<leader>fh',
'<leader>sh',
function()
require('telescope.builtin').help_tags()
end,
desc = 'Find Help',
},
{
'<leader>fH',
'<leader>sH',
function()
require('telescope.builtin').highlights()
end,
desc = 'Find highlight groups',
},
{
'<leader>fM',
'<leader>sM',
function()
require('telescope.builtin').man_pages()
end,
desc = 'Map Pages',
},
{
'<leader>of',
'<leader>so',
function()
require('telescope.builtin').oldfiles()
end,
desc = 'Open Recent File',
},
{
'<leader>tl',
'<leader>sg',
function()
require('telescope.builtin').live_grep()
end,
desc = 'Live Grep',
},
{
'<leader>tw',
'<leader>sw',
function()
require('telescope.builtin').grep_string()
end,
desc = 'Grep String',
},
{
'<leader>km',
'<leader>sk',
function()
require('telescope.builtin').keymaps()
end,
desc = 'Keymaps',
},
{
'<leader>tC',
'<leader>sC',
function()
require('telescope.builtin').commands()
end,
@@ -81,22 +83,21 @@ return {
desc = 'Buffers',
},
{
'<leader>td',
'<leader>sd',
function()
require('telescope.builtin').diagnostics()
end,
desc = 'diagnostics',
},
{
'<leader>cc',
function()
require('telescope.builtin').colorscheme({ enable_preview = true })
end,
desc = 'Colorscheme with preview',
'<leader>sF',
'<cmd>Telescope file_browser<CR>',
"desc = 'File Browser'",
},
},
config = function()
local telescope = require('telescope')
local fb_actions = require('telescope').extensions.file_browser.actions
telescope.setup({
file_ignore_patterns = { '%.git/.' },
defaults = {
@@ -104,11 +105,6 @@ return {
treesitter = false,
},
},
-- picker = {
-- colorscheme = {
-- enable_preview = true,
-- },
-- },
extensions = {
fzf = {
fuzzy = true, -- false will only do exact matching
@@ -116,6 +112,24 @@ return {
override_file_sorter = true, -- override the file sorter
case_mode = 'smart_case', -- or "ignore_case" or "respect_case"
},
file_browser = {
theme = 'ivy',
hijack_netrw = true,
mapping = {
['i'] = {
['<A-c>'] = fb_actions.create,
['<A-r>'] = fb_actions.rename,
['<A-d>'] = fb_actions.remove,
['<A-h>'] = fb_actions.toggle_hidden,
},
['n'] = {
['a'] = fb_actions.create,
['r'] = fb_actions.rename,
['d'] = fb_actions.remove,
['h'] = fb_actions.toggle_hidden,
},
},
},
},
borderchars = {
prompt = { '─', '│', '─', '│', '╭', '╮', '╯', '╰' },
@@ -123,6 +137,7 @@ return {
},
})
telescope.load_extension('ui-select')
telescope.load_extension('file_browser')
-- telescope.load_extension("refactoring")
telescope.load_extension('notify')
end,
+47 -4
View File
@@ -1,8 +1,51 @@
local size = function()
return vim.o.columns * 0.5
end
return {
'2kabhishek/termim.nvim',
cmd = { 'Fterm', 'FTerm', 'Sterm', 'STerm', 'Vterm', 'VTerm' },
'akinsho/toggleterm.nvim',
lazy = true,
cmd = {
'ToggleTerm',
'ToggleTermSetName',
'ToggleTermToggleAll',
'ToggleTermSendVisualLines',
'ToggleTermSendCurrentLine',
'ToggleTermSendVisualSelection',
},
keys = {
{ 'tv', '<cmd>Vterm<CR>' }, -- Vertical terminal
{ 'th', '<cmd>Sterm<CR>' }, -- Horizontal terminal
{ '<leader>1', '<cmd>1ToggleTerm<cr>', desc = 'Toggle Terminal', mode = 'n' },
{ '<A-t>', '<cmd>ToggleTerm size=' .. size() .. '<cr>', desc = 'Toggle Terminal', mode = 'n' },
{ '<leader>2', '<cmd>2ToggleTerm<cr>', desc = 'Toggle Terminal', mode = 'n' },
},
opts = {
size = 10,
open_mapping = [[<c-\>]],
hide_numbers = true,
shade_filetypes = {},
shade_terminals = true,
shading_factor = '2',
start_in_insert = true,
insert_mappings = true,
terminal_mappings = true,
persist_size = true,
direction = 'float', -- Use 'float' for floating terminal windows
close_on_exit = true,
shell = vim.o.shell,
float_opts = {
border = 'curved', -- or 'single', 'double', 'shadow', etc.
winblend = 0, -- Set to 0 for full transparency
highlights = {
border = 'Normal',
background = 'Normal',
},
},
},
{
'2kabhishek/termim.nvim',
cmd = { 'Fterm', 'FTerm', 'Sterm', 'STerm', 'Vterm', 'VTerm' },
keys = {
{ '<leader>th', '<cmd>Sterm<cr>', desc = 'Horizontal Terminal' },
{ '<leader>tv', '<cmd>Vterm<cr>', desc = 'Vertical Terminal' },
},
},
}
+55
View File
@@ -0,0 +1,55 @@
return {
{
'xiyaowong/transparent.nvim',
config = function()
require('transparent').clear_prefix('Navic')
require('transparent').clear_prefix('Float')
-- require("transparent").clear_prefix("Normal")
require('transparent').clear_prefix('NeoTree')
require('transparent').clear_prefix('Noice')
require('transparent').clear_prefix('Notify')
-- require("transparent").clear_prefix("Mini")
require('transparent').clear_prefix('WhichKey')
require('transparent').clear_prefix('BufferLine')
require('transparent').clear_prefix('Telescope')
require('transparent').setup({ -- Optional, you don't have to run setup.
groups = { -- table: default groups
'Comment',
'Constant',
'TabLineFill',
'Special',
'WinBar',
'Identifier',
'Statement',
'PreProc',
'Type',
'Underlined',
'Todo',
'String',
'Function',
'Conditional',
'Repeat',
'Operator',
'Structure',
'LineNr',
'NonText',
'SignColumn',
'StatusLine',
'StatusLineNC',
'EndOfBuffer',
'SignColumn',
'HoverNormal',
},
extra_groups = {
'OctoEditable',
'EndOfBuffer',
'Search',
'Cursor',
'LazyNormal',
}, -- table: additional groups that should be cleared
exclude_groups = {}, -- table: groups you don't want to clear
on_clear = function() end,
})
end,
},
}
+48
View File
@@ -0,0 +1,48 @@
return {
'folke/trouble.nvim',
lazy = true,
cmd = { 'Trouble', 'TroubleToggle', 'TroubleRefresh' },
opts = {
modes = {
lsp = {
win = { position = 'right' },
},
},
},
keys = {
{ '<leader>xx', '<cmd>Trouble diagnostics toggle<cr>', desc = 'Diagnostics (Trouble)' },
{ '<leader>xX', '<cmd>Trouble diagnostics toggle filter.buf=0<cr>', desc = 'Buffer Diagnostics (Trouble)' },
{ '<leader>cs', '<cmd>Trouble symbols toggle<cr>', desc = 'Symbols (Trouble)' },
{ '<leader>cS', '<cmd>Trouble lsp toggle<cr>', desc = 'LSP references/definitions/... (Trouble)' },
{ '<leader>xL', '<cmd>Trouble loclist toggle<cr>', desc = 'Location List (Trouble)' },
{ '<leader>xQ', '<cmd>Trouble qflist toggle<cr>', desc = 'Quickfix List (Trouble)' },
{
'[q',
function()
if require('trouble').is_open() then
require('trouble').prev({ skip_groups = true, jump = true })
else
local ok, err = pcall(vim.cmd.cprev)
if not ok then
vim.notify(err, vim.log.levels.ERROR)
end
end
end,
desc = 'Previous Trouble/Quickfix Item',
},
{
']q',
function()
if require('trouble').is_open() then
require('trouble').next({ skip_groups = true, jump = true })
else
local ok, err = pcall(vim.cmd.cnext)
if not ok then
vim.notify(err, vim.log.levels.ERROR)
end
end
end,
desc = 'Next Trouble/Quickfix Item',
},
},
}
+6
View File
@@ -0,0 +1,6 @@
return {
'mbbill/undotree',
keys = {
{ '<leader>uu', '<cmd>UndotreeToggle<cr>', desc = 'Toggle Undotree' },
},
}
+7
View File
@@ -0,0 +1,7 @@
return {
'szw/vim-maximizer',
keys = {
{ '<leader>sm', '<cmd>MaximizerToggle<CR>', { desc = 'Maximize/minimize a split' } },
},
}
+4
View File
@@ -0,0 +1,4 @@
return {
'wakatime/vim-wakatime',
lazy = false,
}
+16
View File
@@ -0,0 +1,16 @@
return {
'folke/which-key.nvim',
event = 'VeryLazy',
opts = {
preset = 'helix',
},
keys = {
{
'<leader>?',
function()
require('which-key').show({ global = false })
end,
desc = 'Buffer Local Keymaps (which-key)',
},
},
}
-39
View File
@@ -1,39 +0,0 @@
return {
{
'gelguy/wilder.nvim',
keys = {
':',
'/',
'?',
},
config = function()
local wilder = require('wilder')
-- Enable wilder when pressing :, / or ?
wilder.setup({ modes = { ':', '/', '?' } })
-- Enable fuzzy matching for commands and buffers
wilder.set_option('pipeline', {
wilder.branch(
wilder.cmdline_pipeline({
fuzzy = 1,
}),
wilder.vim_search_pipeline({
fuzzy = 1,
})
),
})
wilder.set_option(
'renderer',
wilder.popupmenu_renderer(wilder.popupmenu_palette_theme({
border = 'rounded',
max_height = '75%',
min_height = 0,
prompt_position = 'top',
reverse = 0,
}))
)
end,
},
}
+10
View File
@@ -0,0 +1,10 @@
return {
{
'folke/zen-mode.nvim',
cmd = { 'ZenMode' },
opts = {},
keys = {
{ '<leader>zz', '<cmd>ZenMode<cr>', desc = 'Toggle zen mode' },
},
},
}