initial commit

This commit is contained in:
pika 2024-06-25 11:13:26 +02:00
parent dc5408f1a2
commit 9889f6c4ee
35 changed files with 1302 additions and 0 deletions

View file

@ -0,0 +1,5 @@
; extends
(object
(pair
key: (_) @property.lhs
value: (_) @property.inner @property.rhs) @property.outer)

2
init.lua Normal file
View file

@ -0,0 +1,2 @@
require 'pika.core'
require 'pika.lazy'

48
lazy-lock.json Normal file
View file

@ -0,0 +1,48 @@
{
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
"LuaSnip": { "branch": "master", "commit": "03c8e67eb7293c404845b3982db895d59c0d1538" },
"alpha-nvim": { "branch": "main", "commit": "41283fb402713fc8b327e60907f74e46166f4cfd" },
"auto-session": { "branch": "main", "commit": "e5ffe230235c7d35c2f33078b7cd927a4fb579c4" },
"bamboo.nvim": { "branch": "master", "commit": "b67ea789efd5e81692c802d2b42629db79683da1" },
"bufferline.nvim": { "branch": "main", "commit": "99337f63f0a3c3ab9519f3d1da7618ca4f91cffe" },
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
"cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
"comment-box.nvim": { "branch": "main", "commit": "06bb771690bc9df0763d14769b779062d8f12bc5" },
"conform.nvim": { "branch": "master", "commit": "c26dadf8a47a547768d1048a0d698ecec33494ce" },
"dressing.nvim": { "branch": "master", "commit": "6741f1062d3dc6e4755367a7e9b347b553623f04" },
"friendly-snippets": { "branch": "main", "commit": "682157939e57bd6a2c86277dfd4d6fbfce63dbac" },
"gitsigns.nvim": { "branch": "main", "commit": "17e8fd66182c9ad79dc129451ad015af3d27529c" },
"hererocks": { "branch": "master", "commit": "ec640f26e25f4a8e16f236d78bf35ab72b197b29" },
"indent-blankline.nvim": { "branch": "master", "commit": "4036c8ae9cc29faf8e6443fa5b23e679db055d24" },
"lazy.nvim": { "branch": "main", "commit": "0a5839ceeaec6d550f0e8d425d4a478daac176ce" },
"lazygit.nvim": { "branch": "main", "commit": "ad3e1ea592f9d13e86e0d4e850224d9d78069508" },
"lspkind.nvim": { "branch": "master", "commit": "1735dd5a5054c1fb7feaf8e8658dbab925f4f0cf" },
"lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "37a336b653f8594df75c827ed589f1c91d91ff6c" },
"mason-tool-installer.nvim": { "branch": "main", "commit": "c5e07b8ff54187716334d585db34282e46fa2932" },
"mason.nvim": { "branch": "main", "commit": "0950b15060067f752fde13a779a994f59516ce3d" },
"neodev.nvim": { "branch": "main", "commit": "02893eeb9d6e8503817bd52385e111cba9a90500" },
"nvim-autopairs": { "branch": "master", "commit": "c15de7e7981f1111642e7e53799e1211d4606cb9" },
"nvim-cmp": { "branch": "main", "commit": "a110e12d0b58eefcf5b771f533fc2cf3050680ac" },
"nvim-colorizer.lua": { "branch": "master", "commit": "a065833f35a3a7cc3ef137ac88b5381da2ba302e" },
"nvim-lint": { "branch": "master", "commit": "941fa1220a61797a51f3af9ec6b7d74c8c7367ce" },
"nvim-lsp-file-operations": { "branch": "master", "commit": "92a673de7ecaa157dd230d0128def10beb56d103" },
"nvim-lspconfig": { "branch": "master", "commit": "9c9eb07fecc578e25e28db8dc9002b43fff2ed79" },
"nvim-surround": { "branch": "main", "commit": "ec2dc7671067e0086cdf29c2f5df2dd909d5f71f" },
"nvim-tree.lua": { "branch": "master", "commit": "8b2c5c678be4b49dff6a2df794877000113fd77b" },
"nvim-treesitter": { "branch": "master", "commit": "d4a888ae3cff358cb239643c45b2b38bb60e29c6" },
"nvim-treesitter-textobjects": { "branch": "master", "commit": "34867c69838078df7d6919b130c0541c0b400c47" },
"nvim-ts-autotag": { "branch": "main", "commit": "ddfccbf0df1b9349c2b9e9b17f4afa8f9b6c1ed1" },
"nvim-web-devicons": { "branch": "master", "commit": "c0cfc1738361b5da1cd0a962dd6f774cc444f856" },
"plenary.nvim": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" },
"substitute.nvim": { "branch": "main", "commit": "8b93e792747520b6490237b5b32963e256fbde24" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "9ef21b2e6bb6ebeaf349a0781745549bbb870d27" },
"telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" },
"todo-comments.nvim": { "branch": "main", "commit": "51e10f838e84b4756c16311d0b1ef0972c6482d2" },
"trouble.nvim": { "branch": "main", "commit": "88c3be40c061ce053ab326ce4fdcb973a1f785ff" },
"vim-maximizer": { "branch": "master", "commit": "2e54952fe91e140a2e69f35f22131219fcd9c5f1" },
"vim-tmux-navigator": { "branch": "master", "commit": "5b3c701686fb4e6629c100ed32e827edf8dad01e" },
"which-key.nvim": { "branch": "main", "commit": "0099511294f16b81c696004fa6a403b0ae61f7a0" }
}

2
lua/pika/core/init.lua Normal file
View file

@ -0,0 +1,2 @@
require("pika.core.options")
require("pika.core.keymaps")

79
lua/pika/core/keymaps.lua Normal file
View file

@ -0,0 +1,79 @@
vim.g.mapleader = ' '
-- ─< lua/keymaps.lua >─────────────────────────────────────────────────────────────────
-- local nomap = vim.keymap.del
-- nomap('i', '<C-k>')
-- nomap('n', '<C-k>')
local map = vim.keymap.set
-- ─< Comment >─────────────────────────────────────────────────────────────────────────
map('n', '<S-c>', 'gcc', { desc = 'comment toggle', remap = true })
map('v', '<S-c>', 'gc', { desc = 'comment toggle', remap = true })
-- ─< Terminal >────────────────────────────────────────────────────────────────────────
map('t', '<C-x>', '<C-\\><C-N>', { desc = 'terminal escape terminal mode' })
-- ─< Movement while in "insert"-mode >─────────────────────────────────────────────────
map('i', '<C-b>', '<ESC>^i', { desc = 'move beginning of line' })
map('i', '<C-e>', '<End>', { desc = 'move end of line' })
map('i', '<C-h>', '<Left>', { desc = 'move left' })
map('i', '<C-l>', '<Right>', { desc = 'move right' })
map('i', '<C-j>', '<Down>', { desc = 'move down' })
map('i', '<C-k>', '<Up>', { desc = 'move up' })
-- ───────────────────────────────────< Add yours here >───────────────────────────────────
map('n', ';', ':', { desc = 'CMD enter command mode' })
map('i', 'jk', '<ESC>')
map('i', '<C-c>', '<ESC>')
map('n', '<C-c>', '<ESC>')
map('v', '<C-c>', '<ESC>')
map('n', '<leader>x', '<cmd>bd!<CR>')
-- ─< Activate color plugin >───────────────────────────────────────────────────────────
map('n', '<leader>C', '<cmd>ColorizerToggle<CR>')
--─< Toggle NvimTree >─────────────────────────────────────────────────────────────────
map('n', '<leader>e', ':NvimTreeToggle<CR>', { noremap = true, silent = true, desc = '[e]xplorer' })
-- ─< Disable arrow keys in normal mode >───────────────────────────────────────────────
map('n', '<left>', '<cmd>echo "Use h to move!!"<CR>')
map('n', '<right>', '<cmd>echo "Use l to move!!"<CR>')
map('n', '<up>', '<cmd>echo "Use k to move!!"<CR>')
map('n', '<down>', '<cmd>echo "Use j to move!!"<CR>')
map('n', '<leader>l', '<C-w><C-l>', { desc = 'Move focus to the right window' })
map('n', '<leader>h', '<C-w><C-h>', { desc = 'Move focus to the left window' })
map('n', '<leader>j', '<C-w><C-j>', { desc = 'Move focus to the lower window' })
map('n', '<leader>k', '<C-w><C-k>', { desc = 'Move focus to the upper window' })
map('n', '<leader>p', vim.cmd.Ex)
map('n', '<leader>q', vim.cmd.q)
map('n', '<leader>s', vim.cmd.w)
-- ─< Comment-Box mappings >────────────────────────────────────────────────────────────
map('n', '<leader>cd', '<Cmd>CBd<CR>', { noremap = true, silent = true, desc = '[c]ommentbox [d]elete' })
map('v', '<leader>cd', '<Cmd>CBd<CR>', { noremap = true, silent = true, desc = '[c]ommentbox [d]elete' })
map('n', '<leader>cy', '<Cmd>CBy<CR>', { noremap = true, silent = true, desc = '[y]ank content of Commentbox' })
map('v', '<leader>cy', '<Cmd>CBy<CR>', { noremap = true, silent = true, desc = '[y]ank content of Commentbox' })
map('n', '<leader>cb', '<Cmd>CBlabox1<CR>', { noremap = true, silent = true, desc = '[c]reate comment [b]ox' })
map('v', '<leader>cb', '<Cmd>CBlabox1<CR>', { noremap = true, silent = true, desc = '[c]reate comment [b]ox' })
map('n', '<leader>cB', '<Cmd>CBcabox1<CR>', { noremap = true, silent = true, desc = '[c]reate comment [b]ox (B)centered' })
map('v', '<leader>cB', '<Cmd>CBcabox1<CR>', { noremap = true, silent = true, desc = '[c]reate comment [b]ox (B)centered' })
map('n', '<leader>cc', '<Cmd>CBllbox14<CR>', { noremap = true, silent = true, desc = '[c]reate [c]omment' })
map('v', '<leader>cc', '<Cmd>CBllbox14<CR>', { noremap = true, silent = true, desc = '[c]reate [c]omment' })
map('n', '<leader>cC', '<Cmd>CBclbox14<CR>', { noremap = true, silent = true, desc = '[c]reate [c]omment (C)entered' })
map('v', '<leader>cC', '<Cmd>CBclbox14<CR>', { noremap = true, silent = true, desc = '[c]reate [c]omment (C)entered' })
map('n', '<leader>cl', '<Cmd>CBllline8<CR>', { noremap = true, silent = true, desc = '[c]reate comment [l]ine' })
map('n', '<leader>cL', '<Cmd>CBlcline8<CR>', { noremap = true, silent = true, desc = '[c]reate comment [L]ine' })
-- ─< LoremIpsum generator >────────────────────────────────────────────────────────────
map('n', '<leader>L', ':LoremIpsum ')
-- window management
map('n', '<leader>sv', '<C-w>v', { desc = 'Split window vertically' }) -- split window vertically
map('n', '<leader>sh', '<C-w>s', { desc = 'Split window horizontally' }) -- split window horizontally

64
lua/pika/core/options.lua Normal file
View file

@ -0,0 +1,64 @@
vim.cmd 'let g:netrw_liststyle = 3'
local o = vim.opt
o.relativenumber = true
o.number = true
-- Minimal number of screen lines to keep above and below the cursor.
o.scrolloff = 8
-- tabs & indentation
o.tabstop = 2 -- 2 spaces for tabs (prettier default)
o.shiftwidth = 2 -- 2 spaces for indent width
o.softtabstop = 2
o.expandtab = true -- expand tab to spaces
o.autoindent = true -- copy indent from current line when starting new one
o.mouse = 'a'
o.wrap = false
-- search settings
o.ignorecase = true -- ignore case when searching
o.smartcase = true -- if you include mixed case in your search, assumes you want case-sensitive
o.cursorline = true
-- Don't show the mode, since it's already in the status line
o.showmode = false
-- turn on termguicolors for tokyonight colorscheme to work
-- (have to use iterm2 or any other true color terminal)
o.termguicolors = true
o.background = 'dark' -- colorschemes that can be light or dark will be made dark
o.signcolumn = 'yes' -- show sign column so that text doesn't shift
-- backspace
o.backspace = 'indent,eol,start' -- allow backspace on indent, end of line or insert mode start position
-- clipboard
o.clipboard:append 'unnamedplus' -- use system clipboard as default register
-- split windows
o.splitright = true -- split vertical window to the right
o.splitbelow = true -- split horizontal window to the bottom
-- turn off swapfile
o.swapfile = false
vim.api.nvim_create_autocmd('TextYankPost', {
desc = 'Highlight when yanking (copying) text',
group = vim.api.nvim_create_augroup('kickstart-highlight-yank', { clear = true }),
callback = function()
vim.highlight.on_yank()
end,
})
-- Set cursor to beam when entering Neovim
vim.cmd [[
augroup ChangeCursorShape
autocmd!
autocmd VimEnter * set guicursor=n-v-c-sm:block,i-ci-ve:ver25,r-cr-o:hor20
autocmd VimLeave * set guicursor=a:ver25
augroup END
]]

22
lua/pika/lazy.lua Normal file
View file

@ -0,0 +1,22 @@
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable", -- latest stable release
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
require("lazy").setup({ { import = "pika.plugins" }, { import = "pika.plugins.lsp" } }, {
checker = {
enabled = true,
notify = false,
},
change_detection = {
notify = false,
},
})

View file

@ -0,0 +1,36 @@
return {
"goolord/alpha-nvim",
event = "VimEnter",
config = function()
local alpha = require("alpha")
local dashboard = require("alpha.themes.dashboard")
-- Set header
dashboard.section.header.val = {
" ",
" ███╗ ██╗███████╗ ██████╗ ██╗ ██╗██╗███╗ ███╗ ",
" ████╗ ██║██╔════╝██╔═══██╗██║ ██║██║████╗ ████║ ",
" ██╔██╗ ██║█████╗ ██║ ██║██║ ██║██║██╔████╔██║ ",
" ██║╚██╗██║██╔══╝ ██║ ██║╚██╗ ██╔╝██║██║╚██╔╝██║ ",
" ██║ ╚████║███████╗╚██████╔╝ ╚████╔╝ ██║██║ ╚═╝ ██║ ",
" ╚═╝ ╚═══╝╚══════╝ ╚═════╝ ╚═══╝ ╚═╝╚═╝ ╚═╝ ",
" ",
}
-- Set menu
dashboard.section.buttons.val = {
dashboard.button("e", " > New File", "<cmd>ene<CR>"),
dashboard.button("SPC ee", " > Toggle file explorer", "<cmd>NvimTreeToggle<CR>"),
dashboard.button("SPC ff", "󰱼 > Find File", "<cmd>Telescope find_files<CR>"),
dashboard.button("SPC fs", " > Find Word", "<cmd>Telescope live_grep<CR>"),
dashboard.button("SPC wr", "󰁯 > Restore Session For Current Directory", "<cmd>SessionRestore<CR>"),
dashboard.button("q", " > Quit NVIM", "<cmd>qa<CR>"),
}
-- Send config to alpha
alpha.setup(dashboard.opts)
-- Disable folding on alpha buffer
vim.cmd([[autocmd FileType alpha setlocal nofoldenable]])
end,
}

View file

@ -0,0 +1,16 @@
return {
"rmagatti/auto-session",
config = function()
local auto_session = require("auto-session")
auto_session.setup({
auto_restore_enabled = false,
auto_session_suppress_dirs = { "~/", "~/Dev/", "~/Downloads", "~/Documents", "~/Desktop/" },
})
local keymap = vim.keymap
keymap.set("n", "<leader>wr", "<cmd>SessionRestore<CR>", { desc = "Restore session for cwd" }) -- restore last workspace session for current directory
keymap.set("n", "<leader>ws", "<cmd>SessionSave<CR>", { desc = "Save session for auto session root dir" }) -- save workspace session for current working directory
end,
}

View file

@ -0,0 +1,31 @@
return {
"windwp/nvim-autopairs",
event = { "InsertEnter" },
dependencies = {
"hrsh7th/nvim-cmp",
},
config = function()
-- import nvim-autopairs
local autopairs = require("nvim-autopairs")
-- configure autopairs
autopairs.setup({
check_ts = true, -- enable treesitter
ts_config = {
lua = { "string" }, -- don't add pairs in lua string treesitter nodes
javascript = { "template_string" }, -- don't add pairs in javscript template_string treesitter nodes
java = false, -- don't check treesitter on java
},
})
-- import nvim-autopairs completion functionality
local cmp_autopairs = require("nvim-autopairs.completion.cmp")
-- import nvim-cmp plugin (completions plugin)
local cmp = require("cmp")
-- make autopairs and completion work together
cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done())
end,
}

View file

@ -0,0 +1,10 @@
return {
"akinsho/bufferline.nvim",
dependencies = { "nvim-tree/nvim-web-devicons" },
version = "*",
opts = {
options = {
mode = "tabs",
},
},
}

View file

@ -0,0 +1,17 @@
return {
{
'norcalli/nvim-colorizer.lua',
opts = {
'css',
'html',
'php',
'bash',
'fish',
'lua',
'toml',
html = {
mode = 'foreground',
},
},
},
}

View file

@ -0,0 +1,50 @@
return {
'ribru17/bamboo.nvim',
lazy = false,
priority = 1000, -- Make sure to load this before all the other start plugins.
config = function()
require('bamboo').setup {
-- optional configuration here
}
require('bamboo').load()
end,
--
-- local bg = "#011628"
-- local bg_dark = "#011423"
-- local bg_highlight = "#143652"
-- local bg_search = "#0A64AC"
-- local bg_visual = "#275378"
-- local fg = "#CBE0F0"
-- local fg_dark = "#B4D0E9"
-- local fg_gutter = "#627E97"
-- local border = "#547998"
--
-- require("tokyonight").setup({
-- style = "night",
-- transparent = transparent,
-- styles = {
-- sidebars = transparent and "transparent" or "dark",
-- floats = transparent and "transparent" or "dark",
-- },
-- on_colors = function(colors)
-- colors.bg = bg
-- colors.bg_dark = transparent and colors.none or bg_dark
-- colors.bg_float = transparent and colors.none or bg_dark
-- colors.bg_highlight = bg_highlight
-- colors.bg_popup = bg_dark
-- colors.bg_search = bg_search
-- colors.bg_sidebar = transparent and colors.none or bg_dark
-- colors.bg_statusline = transparent and colors.none or bg_dark
-- colors.bg_visual = bg_visual
-- colors.border = border
-- colors.fg = fg
-- colors.fg_dark = fg_dark
-- colors.fg_float = fg
-- colors.fg_gutter = fg_gutter
-- colors.fg_sidebar = fg_dark
-- end,
-- })
--
-- vim.cmd("colorscheme tokyonight")
-- end,
}

View file

@ -0,0 +1,27 @@
return {
"LudoPinelli/comment-box.nvim",
lazy = false,
opts = {
comment_style = "line",
doc_width = 90, -- width of the document
box_width = 75, -- width of the boxes
line_width = 120, -- width of the lines
},
"numToStr/Comment.nvim",
event = { "BufReadPre", "BufNewFile" },
dependencies = {
"JoosepAlviste/nvim-ts-context-commentstring",
},
config = function()
-- import comment plugin safely
local comment = require("Comment")
local ts_context_commentstring = require("ts_context_commentstring.integrations.comment_nvim")
-- enable comment
comment.setup({
-- for commenting tsx, jsx, svelte, html files
pre_hook = ts_context_commentstring.create_pre_hook(),
})
end,
}

View file

@ -0,0 +1,4 @@
return {
"stevearc/dressing.nvim",
event = "VeryLazy",
}

View file

@ -0,0 +1,39 @@
return {
'stevearc/conform.nvim',
event = { 'BufReadPre', 'BufNewFile' },
config = function()
local conform = require 'conform'
conform.setup {
formatters_by_ft = {
javascript = { 'prettier' },
typescript = { 'prettier' },
javascriptreact = { 'prettier' },
typescriptreact = { 'prettier' },
svelte = { 'prettier' },
css = { 'prettier' },
html = { 'prettier' },
json = { 'prettier' },
yaml = { 'prettier' },
markdown = { 'prettier' },
graphql = { 'prettier' },
liquid = { 'prettier' },
lua = { 'stylua' },
-- python = { "isort", "black" },
},
format_on_save = {
lsp_fallback = true,
async = false,
timeout_ms = 1000,
},
}
vim.keymap.set({ 'n', 'v' }, '<leader>mp', function()
conform.format {
lsp_fallback = true,
async = false,
timeout_ms = 1000,
}
end, { desc = 'Format file or range (in visual mode)' })
end,
}

View file

@ -0,0 +1,47 @@
return {
"lewis6991/gitsigns.nvim",
event = { "BufReadPre", "BufNewFile" },
opts = {
on_attach = function(bufnr)
local gs = package.loaded.gitsigns
local function map(mode, l, r, desc)
vim.keymap.set(mode, l, r, { buffer = bufnr, desc = desc })
end
-- Navigation
map("n", "]h", gs.next_hunk, "Next Hunk")
map("n", "[h", gs.prev_hunk, "Prev Hunk")
-- Actions
map("n", "<leader>hs", gs.stage_hunk, "Stage hunk")
map("n", "<leader>hr", gs.reset_hunk, "Reset hunk")
map("v", "<leader>hs", function()
gs.stage_hunk({ vim.fn.line("."), vim.fn.line("v") })
end, "Stage hunk")
map("v", "<leader>hr", function()
gs.reset_hunk({ vim.fn.line("."), vim.fn.line("v") })
end, "Reset hunk")
map("n", "<leader>hS", gs.stage_buffer, "Stage buffer")
map("n", "<leader>hR", gs.reset_buffer, "Reset buffer")
map("n", "<leader>hu", gs.undo_stage_hunk, "Undo stage hunk")
map("n", "<leader>hp", gs.preview_hunk, "Preview hunk")
map("n", "<leader>hb", function()
gs.blame_line({ full = true })
end, "Blame line")
map("n", "<leader>hB", gs.toggle_current_line_blame, "Toggle line blame")
map("n", "<leader>hd", gs.diffthis, "Diff this")
map("n", "<leader>hD", function()
gs.diffthis("~")
end, "Diff this ~")
-- Text object
map({ "o", "x" }, "ih", ":<C-U>Gitsigns select_hunk<CR>", "Gitsigns select hunk")
end,
},
}

View file

@ -0,0 +1,8 @@
return {
"lukas-reineke/indent-blankline.nvim",
event = { "BufReadPre", "BufNewFile" },
main = "ibl",
opts = {
indent = { char = "" },
},
}

View file

@ -0,0 +1,4 @@
return {
"nvim-lua/plenary.nvim", -- lua functions that many plugins use
"christoomey/vim-tmux-navigator", -- tmux & split window navigation
}

View file

@ -0,0 +1,19 @@
return {
"kdheepak/lazygit.nvim",
cmd = {
"LazyGit",
"LazyGitConfig",
"LazyGitCurrentFile",
"LazyGitFilter",
"LazyGitFilterCurrentFile",
},
-- optional for floating window border decoration
dependencies = {
"nvim-lua/plenary.nvim",
},
-- setting the keybinding for LazyGit with 'keys' is recommended in
-- order to load the plugin when the command is run for the first time
keys = {
{ "<leader>lg", "<cmd>LazyGit<cr>", desc = "Open lazy git" },
},
}

View file

@ -0,0 +1,35 @@
return {
'mfussenegger/nvim-lint',
event = { 'BufReadPre', 'BufNewFile' },
config = function()
local lint = require 'lint'
lint.linters_by_ft = {
javascript = { 'eslint_d' },
typescript = { 'eslint_d' },
javascriptreact = { 'eslint_d' },
typescriptreact = { 'eslint_d' },
python = { 'pylint' },
git = { 'gitlint' },
json = { 'jsonlint' },
markdown = { 'vale' },
fish = { 'fish' },
php = { 'php' },
yaml = { 'yamllint' },
css = { 'stylelint' },
}
local lint_augroup = vim.api.nvim_create_augroup('lint', { clear = true })
vim.api.nvim_create_autocmd({ 'BufEnter', 'BufWritePost', 'InsertLeave' }, {
group = lint_augroup,
callback = function()
lint.try_lint()
end,
})
vim.keymap.set('n', '<leader>l', function()
lint.try_lint()
end, { desc = 'Trigger linting for current file' })
end,
}

View file

@ -0,0 +1,154 @@
return {
'neovim/nvim-lspconfig',
event = { 'BufReadPre', 'BufNewFile' },
dependencies = {
'hrsh7th/cmp-nvim-lsp',
{ 'antosha417/nvim-lsp-file-operations', config = true },
{ 'folke/neodev.nvim', opts = {} },
},
config = function()
-- import lspconfig plugin
local lspconfig = require 'lspconfig'
-- import mason_lspconfig plugin
local mason_lspconfig = require 'mason-lspconfig'
-- import cmp-nvim-lsp plugin
local cmp_nvim_lsp = require 'cmp_nvim_lsp'
local keymap = vim.keymap -- for conciseness
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 = 'Go to previous diagnostic'
-- keymap.set('n', '[d', vim.diagnostic.goto_prev, opts) -- jump to previous diagnostic in buffer
-- opts.desc = 'Go to next diagnostic'
-- keymap.set('n', ']d', vim.diagnostic.goto_next, opts) -- jump to next diagnostic in buffer
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()
-- Change the Diagnostic symbols in the sign column (gutter)
-- (not in youtube nvim video)
local signs = { Error = '', Warn = '', Hint = '', Info = '' }
for type, icon in pairs(signs) do
local hl = 'DiagnosticSign' .. type
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = '' })
end
mason_lspconfig.setup_handlers {
-- default handler for installed servers
function(server_name)
lspconfig[server_name].setup {
capabilities = capabilities,
}
end,
['svelte'] = function()
-- configure svelte server
lspconfig['svelte'].setup {
capabilities = capabilities,
on_attach = function(client, bufnr)
vim.api.nvim_create_autocmd('BufWritePost', {
pattern = { '*.js', '*.ts' },
callback = function(ctx)
-- Here use ctx.match instead of ctx.file
client.notify('$/onDidChangeTsOrJsFile', { uri = ctx.match })
end,
})
end,
}
end,
['graphql'] = function()
-- configure graphql language server
lspconfig['graphql'].setup {
capabilities = capabilities,
filetypes = { 'graphql', 'gql', 'svelte', 'typescriptreact', 'javascriptreact' },
}
end,
['emmet_ls'] = function()
-- configure emmet language server
lspconfig['emmet_ls'].setup {
capabilities = capabilities,
filetypes = { 'html', 'typescriptreact', 'javascriptreact', 'css', 'sass', 'scss', 'less', 'svelte' },
}
end,
['lua_ls'] = function()
-- configure lua server (with special settings)
lspconfig['lua_ls'].setup {
capabilities = capabilities,
settings = {
Lua = {
-- make the language server recognize "vim" global
diagnostics = {
globals = { 'vim' },
},
completion = {
callSnippet = 'Replace',
},
},
},
}
end,
['cssls'] = function()
-- configure CSS server
lspconfig['cssls'].setup {
capabilities = capabilities,
}
end,
['intelephense'] = function()
-- configure PHP server
lspconfig['intelephense'].setup {
capabilities = capabilities,
}
end,
['marksman'] = function()
-- configure Markdown server
lspconfig['marksman'].setup {
capabilities = capabilities,
}
end,
}
end,
}

View file

@ -0,0 +1,54 @@
return {
"williamboman/mason.nvim",
dependencies = {
"williamboman/mason-lspconfig.nvim",
"WhoIsSethDaniel/mason-tool-installer.nvim",
},
config = function()
-- import mason
local mason = require("mason")
-- import mason-lspconfig
local mason_lspconfig = require("mason-lspconfig")
local mason_tool_installer = require("mason-tool-installer")
-- enable mason and configure icons
mason.setup({
ui = {
icons = {
package_installed = "",
package_pending = "",
package_uninstalled = "",
},
},
})
mason_lspconfig.setup({
-- list of servers for mason to install
ensure_installed = {
"tsserver",
"html",
"cssls",
"tailwindcss",
"svelte",
"lua_ls",
"graphql",
"emmet_ls",
"prismals",
"pyright",
},
})
mason_tool_installer.setup({
ensure_installed = {
"prettier", -- prettier formatter
"stylua", -- lua formatter
"isort", -- python formatter
"black", -- python formatter
"pylint",
"eslint_d",
},
})
end,
}

View file

@ -0,0 +1,71 @@
return {
'nvim-lualine/lualine.nvim',
dependencies = { 'nvim-tree/nvim-web-devicons' },
config = function()
local lualine = require 'lualine'
local lazy_status = require 'lazy.status' -- to configure lazy pending updates count
local colors = {
blue = '#57a5e5',
green = '#70c2be',
violet = '#aaaaff',
yellow = '#dbb651',
red = '#e75a7c',
fg = '#f1e9dc',
bg = '#252623',
inactive_bg = '#3a3d37',
}
local my_lualine_theme = {
normal = {
a = { bg = colors.blue, fg = colors.bg, gui = 'bold' },
b = { bg = colors.bg, fg = colors.fg },
c = { bg = colors.bg, fg = colors.fg },
},
insert = {
a = { bg = colors.green, fg = colors.bg, gui = 'bold' },
b = { bg = colors.bg, fg = colors.fg },
c = { bg = colors.bg, fg = colors.fg },
},
visual = {
a = { bg = colors.violet, fg = colors.bg, gui = 'bold' },
b = { bg = colors.bg, fg = colors.fg },
c = { bg = colors.bg, fg = colors.fg },
},
command = {
a = { bg = colors.yellow, fg = colors.bg, gui = 'bold' },
b = { bg = colors.bg, fg = colors.fg },
c = { bg = colors.bg, fg = colors.fg },
},
replace = {
a = { bg = colors.red, fg = colors.bg, gui = 'bold' },
b = { bg = colors.bg, fg = colors.fg },
c = { bg = colors.bg, fg = colors.fg },
},
inactive = {
a = { bg = colors.inactive_bg, fg = colors.semilightgray, gui = 'bold' },
b = { bg = colors.inactive_bg, fg = colors.semilightgray },
c = { bg = colors.inactive_bg, fg = colors.semilightgray },
},
}
-- configure lualine with modified theme
lualine.setup {
options = {
theme = my_lualine_theme,
},
sections = {
lualine_x = {
{
lazy_status.updates,
cond = lazy_status.has_updates,
color = { fg = '#ff9e64' },
},
{ 'encoding' },
{ 'fileformat' },
{ 'filetype' },
},
},
}
end,
}

View file

@ -0,0 +1,77 @@
return {
'hrsh7th/nvim-cmp',
event = 'InsertEnter',
dependencies = {
'hrsh7th/cmp-buffer', -- source for text in buffer
'hrsh7th/cmp-path', -- source for file system paths
{
'L3MON4D3/LuaSnip',
-- follow latest release.
version = 'v2.*', -- Replace <CurrentMajor> by the latest released major (first number of latest release)
-- install jsregexp (optional!).
build = 'make install_jsregexp',
},
'saadparwaiz1/cmp_luasnip', -- for autocompletion
'rafamadriz/friendly-snippets', -- useful snippets
'onsails/lspkind.nvim', -- vs-code like pictograms
},
config = function()
local cmp = require 'cmp'
local luasnip = require 'luasnip'
local lspkind = require 'lspkind'
-- loads vscode style snippets from installed plugins (e.g. friendly-snippets)
require('luasnip.loaders.from_vscode').lazy_load()
cmp.setup {
completion = {
completeopt = 'menu,menuone,preview,noselect',
},
snippet = {
expand = function(args)
luasnip.lsp_expand(args.body)
end,
},
mapping = cmp.mapping.preset.insert {
['<C-k>'] = cmp.mapping.select_prev_item(), -- previous suggestion
['<C-j>'] = cmp.mapping.select_next_item(), -- next suggestion
['<C-b>'] = cmp.mapping.scroll_docs(-4),
['<C-f>'] = cmp.mapping.scroll_docs(4),
['<C-Space>'] = cmp.mapping.complete(), -- show completion suggestions
['<C-e>'] = cmp.mapping.abort(), -- close completion window
['<CR>'] = cmp.mapping.confirm { select = false },
-- Tab to complete
['<Tab>'] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.confirm { select = true } -- confirm selection
elseif luasnip.expand_or_jumpable() then
luasnip.expand_or_jump()
else
fallback()
end
end, { 'i', 's' }),
},
-- sources for autocompletion
sources = cmp.config.sources {
{ name = 'nvim_lsp' },
{ name = 'luasnip' }, -- snippets
{ name = 'buffer' }, -- text within current buffer
{ name = 'path' }, -- file system paths
},
-- configure lspkind for vs-code like pictograms in completion menu
formatting = {
format = lspkind.cmp_format {
mode = 'symbol_text', -- show symbol text with icons
maxwidth = 50,
ellipsis_char = '...',
},
},
-- Enable rounded borders
window = {
completion = cmp.config.window.bordered(),
documentation = cmp.config.window.bordered(),
},
}
end,
}

View file

@ -0,0 +1,65 @@
return {
'nvim-tree/nvim-tree.lua',
dependencies = 'nvim-tree/nvim-web-devicons',
config = function()
local nvimtree = require 'nvim-tree'
-- recommended settings from nvim-tree documentation
vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1
nvimtree.setup {
view = {
width = 24,
relativenumber = true,
},
-- change folder arrow icons
renderer = {
indent_markers = {
enable = true,
-- icons = {
-- corner = '󱞩', -- Light Arc Up and Right
-- edge = '', -- Box Drawings Heavy Vertical
-- item = '', -- Box Drawings Heavy Vertical and Right
-- none = ' ', -- default: (empty space)
-- },
},
icons = {
glyphs = {
folder = {
arrow_closed = '', -- arrow when folder is closed
arrow_open = '', -- arrow when folder is open
},
default = '',
symlink = '',
git = {
unstaged = '',
staged = '',
unmerged = '',
renamed = '󰘦',
untracked = '󰓒',
deleted = '',
-- ignored = '󱥸',
},
},
},
},
-- -- disable window_picker for
-- -- explorer to work well with
-- -- window splits
-- actions = {
-- open_file = {
-- window_picker = {
-- enable = false,
-- },
-- },
-- },
filters = {
custom = { '.DS_Store' },
},
git = {
ignore = false,
},
}
end,
}

View file

@ -0,0 +1,110 @@
return {
"nvim-treesitter/nvim-treesitter-textobjects",
lazy = true,
config = function()
require("nvim-treesitter.configs").setup({
textobjects = {
select = {
enable = true,
-- Automatically jump forward to textobj, similar to targets.vim
lookahead = true,
keymaps = {
-- You can use the capture groups defined in textobjects.scm
["a="] = { query = "@assignment.outer", desc = "Select outer part of an assignment" },
["i="] = { query = "@assignment.inner", desc = "Select inner part of an assignment" },
["l="] = { query = "@assignment.lhs", desc = "Select left hand side of an assignment" },
["r="] = { query = "@assignment.rhs", desc = "Select right hand side of an assignment" },
-- works for javascript/typescript files (custom capture I created in after/queries/ecma/textobjects.scm)
["a:"] = { query = "@property.outer", desc = "Select outer part of an object property" },
["i:"] = { query = "@property.inner", desc = "Select inner part of an object property" },
["l:"] = { query = "@property.lhs", desc = "Select left part of an object property" },
["r:"] = { query = "@property.rhs", desc = "Select right part of an object property" },
["aa"] = { query = "@parameter.outer", desc = "Select outer part of a parameter/argument" },
["ia"] = { query = "@parameter.inner", desc = "Select inner part of a parameter/argument" },
["ai"] = { query = "@conditional.outer", desc = "Select outer part of a conditional" },
["ii"] = { query = "@conditional.inner", desc = "Select inner part of a conditional" },
["al"] = { query = "@loop.outer", desc = "Select outer part of a loop" },
["il"] = { query = "@loop.inner", desc = "Select inner part of a loop" },
["af"] = { query = "@call.outer", desc = "Select outer part of a function call" },
["if"] = { query = "@call.inner", desc = "Select inner part of a function call" },
["am"] = { query = "@function.outer", desc = "Select outer part of a method/function definition" },
["im"] = { query = "@function.inner", desc = "Select inner part of a method/function definition" },
["ac"] = { query = "@class.outer", desc = "Select outer part of a class" },
["ic"] = { query = "@class.inner", desc = "Select inner part of a class" },
},
},
swap = {
enable = true,
swap_next = {
["<leader>na"] = "@parameter.inner", -- swap parameters/argument with next
["<leader>n:"] = "@property.outer", -- swap object property with next
["<leader>nm"] = "@function.outer", -- swap function with next
},
swap_previous = {
["<leader>pa"] = "@parameter.inner", -- swap parameters/argument with prev
["<leader>p:"] = "@property.outer", -- swap object property with prev
["<leader>pm"] = "@function.outer", -- swap function with previous
},
},
move = {
enable = true,
set_jumps = true, -- whether to set jumps in the jumplist
goto_next_start = {
["]f"] = { query = "@call.outer", desc = "Next function call start" },
["]m"] = { query = "@function.outer", desc = "Next method/function def start" },
["]c"] = { query = "@class.outer", desc = "Next class start" },
["]i"] = { query = "@conditional.outer", desc = "Next conditional start" },
["]l"] = { query = "@loop.outer", desc = "Next loop start" },
-- You can pass a query group to use query from `queries/<lang>/<query_group>.scm file in your runtime path.
-- Below example nvim-treesitter's `locals.scm` and `folds.scm`. They also provide highlights.scm and indent.scm.
["]s"] = { query = "@scope", query_group = "locals", desc = "Next scope" },
["]z"] = { query = "@fold", query_group = "folds", desc = "Next fold" },
},
goto_next_end = {
["]F"] = { query = "@call.outer", desc = "Next function call end" },
["]M"] = { query = "@function.outer", desc = "Next method/function def end" },
["]C"] = { query = "@class.outer", desc = "Next class end" },
["]I"] = { query = "@conditional.outer", desc = "Next conditional end" },
["]L"] = { query = "@loop.outer", desc = "Next loop end" },
},
goto_previous_start = {
["[f"] = { query = "@call.outer", desc = "Prev function call start" },
["[m"] = { query = "@function.outer", desc = "Prev method/function def start" },
["[c"] = { query = "@class.outer", desc = "Prev class start" },
["[i"] = { query = "@conditional.outer", desc = "Prev conditional start" },
["[l"] = { query = "@loop.outer", desc = "Prev loop start" },
},
goto_previous_end = {
["[F"] = { query = "@call.outer", desc = "Prev function call end" },
["[M"] = { query = "@function.outer", desc = "Prev method/function def end" },
["[C"] = { query = "@class.outer", desc = "Prev class end" },
["[I"] = { query = "@conditional.outer", desc = "Prev conditional end" },
["[L"] = { query = "@loop.outer", desc = "Prev loop end" },
},
},
},
})
local ts_repeat_move = require("nvim-treesitter.textobjects.repeatable_move")
-- vim way: ; goes to the direction you were moving.
vim.keymap.set({ "n", "x", "o" }, ";", ts_repeat_move.repeat_last_move)
vim.keymap.set({ "n", "x", "o" }, ",", ts_repeat_move.repeat_last_move_opposite)
-- Optionally, make builtin f, F, t, T also repeatable with ; and ,
vim.keymap.set({ "n", "x", "o" }, "f", ts_repeat_move.builtin_f)
vim.keymap.set({ "n", "x", "o" }, "F", ts_repeat_move.builtin_F)
vim.keymap.set({ "n", "x", "o" }, "t", ts_repeat_move.builtin_t)
vim.keymap.set({ "n", "x", "o" }, "T", ts_repeat_move.builtin_T)
end,
}

View file

@ -0,0 +1,17 @@
return {
"gbprod/substitute.nvim",
event = { "BufReadPre", "BufNewFile" },
config = function()
local substitute = require("substitute")
substitute.setup()
-- set keymaps
local keymap = vim.keymap -- for conciseness
keymap.set("n", "s", substitute.operator, { desc = "Substitute with motion" })
keymap.set("n", "ss", substitute.line, { desc = "Substitute line" })
keymap.set("n", "S", substitute.eol, { desc = "Substitute to end of line" })
keymap.set("x", "s", substitute.visual, { desc = "Substitute in visual mode" })
end,
}

View file

@ -0,0 +1,6 @@
return {
"kylechui/nvim-surround",
event = { "BufReadPre", "BufNewFile" },
version = "*", -- Use for stability; omit to use `main` branch for the latest features
config = true,
}

View file

@ -0,0 +1,74 @@
return {
'nvim-telescope/telescope.nvim',
branch = '0.1.x',
dependencies = {
'nvim-lua/plenary.nvim',
{ 'nvim-telescope/telescope-fzf-native.nvim', build = 'make' },
'nvim-tree/nvim-web-devicons',
'folke/todo-comments.nvim',
},
config = function()
local telescope = require 'telescope'
local actions = require 'telescope.actions'
local transform_mod = require('telescope.actions.mt').transform_mod
local trouble = require 'trouble'
local trouble_telescope = require 'trouble.providers.telescope'
-- or create your custom action
local custom_actions = transform_mod {
open_trouble_qflist = function(prompt_bufnr)
trouble.toggle 'quickfix'
end,
}
local trouble_telescope = require 'trouble.sources.telescope'
telescope.setup {
defaults = {
path_display = { 'smart' },
mappings = {
i = {
['<C-k>'] = actions.move_selection_previous, -- move to prev result
['<C-j>'] = actions.move_selection_next, -- move to next result
['<C-q>'] = actions.send_selected_to_qflist + custom_actions.open_trouble_qflist,
['<C-t>'] = trouble_telescope.open, -- Updated line
},
},
},
}
telescope.load_extension 'fzf'
-- set keymaps
local map = vim.keymap.set -- for conciseness
-- Telescope mappings
map('n', '<leader>sf', '<cmd>Telescope find_files<CR>', { noremap = true, silent = true, desc = 'Find Files' })
map('n', '<leader>sw', '<cmd>Telescope live_grep<CR>', { noremap = true, silent = true, desc = 'Search Word' })
map('n', '<leader>sn', '<cmd>Telescope neovim<CR>', { noremap = true, silent = true, desc = 'Neovim Files' })
map('n', '<leader><leader>', '<cmd>Telescope buffers<CR>', { noremap = true, silent = true, desc = 'Buffers' })
local builtin = require 'telescope.builtin'
map('n', '<leader>sn', function()
builtin.find_files { cwd = vim.fn.stdpath 'config' }
end, { desc = '[S]earch [N]eovim files' })
map('n', '<leader>ff', builtin.find_files, { desc = '[S]earch [F]iles' })
map('n', '<leader>sh', builtin.help_tags, { desc = '[S]earch [H]elp' })
map('n', '<leader>sk', builtin.keymaps, { desc = '[S]earch [K]eymaps' })
map('n', '<leader>sg', builtin.live_grep, { desc = '[S]earch by [G]rep' })
map('n', '<leader>sd', builtin.diagnostics, { desc = '[S]earch [D]iagnostics' })
map('n', '<leader>sr', builtin.resume, { desc = '[S]earch [R]esume' })
map('n', '<leader>s.', builtin.oldfiles, { desc = '[S]earch Recent Files ("." for repeat)' })
map('n', '<leader><leader>', builtin.buffers, { desc = '[ ] Find existing buffers' })
map('n', '<leader>q', vim.cmd.q)
-- Additional custom mappings
map('n', '<leader>/', function()
builtin.current_buffer_fuzzy_find(require('telescope.themes').get_dropdown())
end, { desc = '[/] Fuzzily search in current buffer' })
map('n', '<leader>s/', function()
builtin.live_grep { grep_open_files = true, prompt_title = 'Live Grep in Open Files' }
end, { desc = '[S]earch [/] in Open Files' })
end,
}

View file

@ -0,0 +1,21 @@
return {
"folke/todo-comments.nvim",
event = { "BufReadPre", "BufNewFile" },
dependencies = { "nvim-lua/plenary.nvim" },
config = function()
local todo_comments = require("todo-comments")
-- set keymaps
local keymap = vim.keymap -- for conciseness
keymap.set("n", "]t", function()
todo_comments.jump_next()
end, { desc = "Next todo comment" })
keymap.set("n", "[t", function()
todo_comments.jump_prev()
end, { desc = "Previous todo comment" })
todo_comments.setup()
end,
}

View file

@ -0,0 +1,57 @@
return {
'nvim-treesitter/nvim-treesitter',
event = { 'BufReadPre', 'BufNewFile' },
build = ':TSUpdate',
dependencies = {
'windwp/nvim-ts-autotag',
},
config = function()
-- import nvim-treesitter plugin
local treesitter = require 'nvim-treesitter.configs'
-- configure treesitter
treesitter.setup { -- enable syntax highlighting
highlight = {
enable = true,
},
-- enable indentation
indent = { enable = true },
-- enable autotagging (w/ nvim-ts-autotag plugin)
autotag = {
enable = true,
},
-- ensure these language parsers are installed
ensure_installed = {
'json',
'javascript',
'typescript',
'tsx',
'yaml',
'html',
'css',
'prisma',
'markdown',
'markdown_inline',
'svelte',
'graphql',
'bash',
'lua',
'vim',
'dockerfile',
'gitignore',
'query',
'vimdoc',
'c',
},
incremental_selection = {
enable = true,
keymaps = {
init_selection = '<C-space>',
node_incremental = '<C-space>',
scope_incremental = false,
node_decremental = '<bs>',
},
},
}
end,
}

View file

@ -0,0 +1,12 @@
return {
"folke/trouble.nvim",
dependencies = { "nvim-tree/nvim-web-devicons", "folke/todo-comments.nvim" },
keys = {
{ "<leader>xx", "<cmd>TroubleToggle<CR>", desc = "Open/close trouble list" },
{ "<leader>xw", "<cmd>TroubleToggle workspace_diagnostics<CR>", desc = "Open trouble workspace diagnostics" },
{ "<leader>xd", "<cmd>TroubleToggle document_diagnostics<CR>", desc = "Open trouble document diagnostics" },
{ "<leader>xq", "<cmd>TroubleToggle quickfix<CR>", desc = "Open trouble quickfix list" },
{ "<leader>xl", "<cmd>TroubleToggle loclist<CR>", desc = "Open trouble location list" },
{ "<leader>xt", "<cmd>TodoTrouble<CR>", desc = "Open todos in trouble" },
},
}

View file

@ -0,0 +1,6 @@
return {
'szw/vim-maximizer',
keys = {
{ '<C-f>', '<cmd>MaximizerToggle<CR>', desc = 'Maximize/minimize a split' },
},
}

View file

@ -0,0 +1,13 @@
return {
'folke/which-key.nvim',
event = 'VeryLazy',
init = function()
vim.o.timeout = true
vim.o.timeoutlen = 300
end,
opts = {
-- your configuration comes here
-- or leave it empty to use the default settings
-- refer to the configuration section below
},
}