Compare commits

...

27 Commits

Author SHA1 Message Date
renovate[bot]
7e4ea90a05 fix(github-release): update python ( 3.12.6 → 3.12.7 ) (#34)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-02 23:35:20 +03:00
github-actions[bot]
d264a33d21 chore: update pre-commit hooks (#33)
Co-authored-by: ivuorinen <ivuorinen@users.noreply.github.com>
2024-10-01 09:26:30 +03:00
224ee56461 fix(workflow): pre-commit, run in the cloud 2024-10-01 08:51:27 +03:00
renovate[bot]
8147490c65 feat(github-action)!: Update peter-evans/create-pull-request ( v4 → v5 ) (#32)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-01 08:28:44 +03:00
renovate[bot]
c6d501347a feat(github-action)!: Update actions/setup-python ( v4.8.0 → v5.2.0 ) (#31)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-01 08:20:22 +03:00
renovate[bot]
d8044f2b6a feat(github-action)!: Update actions/checkout ( v3 → v4 ) (#30)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-01 08:12:02 +03:00
renovate[bot]
1b3fe6d12e feat(github-action): update actions/setup-python ( v4.5.0 → v4.8.0 )
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-30 21:05:17 +00:00
76b66d8c61 feat(workflow): pre-commit autoupdate 2024-09-30 21:41:56 +03:00
9c8644de17 feat(nvim): cleanup, fixes and helpers 2024-09-30 21:41:35 +03:00
120345b562 chore(nvim): ignore spell file changes 2024-09-30 02:49:16 +03:00
8accd4a60b chore(nvim): clear spell file 2024-09-30 02:42:19 +03:00
8fb03660ad chore(asdf): use system eza 2024-09-30 02:41:53 +03:00
8b2dc74f2a chore(brew): remove upstream removed font casks 2024-09-30 02:41:35 +03:00
8fa63e63bb chore(nvim): cleanup, formatting, fixes 2024-09-30 02:40:01 +03:00
4ca5b63b75 chore(nvim): more tweaks, cleanup and docs 2024-09-26 22:47:12 +03:00
5a59872377 chore(nvim): prefer telescope over fzf, cleanup 2024-09-26 14:16:28 +03:00
38419eda28 feat(nvim): refactoring, docs, keybinds, others 2024-09-26 13:38:31 +03:00
fc85dbaa6c chore(deps): pre-commit hooks update 2024-09-25 15:02:21 +03:00
250e7f5666 feat(nvim): keymaps tweaks, cleanup, docs 2024-09-25 14:52:56 +03:00
8f96922033 chore(asdf): add fzf to go packages 2024-09-25 14:49:26 +03:00
4c4de2dc26 chore(config): tweaks to path, show script name 2024-09-25 14:48:59 +03:00
b8c163e028 chore(deps): update tool-versions 2024-09-25 14:43:29 +03:00
0a974c2a17 chore(asdf): move eza to cargo packages 2024-09-25 14:43:11 +03:00
fd8d72ab38 chore(nvim): cleanup and keybindings 2024-09-23 16:25:54 +03:00
0908a23231 chore(asdf): add sops global version 2024-09-23 10:27:04 +03:00
2e070eed83 chore(docs): update nvim keybindings 2024-09-23 10:26:40 +03:00
e22762255d feat(nvim): configuration, refactoring, fixes 2024-09-23 09:52:11 +03:00
51 changed files with 1999 additions and 1396 deletions

View File

@@ -0,0 +1,23 @@
---
name: Pre-commit autoupdate
on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
jobs:
auto-update:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5.2.0
- run: pip install pre-commit && pre-commit autoupdate
- uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: update/pre-commit-hooks
title: "chore: update pre-commit hooks"
commit-message: "chore: update pre-commit hooks"
body: Update versions of pre-commit hooks to latest version.

2
.gitignore vendored
View File

@@ -26,4 +26,6 @@ config/iterm2/AppSupport
config/gnupg/S.* config/gnupg/S.*
config/gnupg/s config/gnupg/s
config/gnupg/private-keys-v1.d config/gnupg/private-keys-v1.d
config/nvim/spell/*
!config/nvim/spell/.gitkeep

View File

@@ -19,7 +19,7 @@ repos:
args: [--autofix, --no-sort-keys] args: [--autofix, --no-sort-keys]
- repo: https://github.com/igorshubovych/markdownlint-cli - repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.41.0 rev: v0.42.0
hooks: hooks:
- id: markdownlint - id: markdownlint
args: [-c, .markdownlint.yaml, --fix] args: [-c, .markdownlint.yaml, --fix]
@@ -45,6 +45,6 @@ repos:
- id: shfmt - id: shfmt
- repo: https://github.com/rhysd/actionlint - repo: https://github.com/rhysd/actionlint
rev: v1.7.1 rev: v1.7.3
hooks: hooks:
- id: actionlint - id: actionlint

View File

@@ -2,8 +2,8 @@ column_width = 120
line_endings = "Unix" line_endings = "Unix"
indent_type = "Spaces" indent_type = "Spaces"
indent_width = 2 indent_width = 2
quote_style = "AutoPreferDouble" quote_style = "AutoPreferSingle"
call_parentheses = "Always" call_parentheses = "None"
collapse_simple_statement = "Always" collapse_simple_statement = "Always"
[sort_requires] [sort_requires]

View File

@@ -1,2 +1,2 @@
python 3.12.6 python 3.12.7
nodejs 22.9.0 nodejs 22.9.0

View File

@@ -1,18 +1,17 @@
asdf-plugin-manager 1.3.1 asdf-plugin-manager 1.4.0
nodejs 22.8.0 nodejs 22.9.0
golang 1.23.1 golang 1.23.1
python 3.12.6 python 3.12.6
ruby 3.3.4 ruby 3.3.4
rust 1.81.0 rust 1.81.0
direnv 2.34.0 direnv 2.34.0
eza 0.19.3
fd 10.2.0 fd 10.2.0
1password-cli 2.30.0 1password-cli 2.30.0
age 1.2.0 age 1.2.0
bottom 0.10.2 bottom 0.10.2
dotenv-linter 3.3.0 dotenv-linter 3.3.0
editorconfig-checker 2.8.0 editorconfig-checker 2.8.0
github-cli 2.56.0 github-cli 2.57.0
hadolint 2.12.0 hadolint 2.12.0
kubectl 1.31.1 kubectl 1.31.1
pipx 1.7.1 pipx 1.7.1
@@ -20,11 +19,12 @@ pre-commit 3.8.0
ripgrep 14.1.1 ripgrep 14.1.1
shellcheck 0.10.0 shellcheck 0.10.0
shfmt 3.9.0 shfmt 3.9.0
terragrunt 0.67.5 terragrunt 0.67.10
tf-summarize 0.3.10 tf-summarize 0.3.10
yamllint 1.35.1 yamllint 1.35.1
yq 4.44.3 yq 4.44.3
bats 1.11.0 bats 1.11.0
gitleaks 8.18.4 gitleaks 8.18.4
delta 0.18.1 delta 0.18.1
lazygit 0.44.0 sops 3.9.0
eza system

View File

@@ -6,7 +6,7 @@
export DOTFILES="$HOME/.dotfiles" export DOTFILES="$HOME/.dotfiles"
LOCAL_SHARE="$HOME/.local/share" LOCAL_SHARE="$HOME/.local/share"
export PATH="$HOME/.local/bin:$DOTFILES/local/bin:$LOCAL_SHARE/nvim-kickstart/mason/bin:$LOCAL_SHARE/bob/nvim-bin:$LOCAL_SHARE/cargo/bin:/opt/homebrew/bin:/usr/local/bin:$PATH" export PATH="$HOME/.local/bin:$DOTFILES/local/bin:$LOCAL_SHARE/nvim/mason/bin:$LOCAL_SHARE/bob/nvim-bin:$LOCAL_SHARE/cargo/bin:/opt/homebrew/bin:/usr/local/bin:$PATH"
export SHARED_SCRIPTS_SOURCED=0 export SHARED_SCRIPTS_SOURCED=0
source "$DOTFILES/config/shared.sh" source "$DOTFILES/config/shared.sh"

View File

@@ -19,3 +19,5 @@ bob-nvim
// bottom, btm - A cross-platform graphical process/system monitor with // bottom, btm - A cross-platform graphical process/system monitor with
// a customizable interface and a multitude of features. // a customizable interface and a multitude of features.
bottom bottom
// A modern alternative to ls
eza

View File

@@ -17,3 +17,5 @@ github.com/charmbracelet/glow@v1.5.1
github.com/rhysd/actionlint/cmd/actionlint@v1.7.1 github.com/rhysd/actionlint/cmd/actionlint@v1.7.1
// Cleans up your $HOME from those pesky dotfiles // Cleans up your $HOME from those pesky dotfiles
github.com/doron-cohen/antidot@v0.6.3 github.com/doron-cohen/antidot@v0.6.3
// FZF is a general-purpose command-line fuzzy finder.
github.com/junegunn/fzf@latest

View File

@@ -5,7 +5,6 @@ bottom https://github.com/carbonteq/asdf-btm.git
direnv https://github.com/asdf-community/asdf-direnv.git a2219c2 direnv https://github.com/asdf-community/asdf-direnv.git a2219c2
dotenv-linter https://github.com/wesleimp/asdf-dotenv-linter.git 1369f53 dotenv-linter https://github.com/wesleimp/asdf-dotenv-linter.git 1369f53
editorconfig-checker https://github.com/gabitchov/asdf-editorconfig-checker.git 585c1d5 editorconfig-checker https://github.com/gabitchov/asdf-editorconfig-checker.git 585c1d5
eza https://github.com/lwiechec/asdf-eza.git eee3d59
fd https://gitlab.com/wt0f/asdf-fd.git 17d56e0 fd https://gitlab.com/wt0f/asdf-fd.git 17d56e0
github-cli https://github.com/bartlomiejdanek/asdf-github-cli.git e0605b7 github-cli https://github.com/bartlomiejdanek/asdf-github-cli.git e0605b7
golang https://github.com/asdf-community/asdf-golang.git 0e86b1d golang https://github.com/asdf-community/asdf-golang.git 0e86b1d

View File

@@ -1,3 +1,4 @@
ansible ansible
pipenv pipenv
semgrep semgrep
neovim

View File

@@ -204,8 +204,6 @@ cask "font-open-sans"
cask "font-roboto" cask "font-roboto"
cask "font-source-code-pro" cask "font-source-code-pro"
cask "font-source-code-pro-for-powerline" cask "font-source-code-pro-for-powerline"
cask "font-source-sans-pro"
cask "font-source-serif-pro"
# GIT client # GIT client
cask "fork" cask "fork"
# HTTP and GraphQL Client # HTTP and GraphQL Client

View File

@@ -9,3 +9,9 @@ insert_final_newline = true
charset = utf-8 charset = utf-8
indent_style = space indent_style = space
indent_size = 2 indent_size = 2
max_line_length = 120
trim_trailing_whitespace = true
[*.md]
max_line_length = off
trim_trailing_whitespace = false

3
config/nvim/.gitignore vendored Normal file
View File

@@ -0,0 +1,3 @@
spell/*
!spell/.gitkeep

View File

@@ -1,5 +0,0 @@
{
"diagnostics.globals": [
"vim"
]
}

View File

@@ -1,7 +1,11 @@
column_width = 160 column_width = 80
line_endings = "Unix" line_endings = "Unix"
indent_type = "Spaces" indent_type = "Spaces"
indent_width = 2 indent_width = 2
quote_style = "AutoPreferSingle" quote_style = "AutoPreferSingle"
call_parentheses = "None" call_parentheses = "None"
collapse_simple_statement = "Always"
[sort_requires]
enabled = true

View File

@@ -1,67 +1,61 @@
-- vim: ts=2 sts=2 sw=2 et -- ╭─────────────────────────────────────────────────────────╮
-- │ ivuorinen's Neovim configuration │
-- ╰─────────────────────────────────────────────────────────╯
-- Install lazylazy -- ── Install lazylazy ────────────────────────────────────────────────
-- https://github.com/folke/lazy.nvim -- https://github.com/folke/lazy.nvim
local lazypath = vim.fn.stdpath 'data' .. '/lazy/lazy.nvim' local lazypath = vim.fn.stdpath 'data' .. '/lazy/lazy.nvim'
if not vim.loop.fs_stat(lazypath) then if not (vim.uv or vim.loop).fs_stat(lazypath) then
vim.fn.system { local lazyrepo = 'https://github.com/folke/lazy.nvim.git'
local out = vim.fn.system {
'git', 'git',
'clone', 'clone',
'--filter=blob:none', '--filter=blob:none',
'https://github.com/folke/lazy.nvim.git', '--branch=stable',
'--branch=stable', -- latest stable release lazyrepo,
lazypath, lazypath,
} }
if vim.v.shell_error ~= 0 then
vim.api.nvim_echo({
{ 'Failed to clone lazy.nvim:\n', 'ErrorMsg' },
{ out, 'WarningMsg' },
{ '\nPress any key to exit...' },
}, true, {})
vim.fn.getchar()
os.exit(1)
end
end end
vim.opt.rtp:prepend(lazypath) vim.opt.rtp:prepend(lazypath)
-- ── Add ~/.local/bin to the PATH ────────────────────────────────────
vim.fn.setenv(
'PATH',
vim.fn.expand '$HOME/.local/bin' .. ':' .. vim.fn.expand '$PATH'
)
require 'options' require 'options'
require 'keymaps' require 'autogroups'
require('lazy').setup { -- ── Load plugins ────────────────────────────────────────────────────
checker = { require('lazy').setup(
-- Automatically check for updates -- Automatically load plugins from lua/plugins
enabled = true, 'plugins',
}, -- Lazy Configuration
spec = { {
-- Useful plugin to show you pending keybinds. checker = {
-- https://github.com/folke/which-key.nvim -- Automatically check for updates
{ enabled = true,
'folke/which-key.nvim', -- We don't want to be notified about updates
event = 'VimEnter', -- Sets the loading event to 'VimEnter' notify = false,
priority = 1001, -- Make sure to load this as soon as possible
config = function() -- This is the function that runs, AFTER loading
local wk = require 'which-key'
wk.setup()
wk.add {
{ '<leader>b', group = '[b] Buffer' },
{ '<leader>c', group = '[c] Code' },
{ '<leader>d', group = '[d] Document' },
{ '<leader>f', group = '[f] File' },
{ '<leader>g', group = '[g] Git' },
{ '<leader>l', group = '[l] LSP' },
{ '<leader>o', group = '[o] Open' },
{ '<leader>p', group = '[p] Project' },
{ '<leader>q', group = '[q] Quit' },
{ '<leader>s', group = '[s] Search' },
{ '<leader>t', group = '[t] Toggle' },
{ '<leader>w', group = '[w] Workspace' },
{ '<leader>z', group = '[x] FZF' },
{ '<leader>?', group = '[?] Help' },
{
'<leader>?w',
function()
wk.show { global = false }
end,
desc = 'Buffer Local Keymaps (which-key)',
},
}
end,
}, },
-- Import plugins from `lua/plugins` directory change_detection = {
{ import = 'plugins' }, -- No need to notify about changes
}, notify = false,
} },
install = {
colorscheme = { vim.g.colors_theme },
},
}
)
require 'config.misc' -- vim: ts=2 sts=2 sw=2 et

View File

@@ -0,0 +1,54 @@
-- ╭─────────────────────────────────────────────────────────╮
-- │ Autogroups │
-- ╰─────────────────────────────────────────────────────────╯
local augroup = vim.api.nvim_create_augroup -- Create/get autocommand group
local autocmd = vim.api.nvim_create_autocmd -- Create autocommand
-- ── Highlight on yank ───────────────────────────────────────────────
-- See `:help vim.highlight.on_yank()`
autocmd('TextYankPost', {
callback = function() vim.highlight.on_yank() end,
group = augroup('YankHighlight', { clear = true }),
pattern = '*',
})
-- ── Windows to close with "q" ───────────────────────────────────────
autocmd('FileType', {
group = augroup('close_with_q', { clear = true }),
pattern = {
'PlenaryTestPopup',
'checkhealth',
'dbout',
'gitsigns.blame',
'grug-far',
'help',
'lspinfo',
'man',
'neotest-output',
'neotest-output-panel',
'neotest-summary',
'notify',
'qf',
'spectre_panel',
'startuptime',
'tsplayground',
},
callback = function(event)
vim.bo[event.buf].buflisted = false
vim.keymap.set('n', 'q', '<cmd>close<cr>', {
buffer = event.buf,
silent = true,
desc = 'Quit buffer',
})
end,
})
-- ── make it easier to close man-files when opened inline ────────────
autocmd('FileType', {
group = augroup('man_unlisted', { clear = true }),
pattern = { 'man' },
callback = function(event) vim.bo[event.buf].buflisted = false end,
})
-- vim: ts=2 sts=2 sw=2 et

View File

@@ -1,10 +0,0 @@
-- Go
local format_sync_grp = vim.api.nvim_create_augroup('GoFormat', {})
vim.api.nvim_create_autocmd('BufWritePre', {
pattern = '*.go',
callback = function()
require('go.format').goimport()
end,
group = format_sync_grp,
})
require('go').setup()

View File

@@ -1,78 +0,0 @@
vim.api.nvim_set_keymap('i', 'jj', '<Esc>', { noremap = false })
-- twilight
vim.api.nvim_set_keymap('n', 'tw', ':Twilight<enter>', { noremap = false })
-- buffers
vim.api.nvim_set_keymap('n', '<leader>bk', ':blast<enter>', { desc = 'Last', noremap = false })
vim.api.nvim_set_keymap('n', '<leader>bj', ':bfirst<enter>', { desc = 'First', noremap = false })
vim.api.nvim_set_keymap('n', '<leader>bh', ':bprev<enter>', { desc = 'Prev', noremap = false })
vim.api.nvim_set_keymap('n', '<leader>bl', ':bnext<enter>', { desc = 'Next', noremap = false })
vim.api.nvim_set_keymap('n', '<leader>bd', ':bdelete<enter>', { desc = 'Delete', noremap = false })
vim.api.nvim_set_keymap('n', '<C-w>', ':bdelete<enter>', { desc = 'Delete buffer', noremap = false })
-- files
vim.api.nvim_set_keymap('n', 'QQ', ':q!<enter>', { desc = 'Quickly Quit', noremap = false })
vim.api.nvim_set_keymap('n', 'WW', ':w!<enter>', { desc = 'Force write', noremap = false })
vim.api.nvim_set_keymap('n', 'E', '$', { noremap = false })
vim.api.nvim_set_keymap('n', 'B', '^', { noremap = false })
vim.api.nvim_set_keymap('n', 'tT', ':TransparentToggle<CR>', { desc = 'Toggle Transparency', noremap = true })
vim.api.nvim_set_keymap('n', 'ss', ':noh<CR>', { noremap = true })
-- splits
vim.api.nvim_set_keymap('n', '<C-W>,', ':vertical resize -10<CR>', { desc = 'V Resize -', noremap = true })
vim.api.nvim_set_keymap('n', '<C-W>.', ':vertical resize +10<CR>', { desc = 'V Resize +', noremap = true })
-- Quicker close split
vim.keymap.set('n', '<leader>qf', ':q<CR>', { desc = 'Quicker close split', silent = true, noremap = true })
-- Keymaps for better default experience
-- See `:help vim.keymap.set()`
vim.keymap.set({ 'n', 'v' }, '<Space>', '<Nop>', { silent = true })
-- Remap for dealing with word wrap
vim.keymap.set('n', 'k', "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true })
vim.keymap.set('n', 'j', "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true })
-- Noice
vim.api.nvim_set_keymap('n', '<leader>nn', ':Noice dismiss<CR>', { desc = 'Noice dismiss', noremap = true })
vim.keymap.set('n', '<leader>xe', '<cmd>GoIfErr<cr>', { desc = 'Go If Error', silent = true, noremap = true })
-- TIP: Disable arrow keys in normal mode
vim.keymap.set('n', '<left>', '<cmd>echo "Use h to move!!"<CR>')
vim.keymap.set('n', '<right>', '<cmd>echo "Use l to move!!"<CR>')
vim.keymap.set('n', '<up>', '<cmd>echo "Use k to move!!"<CR>')
vim.keymap.set('n', '<down>', '<cmd>echo "Use j to move!!"<CR>')
-- Keybinds to make split navigation easier.
-- Use CTRL+<hjkl> to switch between windows
--
-- See `:help wincmd` for a list of all window commands
vim.keymap.set('n', '<C-h>', '<C-w><C-h>', { desc = 'Move focus to the left window' })
vim.keymap.set('n', '<C-l>', '<C-w><C-l>', { desc = 'Move focus to the right window' })
vim.keymap.set('n', '<C-j>', '<C-w><C-j>', { desc = 'Move focus to the lower window' })
vim.keymap.set('n', '<C-k>', '<C-w><C-k>', { desc = 'Move focus to the upper window' })
-- Old habits
vim.keymap.set('n', '<C-s>', '<cmd>w<CR>', { desc = 'Save file' })
vim.keymap.set('n', '<leader>qq', '<cmd>wq!<CR>', { desc = '[qq] Quickly Quit' })
-- Exit terminal mode in the builtin terminal with a shortcut that is a bit easier
-- for people to discover. Otherwise, you normally need to press <C-\><C-n>, which
-- is not what someone will guess without a bit more experience.
--
-- NOTE: This won't work in all terminal emulators/tmux/etc. Try your own mapping
-- or just use <C-\><C-n> to exit terminal mode
vim.keymap.set('t', '<Esc><Esc>', '<C-\\><C-n>', { desc = 'Exit terminal mode' })
-- [[ Highlight on yank ]]
-- See `:help vim.highlight.on_yank()`
local highlight_group = vim.api.nvim_create_augroup('YankHighlight', { clear = true })
vim.api.nvim_create_autocmd('TextYankPost', {
callback = function()
vim.highlight.on_yank()
end,
group = highlight_group,
pattern = '*',
})

View File

@@ -1,16 +1,25 @@
-- ╭─────────────────────────────────────────────────────────╮
-- │ neovim configuration options │
-- ╰─────────────────────────────────────────────────────────╯
-- See `:help vim.opt`
-- For more options, you can see `:help option-list`
-- Enables the experimental nvim 0.5 features
vim.loader.enable()
-- Map leader and local leader
vim.g.mapleader = ' ' vim.g.mapleader = ' '
vim.g.maplocalleader = ' ' vim.g.maplocalleader = ' '
-- Set to true if you have a Nerd Font installed and selected in the terminal -- Set the colorscheme and variants
vim.g.have_nerd_font = true vim.g.colors_theme = 'tokyonight'
vim.g.colors_variant_light = 'tokyonight-day'
vim.g.colors_variant_dark = 'tokyonight-storm'
-- Make sure editorconfig support is enabled -- Make sure editorconfig support is enabled
vim.g.editorconfig = true vim.g.editorconfig = true
-- [[ Setting options ]] -- Enable line numbers and relative line numbers
-- See `:help vim.opt`
-- For more options, you can see `:help option-list`
vim.opt.number = true vim.opt.number = true
vim.opt.relativenumber = true vim.opt.relativenumber = true
@@ -22,10 +31,10 @@ vim.opt.showmode = false
-- Sync clipboard between OS and Neovim. -- Sync clipboard between OS and Neovim.
-- Schedule the setting after `UiEnter` because it can increase startup-time. -- Schedule the setting after `UiEnter` because it can increase startup-time.
-- Remove this option if you want your OS clipboard to remain independent.
-- See `:help 'clipboard'` -- See `:help 'clipboard'`
vim.schedule(function() vim.schedule(function()
vim.opt.clipboard = 'unnamedplus' local c = vim.env.SSH_TTY and '' or 'unnamedplus'
vim.opt.clipboard = c
end) end)
vim.opt.breakindent = true -- Enable break indent vim.opt.breakindent = true -- Enable break indent
@@ -34,7 +43,8 @@ vim.opt.smartindent = true -- Insert indents automatically
-- Save undo history -- Save undo history
vim.opt.undofile = true vim.opt.undofile = true
-- Case-insensitive searching UNLESS \C or one or more capital letters in the search term -- Case-insensitive searching UNLESS \C or one or
-- more capital letters in the search term
vim.opt.ignorecase = true vim.opt.ignorecase = true
vim.opt.smartcase = true vim.opt.smartcase = true
@@ -47,7 +57,7 @@ vim.wo.signcolumn = 'yes'
-- Decrease mapped sequence wait time -- Decrease mapped sequence wait time
-- Displays which-key popup sooner -- Displays which-key popup sooner
vim.opt.timeoutlen = 300 vim.opt.timeoutlen = 250
-- Configure how new splits should be opened -- Configure how new splits should be opened
vim.opt.splitright = true vim.opt.splitright = true
@@ -66,15 +76,56 @@ vim.opt.inccommand = 'split'
vim.opt.cursorline = true vim.opt.cursorline = true
-- Minimal number of screen lines to keep above and below the cursor. -- Minimal number of screen lines to keep above and below the cursor.
vim.opt.scrolloff = 10 vim.opt.scrolloff = 15
-- Enable break indent
vim.o.breakindent = true
-- Save undo history
vim.o.undofile = true
-- Set completeopt to have a better completion experience -- Set completeopt to have a better completion experience
vim.o.completeopt = 'menuone,noselect' vim.o.completeopt = 'menuone,noselect'
-- Fixes Notify opacity issues -- Fixes Notify opacity issues
vim.o.termguicolors = true vim.o.termguicolors = true
-- Set spell checking
vim.o.spell = true
vim.o.spelllang = 'en_us'
-- Tree-sitter settings
vim.g.loaded_perl_provider = 0
vim.g.loaded_ruby_provider = 0
-- kevinhwang91/nvim-ufo settings
vim.o.fillchars = [[eob: ,fold: ,foldopen:,foldsep: ,foldclose:]]
vim.o.foldcolumn = '1' -- '0' is not bad
-- Using ufo provider need a large value, feel free to decrease the value
vim.o.foldlevel = 99
vim.o.foldlevelstart = 99
vim.o.foldenable = true
-- anuvyklack/windows.nvim settings
vim.o.winwidth = 15
vim.o.winminwidth = 10
vim.o.equalalways = false
-- folke/noice.nvim settings
vim.g.noice_ignored_filetypes = {
'fugitiveblame',
'fugitive',
'gitcommit',
'noice',
}
-- ── Deal with word wrap ───────────────────────────────────────────────────────
local m = vim.api.nvim_set_keymap
m(
'n',
'k',
"v:count == 0 ? 'gk' : 'k'",
{ desc = 'Move up', noremap = true, expr = true }
)
m(
'n',
'j',
"v:count == 0 ? 'gj' : 'j'",
{ desc = 'Move down', noremap = true, expr = true }
)
-- vim: ts=2 sts=2 sw=2 et

View File

@@ -1,38 +0,0 @@
-- Autoformat
-- https://github.com/stevearc/conform.nvim
return {
'stevearc/conform.nvim',
event = { 'BufWritePre' },
cmd = { 'ConformInfo' },
keys = {
{
'<leader>f',
function()
require('conform').format { async = true, lsp_fallback = true }
end,
mode = '',
desc = '[f] Format buffer',
},
},
opts = {
notify_on_error = false,
format_on_save = function(bufnr)
-- Disable "format_on_save lsp_fallback" for languages that don't
-- have a well standardized coding style. You can add additional
-- languages here or re-enable it for the disabled ones.
local disable_filetypes = { c = true, cpp = true }
return {
timeout_ms = 500,
lsp_fallback = not disable_filetypes[vim.bo[bufnr].filetype],
}
end,
formatters_by_ft = {
lua = { 'stylua' },
-- Conform can also run multiple formatters sequentially
-- python = { "isort", "black" },
--
-- You can use 'stop_after_first' to run the first available formatter from the list
javascript = { 'prettierd', 'prettier', stop_after_first = true },
},
},
}

View File

@@ -1,51 +1,104 @@
-- Auto completion
-- https://github.com/hrsh7th/nvim-cmp
return { return {
-- Autocompletion
-- https://github.com/hrsh7th/nvim-cmp
{ {
'hrsh7th/nvim-cmp', 'hrsh7th/nvim-cmp',
lazy = false,
version = false, -- Use the latest version of the plugin
event = 'InsertEnter', event = 'InsertEnter',
dependencies = { dependencies = {
'hrsh7th/cmp-nvim-lsp', 'hrsh7th/cmp-nvim-lsp',
'L3MON4D3/LuaSnip',
'saadparwaiz1/cmp_luasnip', -- ── LuaSnip Dependencies ────────────────────────────────────────────
-- Adds other completion capabilities. -- Snippet Engine for Neovim written in Lua.
-- nvim-cmp does not ship with all sources by default. They are split -- https://github.com/L3MON4D3/LuaSnip
-- into multiple repos for maintenance purposes. { 'L3MON4D3/LuaSnip', build = 'make install_jsregexp' },
'hrsh7th/cmp-nvim-lsp', -- luasnip completion source for nvim-cmp
'hrsh7th/cmp-path', -- https://github.com/saadparwaiz1/cmp_luasnip
'onsails/lspkind.nvim', { 'saadparwaiz1/cmp_luasnip' },
-- ── Adds other completion capabilities. ─────────────────────────────
-- ── nvim-cmp does not ship with all sources by default.
-- ── They are split into multiple repos for maintenance purposes.
{ 'hrsh7th/cmp-nvim-lsp' },
{ 'hrsh7th/cmp-buffer' },
{ 'hrsh7th/cmp-path' },
-- cmp import and use all environment variables from .env.* and system
-- https://github.com/SergioRibera/cmp-dotenv
{ 'SergioRibera/cmp-dotenv' },
-- ── Other deps ──────────────────────────────────────────────────────
-- vscode-like pictograms for neovim lsp completion items
-- https://github.com/onsails/lspkind.nvim
{ 'onsails/lspkind.nvim' },
-- Lua plugin to turn github copilot into a cmp source
-- https://github.com/zbirenbaum/copilot-cmp
{ {
'zbirenbaum/copilot-cmp', 'zbirenbaum/copilot-cmp',
dependencies = { dependencies = {
'zbirenbaum/copilot.lua', -- Fully featured & enhanced replacement for copilot.vim complete
-- with API for interacting with Github Copilot
-- https://github.com/zbirenbaum/copilot.lua
{
'zbirenbaum/copilot.lua',
cmd = 'Copilot',
build = ':Copilot setup',
event = { 'InsertEnter', 'LspAttach' },
opts = {
fix_pairs = true,
suggestion = { enabled = false },
panel = { enabled = false },
filetypes = {
markdown = true,
help = true,
},
},
},
}, },
config = function() config = function() require('copilot_cmp').setup() end,
require('copilot_cmp').setup()
end,
}, },
}, },
config = function() config = function()
-- nvim-cmp setup
local cmp = require 'cmp' local cmp = require 'cmp'
local luasnip = require 'luasnip' local luasnip = require 'luasnip'
local lspkind = require 'lspkind' local lspkind = require 'lspkind'
luasnip.config.setup {} luasnip.config.setup {}
require('copilot_cmp').setup()
local has_words_before = function()
if vim.api.nvim_get_option_value('buftype', {}) == 'prompt' then
return false
end
local line, col = table.unpack(vim.api.nvim_win_get_cursor(0))
return col ~= 0
and vim.api
.nvim_buf_get_text(0, line - 1, 0, line - 1, col, {})[1]
:match '^%s*$'
== nil
end
cmp.setup { cmp.setup {
formatting = { formatting = {
format = lspkind.cmp_format { format = lspkind.cmp_format {
mode = 'symbol', mode = 'symbol',
max_width = 50, max_width = function() return math.floor(0.45 * vim.o.columns) end,
symbol_map = { Copilot = '' }, show_labelDetails = true,
symbol_map = {
Copilot = '',
Text = '',
Constructor = '',
},
}, },
}, },
view = { view = {
entries = 'native', width = function(_, _) return math.min(80, vim.o.columns) end,
entries = {
name = 'custom',
selection_order = 'near_cursor',
},
}, },
snippet = { snippet = {
expand = function(args) expand = function(args) luasnip.lsp_expand(args.body) end,
luasnip.lsp_expand(args.body)
end,
}, },
mapping = cmp.mapping.preset.insert { mapping = cmp.mapping.preset.insert {
['<C-d>'] = cmp.mapping.scroll_docs(-4), ['<C-d>'] = cmp.mapping.scroll_docs(-4),
@@ -53,14 +106,14 @@ return {
-- Manually trigger a completion from nvim-cmp. -- Manually trigger a completion from nvim-cmp.
-- Generally you don't need this, because nvim-cmp will display -- Generally you don't need this, because nvim-cmp will display
-- completions whenever it has completion options available. -- completions whenever it has completion options available.
['<C-Space>'] = cmp.mapping.complete(), ['<C-c>'] = cmp.mapping.complete(),
['<CR>'] = cmp.mapping.confirm { ['<CR>'] = cmp.mapping.confirm {
behavior = cmp.ConfirmBehavior.Replace, behavior = cmp.ConfirmBehavior.Replace,
select = true, select = true,
}, },
['<Tab>'] = cmp.mapping(function(fallback) ['<Tab>'] = cmp.mapping(function(fallback)
if cmp.visible() then if cmp.visible() and has_words_before() then
cmp.select_next_item() cmp.select_next_item { behavior = cmp.SelectBehavior.Select }
elseif luasnip.expand_or_jumpable() then elseif luasnip.expand_or_jumpable() then
luasnip.expand_or_jump() luasnip.expand_or_jump()
else else
@@ -84,6 +137,26 @@ return {
{ name = 'nvim_lsp', group_index = 2 }, { name = 'nvim_lsp', group_index = 2 },
{ name = 'path', group_index = 2 }, { name = 'path', group_index = 2 },
{ name = 'luasnip', group_index = 2 }, { name = 'luasnip', group_index = 2 },
{ name = 'buffer', group_index = 2 },
{ name = 'dotenv', group_index = 2 },
},
sorting = {
priority_weight = 2,
comparators = {
require('copilot_cmp.comparators').prioritize,
-- Below is the default comparator list and order for nvim-cmp
cmp.config.compare.offset,
-- cmp.config.compare.scopes, --this is commented in nvim-cmp too
cmp.config.compare.exact,
cmp.config.compare.score,
cmp.config.compare.recently_used,
cmp.config.compare.locality,
cmp.config.compare.kind,
cmp.config.compare.sort_text,
cmp.config.compare.length,
cmp.config.compare.order,
},
}, },
} }
end, end,

View File

@@ -1,17 +0,0 @@
-- CoPilot
-- https://github.com/zbirenbaum/copilot.lua
return {
'zbirenbaum/copilot.lua',
cmd = 'Copilot',
build = ':Copilot setup',
event = { 'InsertEnter', 'LspAttach' },
fix_pairs = true,
opts = {
suggestion = { enabled = false },
panel = { enabled = false },
filetypes = {
markdown = true,
help = true,
},
},
}

View File

@@ -1,29 +1,25 @@
return { return {
'ray-x/go.nvim',
'ray-x/guihua.lua',
{ {
'rcarriga/nvim-dap-ui', 'rcarriga/nvim-dap-ui',
dependencies = { dependencies = {
'mfussenegger/nvim-dap', 'mfussenegger/nvim-dap',
'nvim-neotest/nvim-nio', 'nvim-neotest/nvim-nio',
'theHamsta/nvim-dap-virtual-text', 'theHamsta/nvim-dap-virtual-text',
'ray-x/go.nvim',
'ray-x/guihua.lua',
'leoluz/nvim-dap-go', 'leoluz/nvim-dap-go',
}, },
setup = function() setup = function()
require('dapui').setup() require('dapui').setup()
require('dap-go').setup() require('dap-go').setup()
require('nvim-dap-virtual-text').setup() require('nvim-dap-virtual-text').setup {}
vim.fn.sign_define('DapBreakpoint', { text = '🔴', texthl = 'DapBreakpoint', linehl = 'DapBreakpoint', numhl = 'DapBreakpoint' }) vim.fn.sign_define('DapBreakpoint', {
text = '🔴',
-- Debugger texthl = 'DapBreakpoint',
vim.api.nvim_set_keymap('n', '<leader>dt', ':DapUiToggle<CR>', { noremap = true }) linehl = 'DapBreakpoint',
vim.api.nvim_set_keymap('n', '<leader>db', ':DapToggleBreakpoint<CR>', { noremap = true }) numhl = 'DapBreakpoint',
vim.api.nvim_set_keymap('n', '<leader>dc', ':DapContinue<CR>', { noremap = true }) })
vim.api.nvim_set_keymap('n', '<leader>dr', ":lua require('dapui').open({reset = true})<CR>", { noremap = true })
vim.api.nvim_set_keymap('n', '<leader>ht', ":lua require('harpoon.ui').toggle_quick_menu()<CR>", { noremap = true })
end, end,
}, },
} }

View File

@@ -1,32 +0,0 @@
return {
-- fzf <3 vim
-- https://github.com/junegunn/fzf.vim
'junegunn/fzf.vim',
dependencies = {
{ 'junegunn/fzf', run = ':call fzf#install()' },
},
config = function()
-- Stolen from https://github.com/erikw/dotfiles/blob/d68d6274d67ac47afa20b9a0b9f3b0fa54bcdaf3/.config/nvim/lua/plugins.lua
-- Comment must be on line of its own...
-- Search for files in given path.
vim.keymap.set('n', '<Leader>zf', ':FZF<space>', { silent = true, desc = 'FZF: search for files in given path.' })
-- Sublime-like shortcut 'go to file' ctrl+p.
vim.keymap.set('n', '<C-p>', ':Files<CR>', { silent = true, desc = 'FZF: search for files starting at current directory.' })
vim.keymap.set('n', '<Leader>zc', ':Commands<CR>', { silent = true, desc = 'FZF: search commands.' })
vim.keymap.set('n', '<Leader>zt', ':Tags<CR>', { silent = true, desc = 'FZF: search in tags file' })
vim.keymap.set('n', '<Leader>zb', ':Buffers<CR>', { silent = true, desc = 'FZF: search open buffers.' })
-- Ref: https://medium.com/@paulodiovani/vim-buffers-windows-and-tabs-an-overview-8e2a57c57afa).
vim.keymap.set('n', '<Leader>zt', ':Windows<CR>', { silent = true, desc = 'FZF: search open tabs.' })
vim.keymap.set('n', '<Leader>zh', ':History<CR>', { silent = true, desc = 'FZF: search history of opened files' })
vim.keymap.set('n', '<Leader>zm', ':Maps<CR>', { silent = true, desc = 'FZF: search mappings.' })
vim.keymap.set('n', '<Leader>zg', ':Rg<CR>', { silent = true, desc = 'FZF: search with rg (aka live grep).' })
-- To ignore a certain path in a git project from both RG and FD used by FZF,
-- the eaiest way is to create ignore files and exclude the in local git clone.
-- Ref: https://stackoverflow.com/a/1753078/265508
-- $ cd git_proj/
-- $ echo "path/to/exclude" > .rgignore
-- $ echo "path/to/exclude" > .fdignore
-- $ printf ".rgignore\n.fdignore" >> .git/info/exclude
end,
}

View File

@@ -1,116 +0,0 @@
return {
-- fugitive.vim: A Git wrapper so awesome, it should be illegal
-- https://github.com/tpope/vim-fugitive
{ 'tpope/vim-fugitive' },
-- Git integration for buffers
-- https://github.com/lewis6991/gitsigns.nvim
{
'lewis6991/gitsigns.nvim',
config = function()
require('gitsigns').setup {
signs = {
add = { text = '+' },
change = { text = '~' },
delete = { text = '_' },
topdelete = { text = '' },
changedelete = { text = '~' },
},
current_line_blame = false,
on_attach = function(bufnr)
local gs = package.loaded.gitsigns
local function map(mode, l, r, opts)
opts = opts or {}
opts.buffer = bufnr
vim.keymap.set(mode, l, r, opts)
end
-- Navigation
map('n', ']c', function()
if vim.wo.diff then
return ']c'
end
vim.schedule(function()
gs.next_hunk()
end)
return '<Ignore>'
end, { expr = true })
map('n', '[c', function()
if vim.wo.diff then
return '[c'
end
vim.schedule(function()
gs.prev_hunk()
end)
return '<Ignore>'
end, { expr = true })
-- Actions
map({ 'n', 'v' }, '<leader>hs', ':Gitsigns stage_hunk<CR>')
map({ 'n', 'v' }, '<leader>hr', ':Gitsigns reset_hunk<CR>')
map('n', '<leader>hS', gs.stage_buffer)
map('n', '<leader>ha', gs.stage_hunk)
map('n', '<leader>hu', gs.undo_stage_hunk)
map('n', '<leader>hR', gs.reset_buffer)
map('n', '<leader>hp', gs.preview_hunk)
map('n', '<leader>hb', function()
gs.blame_line { full = true }
end)
map('n', '<leader>tB', gs.toggle_current_line_blame)
map('n', '<leader>hd', gs.diffthis)
map('n', '<leader>hD', function()
gs.diffthis '~'
end)
-- Text object
map({ 'o', 'x' }, 'ih', ':<C-U>Gitsigns select_hunk<CR>')
end,
}
end,
},
-- git-worktree.nvim: Manage git worktrees
-- https://github.com/ThePrimeagen/git-worktree.nvim
{
'ThePrimeagen/git-worktree.nvim',
config = function()
require('git-worktree').setup()
end,
},
-- An interactive and powerful Git interface for Neovim, inspired by Magit
-- https://github.com/NeogitOrg/neogit
{
'NeogitOrg/neogit',
config = function()
-- This contains mainly Neogit but also a bunch of Git settings
-- like fetching branches with telescope or blaming with fugitive
local neogit = require 'neogit'
vim.keymap.set('n', '<leader>gs', neogit.open, { silent = true, noremap = true })
vim.keymap.set('n', '<leader>gc', ':Neogit commit<CR>', { silent = true, noremap = true })
vim.keymap.set('n', '<leader>gp', ':Neogit pull<CR>', { silent = true, noremap = true })
vim.keymap.set('n', '<leader>gP', ':Neogit push<CR>', { silent = true, noremap = true })
vim.keymap.set('n', '<leader>gb', ':Telescope git_branches<CR>', { silent = true, noremap = true })
vim.keymap.set('n', '<leader>gB', ':G blame<CR>', { silent = true, noremap = true })
neogit.setup {
disable_commit_confirmation = true,
disable_signs = false,
disable_context_highlighting = false,
disable_builtin_notifications = false,
signs = {
section = { '', '' },
item = { '', '' },
hunk = { '', '' },
},
integrations = {
diffview = true,
},
}
end,
},
}

View File

@@ -1,29 +1,30 @@
-- A small Neovim plugin for previewing definitions using floating windows.
-- https://github.com/rmagatti/goto-preview
return { return {
-- A small Neovim plugin for previewing definitions using floating windows.
-- https://github.com/rmagatti/goto-preview
'rmagatti/goto-preview', 'rmagatti/goto-preview',
config = function() dependencies = {
require('goto-preview').setup { { 'nvim-telescope/telescope.nvim' },
width = 120, -- Width of the floating window },
height = 15, -- Height of the floating window opts = {
border = { '', '', '', '', '', '', '', '' }, -- Border characters of the floating window width = 120, -- Width of the floating window
default_mappings = true, height = 15, -- Height of the floating window
debug = false, -- Print debug information border = { '', '', '', '', '', '', '', '' }, -- Border characters of the floating window
opacity = nil, -- 0-100 opacity level of the floating window where 100 is fully transparent. default_mappings = true,
resizing_mappings = false, -- Binds arrow keys to resizing the floating window. debug = false, -- Print debug information
post_open_hook = nil, -- A function taking two arguments, a buffer and a window to be ran as a hook. opacity = nil, -- 0-100 opacity level of the floating window where 100 is fully transparent.
references = { -- Configure the telescope UI for slowing the references cycling window. resizing_mappings = false, -- Binds arrow keys to resizing the floating window.
telescope = require('telescope.themes').get_dropdown { post_open_hook = nil, -- A function taking two arguments, a buffer and a window to be ran as a hook.
hide_preview = false, references = { -- Configure the telescope UI for slowing the references cycling window.
}, telescope = require('telescope.themes').get_dropdown {
hide_preview = false,
}, },
-- These two configs can also be passed down to the goto-preview definition and implementation calls for one off "peak" functionality. },
focus_on_open = true, -- Focus the floating window when opening it. -- These two configs can also be passed down to the goto-preview definition and implementation calls for one off "peak" functionality.
dismiss_on_move = false, -- Dismiss the floating window when moving the cursor. focus_on_open = true, -- Focus the floating window when opening it.
force_close = true, -- passed into vim.api.nvim_win_close's second argument. See :h nvim_win_close dismiss_on_move = false, -- Dismiss the floating window when moving the cursor.
bufhidden = 'wipe', -- the bufhidden option to set on the floating window. See :h bufhidden force_close = true, -- passed into vim.api.nvim_win_close's second argument. See :h nvim_win_close
stack_floating_preview_windows = true, -- Whether to nest floating windows bufhidden = 'wipe', -- the bufhidden option to set on the floating window. See :h bufhidden
preview_window_title = { enable = true, position = 'left' }, stack_floating_preview_windows = true, -- Whether to nest floating windows
} preview_window_title = { enable = true, position = 'left' },
end, },
} }

View File

@@ -1,103 +0,0 @@
return {
-- Getting you where you want with the fewest keystrokes.
-- https://github.com/ThePrimeagen/harpoon
{
'ThePrimeagen/harpoon',
branch = 'harpoon2',
dependencies = {
'nvim-lua/plenary.nvim',
'nvim-telescope/telescope.nvim',
},
config = function()
local harpoon = require 'harpoon'
harpoon:setup {}
vim.keymap.set('n', '<leader>ht', function()
harpoon.ui:toggle_quick_menu(harpoon:list())
end)
-- basic telescope configuration
local conf = require('telescope.config').values
local function toggle_telescope(harpoon_files)
local file_paths = {}
for _, item in ipairs(harpoon_files.items) do
table.insert(file_paths, item.value)
end
require('telescope.pickers')
.new({}, {
prompt_title = 'Harpoon',
finder = require('telescope.finders').new_table {
results = file_paths,
},
previewer = conf.file_previewer {},
sorter = conf.generic_sorter {},
})
:find()
end
vim.keymap.set('n', '<leader>xa', function()
toggle_telescope(harpoon:list())
end, { desc = 'Open harpoon window' })
end,
keys = {
{
'<leader>xa',
function()
require('harpoon'):list():add()
end,
desc = 'harpoon file',
},
{
'<leader>xN',
function()
require('harpoon'):list():prev()
end,
desc = 'harpoon to previous file',
},
{
'<leader>xn',
function()
require('harpoon'):list():next()
end,
desc = 'harpoon to next file',
},
{
'<leader>1',
function()
require('harpoon'):list():select(1)
end,
desc = 'harpoon to file 1',
},
{
'<leader>2',
function()
require('harpoon'):list():select(2)
end,
desc = 'harpoon to file 2',
},
{
'<leader>3',
function()
require('harpoon'):list():select(3)
end,
desc = 'harpoon to file 3',
},
{
'<leader>4',
function()
require('harpoon'):list():select(4)
end,
desc = 'harpoon to file 4',
},
{
'<leader>5',
function()
require('harpoon'):list():select(5)
end,
desc = 'harpoon to file 5',
},
},
},
}

View File

@@ -1,51 +1,58 @@
return { return {
-- vscode-like pictograms for neovim lsp completion items
-- https://github.com/onsails/lspkind-nvim
{ 'onsails/lspkind.nvim' },
-- Rethinking Vim as a tool for writing -- A better annotation generator.
-- https://github.com/preservim/vim-pencil -- Supports multiple languages and annotation conventions.
{ 'preservim/vim-pencil' }, -- https://github.com/danymat/neogen
{
'danymat/neogen',
version = '*',
opts = { enabled = true, snippet_engine = 'luasnip' },
},
-- obsession.vim: continuously updated session files -- The Refactoring library based off the Refactoring book by Martin Fowler
-- https://github.com/tpope/vim-obsession -- https://github.com/ThePrimeagen/refactoring.nvim
{ 'tpope/vim-obsession' }, {
'ThePrimeagen/refactoring.nvim',
version = '*',
dependencies = { 'nvim-lua/plenary.nvim', 'nvim-treesitter/nvim-treesitter' },
opts = {},
},
-- surround.vim: Delete/change/add parentheses/quotes/XML-tags/much more with ease -- All the npm/yarn/pnpm commands I don't want to type
-- https://github.com/tpope/vim-surround -- https://github.com/vuki656/package-info.nvim
{ 'tpope/vim-surround' }, {
'vuki656/package-info.nvim',
version = '*',
dependencies = { 'MunifTanjim/nui.nvim' },
opts = {},
},
-- Add/change/delete surrounding delimiter pairs with ease. Written with ❤️ in Lua.
-- https://github.com/kylechui/nvim-surround
{
'kylechui/nvim-surround',
version = '*',
event = 'VeryLazy',
opts = {},
},
-- Highlight, list and search todo comments in your projects -- Highlight, list and search todo comments in your projects
-- https://github.com/folke/todo-comments.nvim -- https://github.com/folke/todo-comments.nvim
{ {
'folke/todo-comments.nvim', 'folke/todo-comments.nvim',
dependencies = 'nvim-lua/plenary.nvim', version = '*',
config = function() dependencies = { 'nvim-lua/plenary.nvim' },
require('todo-comments').setup {}
end,
},
-- LSP Configuration & Plugins
-- Meta type definitions for the Lua platform Luvit.
-- https://github.com/Bilal2453/luvit-meta
{ 'Bilal2453/luvit-meta', lazy = true },
-- Indent guides for Neovim
-- https://github.com/lukas-reineke/indent-blankline.nvim
{
'lukas-reineke/indent-blankline.nvim',
main = 'ibl',
opts = {}, opts = {},
}, },
-- Commenting -- Commenting
-- "gc" to comment visual regions/lines
-- https://github.com/numToStr/Comment.nvim -- https://github.com/numToStr/Comment.nvim
{ {
'numToStr/Comment.nvim', -- "gc" to comment visual regions/lines 'numToStr/Comment.nvim',
version = '*',
event = { 'BufRead', 'BufNewFile' }, event = { 'BufRead', 'BufNewFile' },
config = function() opts = {},
require('Comment').setup()
end,
}, },
-- Detect tabstop and shiftwidth automatically -- Detect tabstop and shiftwidth automatically

View File

@@ -1,55 +0,0 @@
return {
{ -- Linting
'mfussenegger/nvim-lint',
event = { 'BufReadPre', 'BufNewFile' },
config = function()
local lint = require 'lint'
lint.linters_by_ft = {
markdown = { 'markdownlint' },
}
-- To allow other plugins to add linters to require('lint').linters_by_ft,
-- instead set linters_by_ft like this:
-- lint.linters_by_ft = lint.linters_by_ft or {}
-- lint.linters_by_ft['markdown'] = { 'markdownlint' }
--
-- However, note that this will enable a set of default linters,
-- which will cause errors unless these tools are available:
-- {
-- clojure = { "clj-kondo" },
-- dockerfile = { "hadolint" },
-- inko = { "inko" },
-- janet = { "janet" },
-- json = { "jsonlint" },
-- markdown = { "vale" },
-- rst = { "vale" },
-- ruby = { "ruby" },
-- terraform = { "tflint" },
-- text = { "vale" }
-- }
--
-- You can disable the default linters by setting their filetypes to nil:
-- lint.linters_by_ft['clojure'] = nil
-- lint.linters_by_ft['dockerfile'] = nil
-- lint.linters_by_ft['inko'] = nil
-- lint.linters_by_ft['janet'] = nil
-- lint.linters_by_ft['json'] = nil
-- lint.linters_by_ft['markdown'] = nil
-- lint.linters_by_ft['rst'] = nil
-- lint.linters_by_ft['ruby'] = nil
-- lint.linters_by_ft['terraform'] = nil
-- lint.linters_by_ft['text'] = nil
-- Create autocommand which carries out the actual linting
-- on the specified events.
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,
})
end,
},
}

View File

@@ -1,254 +1,431 @@
-- Quickstart configs for Nvim LSP -- Quick start configs for Nvim LSP
-- https://github.com/neovim/nvim-lspconfig -- https://github.com/neovim/nvim-lspconfig
return { return {
'neovim/nvim-lspconfig', {
dependencies = { 'neovim/nvim-lspconfig',
-- Automatically install LSPs to stdpath for neovim lazy = false,
'williamboman/mason.nvim', dependencies = {
'williamboman/mason-lspconfig.nvim', -- ── Mason and LSPConfig integration ─────────────────────────────────
'WhoIsSethDaniel/mason-tool-installer.nvim', -- Automatically install LSPs to stdpath for neovim
-- Useful status updates for LSP
{ -- Portable package manager for Neovim that runs everywhere Neovim runs.
'j-hui/fidget.nvim', -- Easily install and manage LSP servers, DAP servers, linters, and formatters.
opts = { -- https://github.com/williamboman/mason.nvim
notification = { {
window = { 'williamboman/mason.nvim',
winblend = 50, cmd = 'Mason',
align = 'top', run = ':MasonUpdate',
},
-- Extension to mason.nvim that makes it easier to use lspconfig with mason.nvim.
-- https://github.com/williamboman/mason-lspconfig.nvim
{ 'williamboman/mason-lspconfig.nvim' },
-- ── Formatting ──────────────────────────────────────────────────────
-- Lightweight yet powerful formatter plugin for Neovim
-- https://github.com/stevearc/conform.nvim
{
'stevearc/conform.nvim',
event = { 'BufWritePre' },
cmd = { 'ConformInfo' },
config = function()
-- Select first conform formatter that is available
---@param bufnr integer
---@param ... string
---@return string
local function first(bufnr, ...)
local conform = require 'conform'
for i = 1, select('#', ...) do
local formatter = select(i, ...)
if conform.get_formatter_info(formatter, bufnr).available then
return formatter
end
end
return select(1, ...)
end
require('conform').setup {
-- Enable or disable logging
notify_on_error = true,
-- Set the default formatter for all filetypes
default_formatter = 'injected',
-- Set the default formatter for all filetypes
default_formatter_opts = {
lsp_format = 'fallback',
-- Set the default formatter for all filetypes
-- formatter = 'injected',
-- Set the default formatter for all filetypes
-- formatter_opts = {},
},
formatters_by_ft = {
markdown = function(bufnr)
return { first(bufnr, 'prettierd', 'prettier'), 'injected' }
end,
javascript = function(bufnr)
return { first(bufnr, 'prettier', 'eslint'), 'injected' }
end,
lua = { 'stylua' },
-- Conform will run multiple formatters sequentially
-- python = { 'isort', 'black', lsp_format = 'fallback' },
-- You can customize some of the format options for the filetype (:help conform.format)
-- rust = { 'rustfmt', lsp_format = 'fallback' },
},
format_on_save = function(bufnr)
-- Disable autoformat on certain filetypes
local ignore_filetypes = {
'c',
'cpp',
'sql',
'java',
}
if vim.tbl_contains(ignore_filetypes, vim.bo[bufnr].filetype) then
return
end
-- Disable with a global or buffer-local variable
if
vim.g.disable_autoformat or vim.b[bufnr].disable_autoformat
then
return
end
-- Disable autoformat for files in a certain path
local bufname = vim.api.nvim_buf_get_name(bufnr)
if bufname:match '/node_modules/' then return end
if bufname:match '/vendor/' then return end
if bufname:match '/dist/' then return end
if bufname:match '/build/' then return end
return { timeout_ms = 500, lsp_format = 'fallback' }
end,
}
end,
init = function()
-- If you want the formatexpr, here is the place to set it
vim.o.formatexpr = "v:lua.require'conform'.formatexpr()"
end,
},
-- ── Misc ────────────────────────────────────────────────────────────
-- vscode-like pictograms for neovim lsp completion items
-- https://github.com/onsails/lspkind-nvim
{ 'onsails/lspkind.nvim' },
-- JSON schemas for Neovim
-- https://github.com/b0o/SchemaStore.nvim
{ 'b0o/schemastore.nvim' },
},
config = function()
-- ── LSP settings. ───────────────────────────────────────────────────
-- This function gets run when an LSP connects to a particular buffer.
-- Make runtime files discoverable to the server
local runtime_path = vim.split(package.path, ';')
table.insert(runtime_path, 'lua/?.lua')
table.insert(runtime_path, 'lua/?/init.lua')
-- Generate a command `:Format` local to the LSP buffer
--
---@param _ nil Skipped
---@param bufnr number Buffer number
---@output nil
local on_attach = function(_, bufnr)
-- Create a command `:Format` local to the LSP buffer
vim.api.nvim_create_user_command('Format', function(args)
local range = nil
if args.count ~= -1 then
local end_line = vim.api.nvim_buf_get_lines(
bufnr,
args.line2 - 1,
args.line2,
true
)[1]
range = {
start = { args.line1, 0 },
['end'] = { args.line2, end_line:len() },
}
end
require('conform').format {
async = true,
lsp_format = 'fallback',
range = range,
}
end, { range = true, desc = 'Format current buffer with LSP' })
end
-- ── Enable the following language servers ───────────────────────────
-- :help lspconfig-all for all pre-configured LSPs
local servers = {
bashls = {}, -- Bash
-- csharp_ls = {}, -- C#, requires dotnet executable
gopls = {}, -- Go
html = {}, -- HTML
intelephense = {}, -- PHP
tailwindcss = {}, -- Tailwind CSS
ts_ls = {}, -- TypeScript
volar = {}, -- Vue
lua_ls = {
settings = {
Lua = {
runtime = {
-- Tell the language server which version of Lua you're using (most likely LuaJIT)
version = 'LuaJIT',
-- Setup your lua path
path = runtime_path,
},
diagnostics = {
globals = { 'vim' },
disable = {
-- Ignore Lua_LS's noisy `missing-fields` warnings
'missing-fields',
},
},
workspace = {
library = vim.api.nvim_get_runtime_file('', true),
checkThirdParty = false,
},
-- Do not send telemetry data containing a randomized but unique identifier
telemetry = { enable = false },
completion = {
callSnippet = 'Replace',
},
},
}, },
}, },
}, jsonls = {
settings = {
json = {
schemas = require('schemastore').json.schemas(),
validate = { enable = true },
},
yaml = {
schemaStore = {
-- You must disable built-in schemaStore support if you want to use
-- this plugin and its advanced options like `ignore`.
enable = false,
-- Avoid TypeError: Cannot read properties of undefined (reading 'length')
url = '',
},
schemas = require('schemastore').yaml.schemas(),
validate = { enable = true },
},
},
},
}
-- Mason servers should be it's own variable for mason-nvim-lint
-- See: https://mason-registry.dev/registry/list
local mason_servers = {
'bash-language-server',
'clang-format',
'codespell',
'commitlint',
'diagnostic-languageserver',
'editorconfig-checker',
'fixjson',
'jsonlint',
'lua-language-server',
'luacheck',
'phpcbf',
'phpcs',
'phpmd',
'prettier',
'shellcheck',
'shfmt',
'stylua',
'vim-language-server',
'vue-language-server',
'yamllint',
}
local ensure_installed = vim.tbl_keys(servers or {})
vim.list_extend(ensure_installed, mason_servers)
-- ── Setup mason so it can manage external tooling ───────────────────
require('mason').setup {
ensure_installed = ensure_installed,
automatic_installation = true,
}
-- nvim-cmp supports additional completion capabilities
local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities)
-- Tell the server the capability of foldingRange,
-- Neovim hasn't added foldingRange to default capabilities, users must add it manually
capabilities.textDocument.foldingRange = {
dynamicRegistration = true,
lineFoldingOnly = true,
}
capabilities.textDocument.completion.completionItem.snippetSupport = true
capabilities.textDocument.completion.completionItem.resolveSupport = {
properties = {
'documentation',
'detail',
'additionalTextEdits',
},
}
local lspconfig_handlers = {
-- The first entry (without a key) will be the default handler
-- and will be called for each installed server that doesn't have
-- a dedicated handler.
function(server_name) -- default handler (optional)
require('lspconfig')[server_name].setup {
on_attach = on_attach,
capabilities = capabilities,
}
end,
-- Next, you can provide targeted overrides for specific servers.
['lua_ls'] = function()
require('lspconfig')['lua_ls'].setup { settings = servers.lua_ls }
end,
['jsonls'] = function()
require('lspconfig')['jsonls'].setup { settings = servers.jsonls }
end,
}
require('mason-lspconfig').setup {
ensure_installed = vim.tbl_keys(servers or {}),
automatic_installation = true,
handlers = lspconfig_handlers,
}
end,
},
-- Garbage collector that stops inactive LSP clients to free RAM
-- https://github.com/Zeioth/garbage-day.nvim
{
'zeioth/garbage-day.nvim',
dependencies = 'neovim/nvim-lspconfig',
event = 'VeryLazy',
opts = {},
},
-- improve neovim lsp experience
-- https://github.com/nvimdev/lspsaga.nvim
-- https://nvimdev.github.io/lspsaga/
{
'nvimdev/lspsaga.nvim',
event = 'LspAttach',
dependencies = {
'nvim-treesitter/nvim-treesitter', -- optional
'nvim-tree/nvim-web-devicons', -- optional
}, },
'b0o/schemastore.nvim', opts = {
{ code_action = {
-- `lazydev` configures Lua LSP for your Neovim config, runtime and plugins show_server_name = true,
-- used for completion, annotations and signatures of Neovim apis },
'folke/lazydev.nvim', diagnostic = {
ft = 'lua', keys = {
opts = { quit = { 'q', '<ESC>' },
library = {
-- Load luvit types when the `vim.uv` word is found
{ path = 'luvit-meta/library', words = { 'vim%.uv' } },
}, },
}, },
}, },
}, },
config = function()
-- Diagnostic keymaps
vim.keymap.set('n', 'dp', vim.diagnostic.goto_prev, { desc = 'Diagnostic: Goto Prev' })
vim.keymap.set('n', 'dn', vim.diagnostic.goto_next, { desc = 'Diagnostic: Goto Next' })
vim.keymap.set('n', '<leader>do', vim.diagnostic.open_float, { desc = 'Diagnostic: Open float' })
vim.keymap.set('n', '<leader>dq', vim.diagnostic.setloclist, { desc = 'Diagnostic: Set loc list' })
-- LSP settings. -- Not UFO in the sky, but an ultra fold in Neovim.
-- This function gets run when an LSP connects to a particular buffer. -- https://github.com/kevinhwang91/nvim-ufo/
local on_attach = function(_, bufnr) {
local nmap = function(keys, func, desc) 'kevinhwang91/nvim-ufo',
if desc then version = '*',
desc = 'LSP: ' .. desc dependencies = {
end { 'neovim/nvim-lspconfig' },
{ 'kevinhwang91/promise-async' },
vim.keymap.set('n', keys, func, { buffer = bufnr, desc = desc }) { 'nvim-treesitter/nvim-treesitter', run = ':TSUpdate' },
end {
-- Status column plugin that provides a configurable
nmap('<leader>rn', vim.lsp.buf.rename, '[R]e[n]ame') -- 'statuscolumn' and click handlers.
nmap('<leader>ca', vim.lsp.buf.code_action, '[C]ode [A]ction') -- https://github.com/luukvbaal/statuscol.nvim
nmap('gd', vim.lsp.buf.definition, '[G]oto [D]efinition') 'luukvbaal/statuscol.nvim',
nmap('gr', require('telescope.builtin').lsp_references, '[G]oto [R]eferences') config = function()
nmap('gI', vim.lsp.buf.implementation, '[G]oto [I]mplementation') local builtin = require 'statuscol.builtin'
nmap('<leader>D', vim.lsp.buf.type_definition, 'Type [D]efinition') require('statuscol').setup {
nmap('<leader>ds', require('telescope.builtin').lsp_document_symbols, '[D]ocument [S]ymbols') relculright = true,
nmap('<leader>ws', require('telescope.builtin').lsp_dynamic_workspace_symbols, '[W]orkspace [S]ymbols') segments = {
{
-- See `:help K` for why this keymap text = { builtin.foldfunc },
nmap('K', vim.lsp.buf.hover, 'Hover Documentation') click = 'v:lua.ScFa',
nmap('<C-k>', vim.lsp.buf.signature_help, 'Signature Documentation') },
{
-- Lesser used LSP functionality sign = {
nmap('gD', vim.lsp.buf.declaration, '[G]oto [D]eclaration') namespace = { 'diagnostic/signs' },
nmap('<leader>wa', vim.lsp.buf.add_workspace_folder, '[W]orkspace [A]dd Folder') maxwidth = 2,
nmap('<leader>wr', vim.lsp.buf.remove_workspace_folder, '[W]orkspace [R]emove Folder') -- auto = true,
nmap('<leader>wl', function() },
print(vim.inspect(vim.lsp.buf.list_workspace_folders())) click = 'v:lua.ScSa',
end, '[W]orkspace [L]ist Folders') },
{
-- Create a command `:Format` local to the LSP buffer text = { builtin.lnumfunc, ' ' },
vim.api.nvim_buf_create_user_command(bufnr, 'Format', function(_) click = 'v:lua.ScLa',
if vim.lsp.buf.format then },
vim.lsp.buf.format()
elseif vim.lsp.buf.formatting then
vim.lsp.buf.formatting()
end
end, { desc = 'Format current buffer with LSP' })
end
-- Setup mason so it can manage external tooling
require('mason').setup()
-- Enable the following language servers
-- Feel free to add/remove any LSPs that you want here. They will automatically be installed.
local servers = {
-- :help lspconfig-all for all pre-configured LSPs
ast_grep = {},
actionlint = {}, -- GitHub Actions
ansiblels = {}, -- Ansible
bashls = {}, -- Bash
css_variables = {}, -- CSS
cssls = {}, -- CSS
docker_compose_language_service = {}, -- Docker compose
dockerls = {}, -- Docker
eslint = {}, -- ESLint
gitlab_ci_ls = {}, -- GitLab CI
gopls = {}, -- Go
grammarly = {}, -- Grammar and better writing
html = {}, -- HTML
intelephense = {}, -- PHP
jinja_lsp = {}, -- Jinja templates
pest_ls = {}, -- Pest (PHP)
phpactor = {}, -- PHP
psalm = {}, -- PHP
pyright = {}, -- Python
semgrep = {}, -- Security
shellcheck = {}, -- Shell scripts
shfmt = {}, -- Shell scripts formatting
stylelint_lsp = {}, -- Stylelint for S/CSS
stylua = {}, -- Used to format Lua code
tailwindcss = {}, -- Tailwind CSS
terraformls = {}, -- Terraform
tflint = {}, -- Terraform
ts_ls = {}, -- TypeScript/JS
typos_lsp = {}, -- Better writing
volar = {}, -- Vue
yamlls = {}, -- YAML
lua_ls = {
-- cmd = {...},
-- filetypes = { ...},
-- capabilities = {},
settings = {
Lua = {
completion = {
callSnippet = 'Replace',
}, },
-- You can toggle below to ignore Lua_LS's noisy `missing-fields` warnings }
diagnostics = { disable = { 'missing-fields' } }, end,
}, },
},
opts = {
open_fold_hl_timeout = 150,
close_fold_kinds_for_ft = { 'imports', 'comment' },
preview = {
win_config = {
border = { '', '', '', '', '', '', '', '' },
winhighlight = 'Normal:Folded',
winblend = 0,
},
mappings = {
scrollU = '<C-u>',
scrollD = '<C-d>',
jumpTop = '[',
jumpBot = ']',
}, },
}, },
jsonls = {
settings = {
json = {
schemas = require('schemastore').json.schemas(),
validate = { enable = true },
},
yaml = {
schemaStore = {
-- You must disable built-in schemaStore support if you want to use
-- this plugin and its advanced options like `ignore`.
enable = false,
-- Avoid TypeError: Cannot read properties of undefined (reading 'length')
url = '',
},
schemas = require('schemastore').yaml.schemas(),
},
},
},
}
local ensure_installed = vim.tbl_keys(servers or {}) provider_selector = function(_, _, _) -- bufnr, filetype, buftype
vim.list_extend(ensure_installed, { return { 'treesitter', 'indent' }
'actionlint',
'ansible-language-server',
'ansible-lint',
'bash-language-server',
'blade-formatter',
'codespell',
'commitlint',
'diagnostic-languageserver',
'docker-compose-language-service',
'dockerfile-language-server',
'editorconfig-checker',
'fixjson',
'flake8',
'html-lsp',
'jq',
'jsonlint',
'luacheck',
'php-cs-fixer',
'phpcs',
'phpmd',
'semgrep',
'shellcheck',
'shfmt',
'stylelint',
'stylua',
'yamllint',
})
require('mason-tool-installer').setup {
ensure_installed = ensure_installed,
auto_update = true,
}
-- Ensure the servers above are installed
require('mason-lspconfig').setup {
automatic_installation = true,
ensure_installed = servers,
}
-- nvim-cmp supports additional completion capabilities
local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities)
for _, lsp in ipairs(servers) do
require('lspconfig')[lsp].setup {
on_attach = on_attach,
capabilities = capabilities,
}
end
-- Turn on lsp status information
require('fidget').setup()
-- Example custom configuration for lua
--
-- Make runtime files discoverable to the server
local runtime_path = vim.split(package.path, ';')
table.insert(runtime_path, 'lua/?.lua')
table.insert(runtime_path, 'lua/?/init.lua')
require('lspconfig').lua_ls.setup {
on_attach = on_attach,
capabilities = capabilities,
settings = {
Lua = {
runtime = {
-- Tell the language server which version of Lua you're using (most likely LuaJIT)
version = 'LuaJIT',
-- Setup your lua path
path = runtime_path,
},
diagnostics = {
globals = { 'vim' },
},
workspace = {
library = vim.api.nvim_get_runtime_file('', true),
checkThirdParty = false,
},
-- Do not send telemetry data containing a randomized but unique identifier
telemetry = { enable = false },
},
},
}
vim.api.nvim_create_autocmd('FileType', {
pattern = 'sh',
callback = function()
vim.lsp.start {
name = 'bash-language-server',
cmd = { 'bash-language-server', 'start' },
}
end, end,
})
end, -- fold_virt_text_handler
--
-- This handler is called when the fold text is too long to fit in the window.
-- It is expected to truncate the text and return a new list of virtual text.
--
---@param virtText table The current virtual text list.
---@param lnum number The line number of the first line in the fold.
---@param endLnum number The line number of the last line in the fold.
---@param width number The width of the window.
---@param truncate function Truncate function
---@return table
fold_virt_text_handler = function(
virtText,
lnum,
endLnum,
width,
truncate
)
local newVirtText = {}
local suffix = (' 󰁂 %d '):format(endLnum - lnum)
local sufWidth = vim.fn.strdisplaywidth(suffix)
local targetWidth = width - sufWidth
local curWidth = 0
for _, chunk in ipairs(virtText) do
local chunkText = chunk[1]
local chunkWidth = vim.fn.strdisplaywidth(chunkText)
if targetWidth > curWidth + chunkWidth then
table.insert(newVirtText, chunk)
else
chunkText = truncate(chunkText, targetWidth - curWidth)
local hlGroup = chunk[2]
table.insert(newVirtText, { chunkText, hlGroup })
chunkWidth = vim.fn.strdisplaywidth(chunkText)
-- str width returned from truncate() may less than 2nd argument, need padding
if curWidth + chunkWidth < targetWidth then
suffix = suffix .. (' '):rep(targetWidth - curWidth - chunkWidth)
end
break
end
curWidth = curWidth + chunkWidth
end
table.insert(newVirtText, { suffix, 'MoreMsg' })
return newVirtText
end,
},
},
} }

View File

@@ -2,32 +2,71 @@
-- https://github.com/nvim-lualine/lualine.nvim -- https://github.com/nvim-lualine/lualine.nvim
return { return {
'nvim-lualine/lualine.nvim', 'nvim-lualine/lualine.nvim',
dependencies = {
'kyazdani42/nvim-web-devicons',
'folke/noice.nvim',
},
config = function() config = function()
local function diff_source()
local gitsigns = vim.b.gitsigns_status_dict
if gitsigns then
return {
added = gitsigns.added,
modified = gitsigns.changed,
removed = gitsigns.removed,
}
end
end
require('lualine').setup { require('lualine').setup {
options = { options = {
icons_enabled = true, icons_enabled = true,
component_separators = '|', component_separators = '|',
section_separators = '', section_separators = '',
}, },
-- Sections
-- +-------------------------------------------------+
-- | A | B | C X | Y | Z |
-- +-------------------------------------------------+
sections = { sections = {
lualine_a = {
'mode',
},
lualine_b = {
{ 'b:gitsigns_head', icon = '' },
{ 'diff', source = diff_source },
'diagnostics',
},
lualine_c = {
'buffers',
-- 'filename',
},
lualine_x = { lualine_x = {
-- 'fileformat',
'filetype',
},
lualine_y = {
-- 'progress'
},
lualine_z = {
{ {
require('noice').api.statusline.mode.get, require('noice').api.statusline.mode.get,
cond = require('noice').api.statusline.mode.has, cond = require('noice').api.statusline.mode.has,
-- color = { fg = '#ff9e64' },
}, },
{ {
require('noice').api.status.command.get, require('noice').api.status.command.get,
cond = require('noice').api.status.command.has, cond = require('noice').api.status.command.has,
-- color = { fg = '#ff9e64' },
},
},
lualine_a = {
{
'buffers',
}, },
}, },
}, },
inactive_sections = {
lualine_a = {},
lualine_b = {},
lualine_c = { 'filename' },
lualine_x = { 'location' },
lualine_y = {},
lualine_z = {},
},
} }
end, end,
} }

View File

@@ -1,6 +1,5 @@
-- Neo-tree is a Neovim plugin to browse the file system -- Neo-tree is a Neovim plugin to browse the file system
-- https://github.com/nvim-neo-tree/neo-tree.nvim -- https://github.com/nvim-neo-tree/neo-tree.nvim
return { return {
'nvim-neo-tree/neo-tree.nvim', 'nvim-neo-tree/neo-tree.nvim',
version = '*', version = '*',
@@ -9,29 +8,27 @@ return {
'nvim-tree/nvim-web-devicons', -- not strictly required, but recommended 'nvim-tree/nvim-web-devicons', -- not strictly required, but recommended
'MunifTanjim/nui.nvim', 'MunifTanjim/nui.nvim',
{ {
-- This plugins prompts the user to pick a window and returns
-- the window id of the picked window
-- https://github.com/s1n7ax/nvim-window-picker
's1n7ax/nvim-window-picker', 's1n7ax/nvim-window-picker',
version = '2.*', version = '2.*',
config = function() opts = {
require('window-picker').setup { filter_rules = {
filter_rules = { include_current_win = false,
include_current_win = false, autoselect_one = true,
autoselect_one = true, -- filter using buffer options
-- filter using buffer options bo = {
bo = { -- if the file type is one of following, the window will be ignored
-- if the file type is one of following, the window will be ignored filetype = { 'neo-tree', 'neo-tree-popup', 'notify' },
filetype = { 'neo-tree', 'neo-tree-popup', 'notify' }, -- if the buffer type is one of following, the window will be ignored
-- if the buffer type is one of following, the window will be ignored buftype = { 'terminal', 'quickfix' },
buftype = { 'terminal', 'quickfix' },
},
}, },
} },
end, },
}, },
}, },
cmd = 'Neotree', cmd = 'Neotree',
keys = {
{ '<leader>e', ':Neotree reveal<CR>', { desc = 'NeoTree reveal' } },
},
opts = { opts = {
close_if_last_window = true, close_if_last_window = true,
filesystem = { filesystem = {

View File

@@ -1,80 +1,79 @@
-- Highly experimental plugin that completely replaces the UI
-- for messages, cmdline and the popupmenu.
-- https://github.com/folke/noice.nvim
return { return {
-- Highly experimental plugin that completely replaces the UI 'folke/noice.nvim',
-- for messages, cmdline and the popupmenu. lazy = false,
-- https://github.com/folke/noice.nvim enabled = true,
{ dependencies = {
'folke/noice.nvim', 'MunifTanjim/nui.nvim',
dependencies = { -- A fancy, configurable, notification manager for NeoVim
'MunifTanjim/nui.nvim', -- https://github.com/rcarriga/nvim-notify
-- A fancy, configurable, notification manager for NeoVim 'rcarriga/nvim-notify',
-- https://github.com/rcarriga/nvim-notify 'hrsh7th/nvim-cmp',
{ },
'rcarriga/nvim-notify', opts = {
config = function() lsp = {
require('notify').setup { -- override markdown rendering so that **cmp** and other plugins use **Treesitter**
background_colour = '#000000', override = {
enabled = false, ['vim.lsp.util.convert_input_to_markdown_lines'] = true,
} ['vim.lsp.util.stylize_markdown'] = true,
end, ['cmp.entry.get_documentation'] = true, -- requires hrsh7th/nvim-cmp
}, },
}, },
setup = function() -- you can enable a preset for easier configuration
vim.g.noice_ignored_filetypes = { 'fugitiveblame', 'fugitive', 'gitcommit' } presets = {
require('noice').setup { bottom_search = false, -- use a classic bottom cmdline for search
-- you can enable a preset for easier configuration command_palette = true, -- position the cmdline and popupmenu together
presets = { long_message_to_split = true, -- long messages will be sent to a split
bottom_search = true, -- use a classic bottom cmdline for search inc_rename = false, -- enables an input dialog for inc-rename.nvim
command_palette = true, -- position the cmdline and popupmenu together lsp_doc_border = false, -- add a border to hover docs and signature help
long_message_to_split = true, -- long messages will be sent to a split },
inc_rename = false, -- enables an input dialog for inc-rename.nvim routes = {
lsp_doc_border = false, -- add a border to hover docs and signature help {
}, filter = {
views = { event = 'msg_show',
cmdline_popup = { any = {
position = { { find = '%d+L, %d+B' },
row = 5, { find = '; after #%d+' },
col = '50%', { find = '; before #%d+' },
}, { find = '%d fewer lines' },
size = { { find = '%d more lines' },
width = 60,
height = 'auto',
},
},
popupmenu = {
relative = 'editor',
position = {
row = 8,
col = '50%',
},
size = {
width = 60,
height = 10,
},
border = {
style = 'rounded',
padding = { 0, 1 },
},
win_options = {
winhighlight = { Normal = 'Normal', FloatBorder = 'DiagnosticInfo' },
},
}, },
}, },
routes = { opts = { skip = true },
{ },
filter = { },
event = 'msg_show', views = {
any = { cmdline_popup = {
{ find = '%d+L, %d+B' }, position = {
{ find = '; after #%d+' }, row = 5,
{ find = '; before #%d+' }, col = '50%',
{ find = '%d fewer lines' },
{ find = '%d more lines' },
},
},
opts = { skip = true },
},
}, },
} size = {
end, width = 60,
height = 'auto',
},
},
popupmenu = {
relative = 'editor',
position = {
row = 8,
col = '50%',
},
size = {
width = 60,
height = 10,
},
border = {
style = 'rounded',
padding = { 0, 1 },
},
win_options = {
winhighlight = { Normal = 'Normal', FloatBorder = 'DiagnosticInfo' },
},
},
},
}, },
} }

View File

@@ -1,19 +0,0 @@
return {
'epwalsh/obsidian.nvim',
version = '*', -- recommended, use latest release instead of latest commit
lazy = true,
ft = 'markdown',
dependencies = {
'nvim-lua/plenary.nvim',
},
config = function()
require('obsidian').setup {
workspaces = {
{
name = 'Notes',
path = vim.fn.expand '$HOME/Code/ivuorinen/obsidian',
},
},
}
end,
}

View File

@@ -1,85 +1,122 @@
return { return {
-- Fuzzy Finder (files, lsp, etc) -- Fuzzy Finder (files, lsp, etc)
-- https://github.com/nvim-telescope/telescope.nvim -- https://github.com/nvim-telescope/telescope.nvim
{ 'nvim-telescope/telescope.nvim',
'nvim-telescope/telescope.nvim', version = '*',
version = '*', lazy = false,
dependencies = { dependencies = {
{ 'nvim-lua/plenary.nvim' }, { 'nvim-lua/plenary.nvim' },
{ 'nvim-telescope/telescope-symbols.nvim' }, { 'nvim-telescope/telescope-symbols.nvim' },
{ 'folke/which-key.nvim' },
-- Fuzzy Finder Algorithm which requires local dependencies to be built. -- Getting you where you want with the fewest keystrokes.
-- Only load if `make` is available -- https://github.com/ThePrimeagen/harpoon
{ {
'nvim-telescope/telescope-fzf-native.nvim', 'ThePrimeagen/harpoon',
build = 'make', branch = 'harpoon2',
cond = vim.fn.executable 'make' == 1, dependencies = {
'nvim-lua/plenary.nvim',
'nvim-telescope/telescope.nvim',
}, },
}, config = function()
setup = function() local harpoon = require 'harpoon'
local t = require 'telescope' harpoon:setup {}
local a = require 'telescope.actions'
local b = require 'telescope.builtin'
local themes = require 'telescope.themes'
require('telescope').load_extension 'harpoon'
t.load_extension 'git_worktree'
-- [[ Configure Telescope ]] -- basic telescope configuration
-- See `:help telescope` and `:help telescope.setup()` local conf = require('telescope.config').values
t.setup { local function toggle_telescope(harpoon_files)
defaults = { local file_paths = {}
layout_strategy = 'horizontal', for _, item in ipairs(harpoon_files.items) do
layout_config = { table.insert(file_paths, item.value)
preview_width = 0.65, end
horizontal = {
size = { require('telescope.pickers')
width = '95%', .new({}, {
height = '95%', prompt_title = 'Harpoon',
finder = require('telescope.finders').new_table {
results = file_paths,
}, },
}, previewer = conf.file_previewer {},
}, sorter = conf.generic_sorter {},
pickers = { })
find_files = { :find()
theme = 'dropdown', end
},
}, vim.keymap.set(
mappings = { 'n',
i = { '<leader>hw',
['<C-u>'] = false, function() toggle_telescope(harpoon:list()) end,
['<C-j>'] = a.move_selection_next, { desc = 'Open harpoon window with telescope' }
['<C-k>'] = a.move_selection_previous, )
['<C-d>'] = a.move_selection_previous, vim.keymap.set(
}, 'n',
'<leader>ht',
function() harpoon.ui:toggle_quick_menu(harpoon:list()) end,
{ desc = 'Open Harpoon Quick menu' }
)
end,
},
-- A Telescope picker to quickly access configurations
-- of plugins managed by lazy.nvim.
-- https://github.com/polirritmico/telescope-lazy-plugins.nvim
{ 'polirritmico/telescope-lazy-plugins.nvim' },
-- Fuzzy Finder Algorithm which requires local dependencies to be built.
-- Only load if `make` is available
{
'nvim-telescope/telescope-fzf-native.nvim',
build = 'make',
cond = vim.fn.executable 'make' == 1,
},
},
config = function()
local t = require 'telescope'
local a = require 'telescope.actions'
local themes = require 'telescope.themes'
-- [[ Configure Telescope ]]
-- See `:help telescope` and `:help telescope.setup()`
t.setup {
defaults = {
layout_strategy = 'horizontal',
pickers = {
find_files = {
theme = 'dropdown',
}, },
}, },
} mappings = {
i = {
['<C-u>'] = false,
['<C-j>'] = a.move_selection_next,
['<C-k>'] = a.move_selection_previous,
['<C-d>'] = a.move_selection_previous,
},
},
},
extensions = {
lazy_plugins = {
-- Must be a valid path to the file containing the lazy spec and setup() call.
lazy_config = vim.fn.stdpath 'config' .. '/init.lua',
},
},
}
-- Enable telescope fzf native, if installed -- Load extensions
pcall(t.load_extension, 'fzf') pcall(t.load_extension, 'harpoon')
pcall(t.load_extension, 'git_worktree')
pcall(t.load_extension, 'lazy_plugins')
-- See `:help telescope.builtin` -- Enable telescope fzf native, if installed
vim.keymap.set('n', '<leader>so', b.oldfiles, { desc = '[?] Find recently opened files' }) pcall(t.load_extension, 'fzf')
vim.keymap.set('n', '<leader>/', function()
-- You can pass additional configuration to telescope to change theme, layout, etc.
b.current_buffer_fuzzy_find(themes.get_dropdown {
winblend = 10,
previewer = true,
})
end, { desc = '[/] Fuzzily search in current buffer]' })
vim.keymap.set('n', '<leader>sf', b.find_files, { desc = '[S]earch [F]iles' }) -- [[ Telescope Keymaps ]]
vim.keymap.set('n', '<leader>sw', b.grep_string, { desc = '[S]earch current [W]ord' }) -- See `:help telescope.builtin`
vim.keymap.set('n', '<leader>sg', b.live_grep, { desc = '[S]earch by [G]rep' }) -- See `:help telescope.keymap`
vim.keymap.set('n', '<leader>sd', b.diagnostics, { desc = '[S]earch [D]iagnostics' }) vim.keymap.set('n', '<leader>/', function()
vim.keymap.set('n', '<leader>sb', b.buffers, { desc = '[ ] Find existing buffers' }) -- You can pass additional configuration to telescope to change theme, layout, etc.
vim.keymap.set('n', '<leader>sS', b.git_status, { desc = '' }) require('telescope.builtin').current_buffer_fuzzy_find(themes.get_dropdown {
vim.keymap.set('n', '<leader>sm', ':Telescope harpoon marks<CR>', { desc = 'Harpoon [M]arks' }) winblend = 10,
vim.keymap.set('n', '<Leader>sr', "<CMD>lua require('telescope').extensions.git_worktree.git_worktrees()<CR>") previewer = true,
vim.keymap.set('n', '<Leader>sR', "<CMD>lua require('telescope').extensions.git_worktree.create_git_worktree()<CR>") })
vim.keymap.set('n', '<Leader>sn', "<CMD>lua require('telescope').extensions.notify.notify()<CR>") end, { desc = '[/] Fuzzily search in current buffer]' })
end,
vim.api.nvim_set_keymap('n', 'st', ':TodoTelescope<CR>', { noremap = true })
vim.api.nvim_set_keymap('n', '<Leader><tab>', "<Cmd>lua require('telescope.builtin').commands()<CR>", { noremap = false })
end,
},
} }

View File

@@ -1,7 +1,8 @@
-- Highlight, edit, and navigate code
-- https://github.com/nvim-treesitter/nvim-treesitter
return { return {
-- Highlight, edit, and navigate code
-- https://github.com/nvim-treesitter/nvim-treesitter
'nvim-treesitter/nvim-treesitter', 'nvim-treesitter/nvim-treesitter',
version = false, -- last release is way too old and doesn't work on Windows
build = function() build = function()
pcall(require('nvim-treesitter.install').update { with_sync = true }) pcall(require('nvim-treesitter.install').update { with_sync = true })
end, end,
@@ -10,6 +11,10 @@ return {
}, },
config = function() config = function()
require('nvim-treesitter.configs').setup { require('nvim-treesitter.configs').setup {
auto_install = true,
ignore_install = {},
sync_install = true,
modules = {},
-- Add languages to be installed here that you want installed for treesitter -- Add languages to be installed here that you want installed for treesitter
ensure_installed = { ensure_installed = {
@@ -95,10 +100,10 @@ return {
swap = { swap = {
enable = true, enable = true,
swap_next = { swap_next = {
['<leader>a'] = '@parameter.inner', ['<leader>cn'] = '@parameter.inner',
}, },
swap_previous = { swap_previous = {
['<leader>A'] = '@parameter.inner', ['<leader>cP'] = '@parameter.inner',
}, },
}, },
}, },

View File

@@ -1,32 +1,15 @@
-- A pretty diagnostics, references, telescope results,
-- quickfix and location list to help you solve all the
-- trouble your code is causing.
-- https://github.com/folke/trouble.nvim
return { return {
'folke/trouble.nvim', 'folke/trouble.nvim',
lazy = false, lazy = false,
dependencies = 'nvim-tree/nvim-web-devicons', dependencies = { 'nvim-tree/nvim-web-devicons' },
config = function() opts = {
require('trouble').setup { auto_preview = false,
auto_preview = false, auto_fold = true,
auto_fold = true, auto_close = true,
auto_close = true, use_lsp_diagnostic_signs = true,
use_lsp_diagnostic_signs = true, },
}
vim.keymap.set('n', '<leader>xx', '<cmd>TroubleToggle<cr>', { silent = true, noremap = true })
vim.keymap.set('n', '<leader>xw', '<cmd>TroubleToggle workspace_diagnostics<cr>', { silent = true, noremap = true })
vim.keymap.set('n', '<leader>xd', '<cmd>TroubleToggle document_diagnostics<cr>', { silent = true, noremap = true })
vim.keymap.set('n', '<leader>xl', '<cmd>TroubleToggle loclist<cr>', { silent = true, noremap = true })
vim.keymap.set('n', '<leader>xq', '<cmd>TroubleToggle quickfix<cr>', { silent = true, noremap = true })
vim.keymap.set('n', 'gR', '<cmd>TroubleToggle lsp_references<cr>', { silent = true, noremap = true })
-- Diagnostic signs
-- https://github.com/folke/trouble.nvim/issues/52
local signs = {
Error = '',
Warning = '',
Hint = '',
Information = '',
}
for type, icon in pairs(signs) do
local hl = 'DiagnosticSign' .. type
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl })
end
end,
} }

View File

@@ -1,84 +0,0 @@
local handler = function(virtText, lnum, endLnum, width, truncate)
local newVirtText = {}
local suffix = (' 󰁂 %d '):format(endLnum - lnum)
local sufWidth = vim.fn.strdisplaywidth(suffix)
local targetWidth = width - sufWidth
local curWidth = 0
for _, chunk in ipairs(virtText) do
local chunkText = chunk[1]
local chunkWidth = vim.fn.strdisplaywidth(chunkText)
if targetWidth > curWidth + chunkWidth then
table.insert(newVirtText, chunk)
else
chunkText = truncate(chunkText, targetWidth - curWidth)
local hlGroup = chunk[2]
table.insert(newVirtText, { chunkText, hlGroup })
chunkWidth = vim.fn.strdisplaywidth(chunkText)
-- str width returned from truncate() may less than 2nd argument, need padding
if curWidth + chunkWidth < targetWidth then
suffix = suffix .. (' '):rep(targetWidth - curWidth - chunkWidth)
end
break
end
curWidth = curWidth + chunkWidth
end
table.insert(newVirtText, { suffix, 'MoreMsg' })
return newVirtText
end
return {
-- Not UFO in the sky, but an ultra fold in Neovim.
-- https://github.com/kevinhwang91/nvim-ufo/
{
'kevinhwang91/nvim-ufo',
lazy = false,
enabled = true,
version = '*',
dependencies = {
'kevinhwang91/promise-async',
{ 'nvim-treesitter/nvim-treesitter', run = ':TSUpdate' },
{
'luukvbaal/statuscol.nvim',
config = function()
local builtin = require 'statuscol.builtin'
require('statuscol').setup {
relculright = true,
segments = {
{ text = { builtin.foldfunc }, click = 'v:lua.ScFa' },
{ text = { '%s' }, click = 'v:lua.ScSa' },
{ text = { builtin.lnumfunc, ' ' }, click = 'v:lua.ScLa' },
},
}
end,
},
},
init = function()
vim.o.fillchars = [[eob: ,fold: ,foldopen:,foldsep: ,foldclose:]]
vim.o.foldcolumn = '1' -- '0' is not bad
vim.o.foldlevel = 99 -- Using ufo provider need a large value, feel free to decrease the value
vim.o.foldlevelstart = 99
vim.o.foldenable = true
end,
opts = {
open_fold_hl_timeout = 150,
close_fold_kinds_for_ft = { 'imports', 'comment' },
preview = {
win_config = {
border = { '', '', '', '', '', '', '', '' },
winhighlight = 'Normal:Folded',
winblend = 0,
},
mappings = {
scrollU = '<C-u>',
scrollD = '<C-d>',
jumpTop = '[',
jumpBot = ']',
},
},
provider_selector = function(_, _, _) -- bufnr, filetype, buftype
return { 'treesitter', 'indent' }
end,
fold_virt_text_handler = handler,
},
},
}

View File

@@ -4,9 +4,7 @@ return {
{ {
'folke/tokyonight.nvim', 'folke/tokyonight.nvim',
priority = 1000, -- Make sure to load this before all the other start plugins. priority = 1000, -- Make sure to load this before all the other start plugins.
init = function() init = function() vim.cmd.colorscheme(vim.g.colors_theme) end,
vim.cmd.colorscheme 'tokyonight'
end,
opts = { opts = {
transparent = true, transparent = true,
}, },
@@ -20,33 +18,144 @@ return {
update_interval = 1000, update_interval = 1000,
set_dark_mode = function() set_dark_mode = function()
vim.api.nvim_set_option_value('background', 'dark', {}) vim.api.nvim_set_option_value('background', 'dark', {})
vim.cmd 'colorscheme tokyonight-storm' vim.cmd.colorscheme(vim.g.colors_variant_dark)
end, end,
set_light_mode = function() set_light_mode = function()
vim.api.nvim_set_option_value('background', 'light', {}) vim.api.nvim_set_option_value('background', 'light', {})
vim.cmd 'colorscheme tokyonight-day' vim.cmd.colorscheme(vim.g.colors_variant_light)
end, end,
}, },
}, },
-- vim dashboard
-- https://github.com/nvimdev/dashboard-nvim
{
'nvimdev/dashboard-nvim',
event = 'VimEnter',
config = function()
require('dashboard').setup {
theme = 'doom',
config = {
disable_move = true,
week_header = {
enable = true,
},
shortcut = {},
center = {
{
icon = '',
icon_hl = '@variable',
desc = 'Files',
group = 'Label',
action = 'Telescope find_files',
key = 'f',
},
{
icon = '',
desc = 'Marks',
group = 'DiagnosticHint',
action = 'Telescope harpoon marks',
key = 'a',
},
{
icon = '',
desc = 'TODO',
group = 'DiagnosticOptions',
action = 'TodoTelescope',
key = 't',
},
{
icon = '',
desc = 'Search',
group = 'Number',
action = 'Telescope live_grep',
key = 's',
},
{
icon = '󰊳 ',
desc = 'Lazy Update',
group = '@property',
action = 'Lazy update',
key = 'u',
},
},
},
}
end,
dependencies = { { 'nvim-tree/nvim-web-devicons' } },
},
-- Remove all background colors to make nvim transparent -- Remove all background colors to make nvim transparent
-- https://github.com/xiyaowong/nvim-transparent -- https://github.com/xiyaowong/nvim-transparent
{ 'xiyaowong/nvim-transparent' }, { 'xiyaowong/nvim-transparent', opts = {} },
-- Twilight is a Lua plugin for Neovim 0.5 that dims inactive -- Twilight is a Lua plugin for Neovim 0.5 that dims inactive
-- portions of the code you're editing using TreeSitter. -- portions of the code you're editing using TreeSitter.
-- https://github.com/folke/twilight.nvim -- https://github.com/folke/twilight.nvim
{ 'folke/twilight.nvim', opts = {} },
-- Indent guides for Neovim
-- https://github.com/lukas-reineke/indent-blankline.nvim
{ {
'folke/twilight.nvim', 'lukas-reineke/indent-blankline.nvim',
ft = 'markdown', -- Highlight markdown files main = 'ibl',
config = function()
require('ibl').setup {
indent = {
char = '',
},
exclude = {
filetypes = { 'terminal', 'dashboard' },
buftypes = { 'dashboard' },
},
}
end,
},
-- Git integration for buffers
-- https://github.com/lewis6991/gitsigns.nvim
{
'lewis6991/gitsigns.nvim',
version = false,
lazy = false,
opts = {
signs = {
add = { text = '+' },
change = { text = '~' },
delete = { text = '_' },
topdelete = { text = '' },
changedelete = { text = '~' },
},
current_line_blame = false,
on_attach = function(bufnr)
local gs = require 'gitsigns'
local function map(mode, l, r, opts)
opts = opts or {}
opts.buffer = bufnr
vim.keymap.set(mode, l, r, opts)
end
-- Navigation
map('n', 'gn', function()
if vim.wo.diff then return ']c' end
vim.schedule(function() gs.next_hunk() end)
return '<Ignore>'
end, { expr = true })
map('n', 'gp', function()
if vim.wo.diff then return '[c' end
vim.schedule(function() gs.prev_hunk() end)
return '<Ignore>'
end, { expr = true })
end,
},
}, },
-- Seamless navigation between tmux panes and vim splits -- Seamless navigation between tmux panes and vim splits
-- https://github.com/christoomey/vim-tmux-navigator -- https://github.com/christoomey/vim-tmux-navigator
{ {
'christoomey/vim-tmux-navigator', 'christoomey/vim-tmux-navigator',
lazy = false,
enabled = true,
cmd = { cmd = {
'TmuxNavigateLeft', 'TmuxNavigateLeft',
'TmuxNavigateDown', 'TmuxNavigateDown',
@@ -54,60 +163,48 @@ return {
'TmuxNavigateRight', 'TmuxNavigateRight',
'TmuxNavigatePrevious', 'TmuxNavigatePrevious',
}, },
keys = {
{ '<c-h>', '<cmd><C-U>TmuxNavigateLeft<cr>' },
{ '<c-j>', '<cmd><C-U>TmuxNavigateDown<cr>' },
{ '<c-k>', '<cmd><C-U>TmuxNavigateUp<cr>' },
{ '<c-l>', '<cmd><C-U>TmuxNavigateRight<cr>' },
{ '<c-\\>', '<cmd><C-U>TmuxNavigatePrevious<cr>' },
},
}, },
-- Cloak allows you to overlay *'s over defined patterns in defined files. -- Cloak allows you to overlay *'s over defined patterns in defined files.
-- https://github.com/laytan/cloak.nvim -- https://github.com/laytan/cloak.nvim
{ {
'laytan/cloak.nvim', 'laytan/cloak.nvim',
enabled = true,
lazy = false,
version = '*', version = '*',
config = function() opts = {
require('cloak').setup { enabled = true,
enabled = true, cloak_character = '*',
cloak_character = '*', -- The applied highlight group (colors) on the cloaking, see `:h highlight`.
-- The applied highlight group (colors) on the cloaking, see `:h highlight`. highlight_group = 'Comment',
highlight_group = 'Comment', patterns = {
patterns = { {
{ -- Match any file starting with ".env".
-- Match any file starting with ".env". -- This can be a table to match multiple file patterns.
-- This can be a table to match multiple file patterns. file_pattern = {
file_pattern = { '.env*',
'.env*', 'wrangler.toml',
'wrangler.toml', '.dev.vars',
'.dev.vars',
},
-- Match an equals sign and any character after it.
-- This can also be a table of patterns to cloak,
-- example: cloak_pattern = { ":.+", "-.+" } for yaml files.
cloak_pattern = '=.+',
}, },
-- Match an equals sign and any character after it.
-- This can also be a table of patterns to cloak,
-- example: cloak_pattern = { ":.+", "-.+" } for yaml files.
cloak_pattern = '=.+',
}, },
} },
end,
keys = {
{ '<leader>tc', '<cmd>CloakToggle<cr>', desc = '[tc] Toggle Cloak' },
}, },
}, },
-- Close buffer without messing up with the window. -- Close buffer without messing up with the window.
-- https://github.com/famiu/bufdelete.nvim -- https://github.com/famiu/bufdelete.nvim
{ 'famiu/bufdelete.nvim' }, { 'famiu/bufdelete.nvim' },
-- Neovim plugin for locking a buffer to a window -- Neovim plugin for locking a buffer to a window
-- https://github.com/stevearc/stickybuf.nvim -- https://github.com/stevearc/stickybuf.nvim
{ 'stevearc/stickybuf.nvim', opts = {} }, { 'stevearc/stickybuf.nvim', opts = {} },
-- Describe the regexp under the cursor -- Describe the regexp under the cursor
-- https://github.com/bennypowers/nvim-regexplainer -- https://github.com/bennypowers/nvim-regexplainer
{ {
'bennypowers/nvim-regexplainer', 'bennypowers/nvim-regexplainer',
lazy = false, event = 'BufEnter',
enabled = true,
dependencies = { dependencies = {
'nvim-treesitter/nvim-treesitter', 'nvim-treesitter/nvim-treesitter',
'MunifTanjim/nui.nvim', 'MunifTanjim/nui.nvim',
@@ -117,24 +214,11 @@ return {
auto = true, auto = true,
}, },
}, },
-- Clarify and beautify your comments using boxes and lines. -- Clarify and beautify your comments using boxes and lines.
-- https://github.com/LudoPinelli/comment-box.nvim -- https://github.com/LudoPinelli/comment-box.nvim
{ { 'LudoPinelli/comment-box.nvim', opts = {} },
'LudoPinelli/comment-box.nvim',
opts = {},
init = function()
local wk = require 'which-key'
wk.add {
{ '<leader>cb', group = 'CommentBox' },
{ '<Leader>cbt', '<Cmd>CBccbox<CR>', desc = 'CommentBox: Box Title' },
{ '<Leader>cbd', '<Cmd>CBd<CR>', desc = 'Remove a box' },
{ '<Leader>cbl', '<Cmd>CBline<CR>', desc = 'CommentBox: Simple Line' },
{ '<Leader>cbm', '<Cmd>CBllbox14<CR>', desc = 'CommentBox: Marked' },
{ '<Leader>cbt', '<Cmd>CBllline<CR>', desc = 'CommentBox: Titled Line' },
}
end,
},
-- Automatically expand width of the current window. -- Automatically expand width of the current window.
-- Maximizes and restore it. And all this with nice animations! -- Maximizes and restore it. And all this with nice animations!
-- https://github.com/anuvyklack/windows.nvim -- https://github.com/anuvyklack/windows.nvim
@@ -144,11 +228,18 @@ return {
'anuvyklack/middleclass', 'anuvyklack/middleclass',
'anuvyklack/animation.nvim', 'anuvyklack/animation.nvim',
}, },
config = function() opts = {},
vim.o.winwidth = 15 },
vim.o.winminwidth = 10
vim.o.equalalways = false -- Plugin to improve viewing Markdown files in Neovim
require('windows').setup() -- https://github.com/MeanderingProgrammer/render-markdown.nvim
end, {
'MeanderingProgrammer/render-markdown.nvim',
dependencies = {
'nvim-treesitter/nvim-treesitter',
'nvim-tree/nvim-web-devicons',
},
ft = 'markdown',
opts = {},
}, },
} }

View File

@@ -0,0 +1,609 @@
-- Useful plugin to show you pending keybinds.
-- https://github.com/folke/which-key.nvim
return {
'folke/which-key.nvim',
lazy = false,
version = '*',
priority = 1001, -- Make sure to load this as soon as possible
dependencies = {
'nvim-lua/plenary.nvim',
'echasnovski/mini.icons',
},
config = function()
local wk = require 'which-key'
wk.setup()
wk.add {
-- ╭─────────────────────────────────────────────────────────╮
-- │ With leader │
-- ╰─────────────────────────────────────────────────────────╯
-- ── Buffer ──────────────────────────────────────────────────────────
{
'<leader>b',
group = '[b] Buffer',
expand = function()
-- Add the current buffers to the menu
return require('which-key.extras').expand.buf()
end,
},
{
{ '<leader>bk', '<cmd>blast<cr>', desc = 'Buffer: Last' },
{ '<leader>bj', '<cmd>bfirst<cr>', desc = 'Buffer: First' },
{ '<leader>bh', '<cmd>bprev<cr>', desc = 'Buffer: Prev' },
{ '<leader>bl', '<cmd>bnext<cr>', desc = 'Buffer: Next' },
{ '<leader>bd', '<cmd>Bdelete<cr>', desc = 'Buffer: Delete' },
{ '<leader>bw', '<cmd>Bwipeout<cr>', desc = 'Buffer: Wipeout' },
},
-- ── Code ────────────────────────────────────────────────────────────
{ '<leader>c', group = '[c] Code' },
{
{
'<leader>ca',
'<cmd>lua vim.lsp.buf.code_action()<CR>',
desc = 'LSP: Code Action',
},
{
'<leader>cg',
'<cmd>lua require("neogen").generate()<CR>',
desc = 'Generate annotations',
},
},
-- ── Code: CommentBox ────────────────────────────────────────────────
{
{ '<leader>cb', group = 'CommentBox' },
{ '<leader>cbb', '<Cmd>CBccbox<CR>', desc = 'CommentBox: Box Title' },
{ '<leader>cbd', '<Cmd>CBd<CR>', desc = 'CommentBox: Remove a box' },
{ '<leader>cbl', '<Cmd>CBline<CR>', desc = 'CommentBox: Simple Line' },
{ '<leader>cbm', '<Cmd>CBllbox14<CR>', desc = 'CommentBox: Marked' },
{
'<leader>cbt',
'<Cmd>CBllline<CR>',
desc = 'CommentBox: Titled Line',
},
},
-- ── Code: package.json control ──────────────────────────────────────
-- See: lua/plugins/lazy.lua
{ '<leader>cn', group = 'package.json control' },
{
{
'<leader>cnd',
'<cmd>lua require("package-info").delete()<cr>',
desc = 'Delete package',
},
{
'<leader>cni',
'<cmd>lua require("package-info").install()<cr>',
desc = 'Install package',
},
{
'<leader>cns',
'<cmd>lua require("package-info").show({ force = true })<cr>',
desc = 'Show package info',
},
{
'<leader>cnu',
'<cmd>lua require("package-info").change_version()<cr>',
desc = 'Change version',
},
},
-- ── Code: Refactoring ───────────────────────────────────────────────
{ '<leader>cx', group = '[x] Refactoring' },
{
mode = { 'x' },
-- Extract function supports only visual mode
{
'<leader>cxe',
"<cmd>lua require('refactoring').refactor('Extract Function')<cr>",
desc = 'Extract Function',
},
{
'<leader>cxf',
"<cmd>lua require('refactoring').refactor('Extract Function To File')<cr>",
desc = 'Extract Function to File',
},
-- Extract variable supports only visual mode
{
'<leader>cxv',
"<cmd>lua require('refactoring').refactor('Extract Variable')<cr>",
desc = 'Extract Variable',
},
},
-- Inline func supports only normal
{
'<leader>cxif',
"<cmd>lua require('refactoring').refactor('Inline Function')<cr>",
desc = 'Inline Function',
},
-- Extract block supports only normal mode
{
'<leader>cxb',
"<cmd>lua require('refactoring').refactor('Extract Block')<cr>",
desc = 'Extract Block',
},
{
'<leader>cxbf',
"<cmd>lua require('refactoring').refactor('Extract Block To File')<cr>",
desc = 'Extract Block to File',
},
{
mode = { 'n', 'x' },
-- Inline var supports both normal and visual mode
{
'<leader>cxiv',
"<cmd>lua require('refactoring').refactor('Inline Variable')<cr>",
desc = 'Inline Variable',
},
},
-- ── Code: LSPSaga ───────────────────────────────────────────────────
-- See: lua/plugins/lsp.lua
{
'<C-a>',
'<cmd>Lspsaga term_toggle<cr>',
desc = 'LSPSaga: Open Floaterm',
},
{
'<leader>ca',
'<cmd>Lspsaga code_action<cr>',
desc = 'LSPSaga: Code Actions',
},
{
'<leader>cci',
'<cmd>Lspsaga incoming_calls<cr>',
desc = 'LSPSaga: Incoming Calls',
},
{
'<leader>cco',
'<cmd>Lspsaga outgoing_calls<cr>',
desc = 'LSPSaga: Outgoing Calls',
},
{
'<leader>cd',
'<cmd>Lspsaga show_line_diagnostics<cr>',
desc = 'LSPSaga: Show Line Diagnostics',
},
{
'<leader>cf',
'<cmd>lua require("conform").format({ async = true, lsp_fallback = true })<cr>',
mode = { 'n', 'v' },
desc = 'Format buffer',
},
{
'<leader>ci',
'<cmd>Lspsaga implement<cr>',
desc = 'LSPSaga: Implementations',
},
{
'<leader>cl',
'<cmd>Lspsaga show_cursor_diagnostics<cr>',
desc = 'LSPSaga: Show Cursor Diagnostics',
},
{
'<leader>cp',
'<cmd>Lspsaga peek_definition<cr>',
desc = 'LSPSaga: Peek Definition',
},
{ '<leader>cr', '<cmd>Lspsaga rename<cr>', desc = 'LSPSaga: Rename' },
{
'<leader>cR',
'<cmd>Lspsaga rename ++project<cr>',
desc = 'LSPSaga: Rename Project wide',
},
{
'<leader>cs',
'<cmd>Lspsaga signature_help<cr>',
desc = 'LSPSaga: Signature Documentation',
},
{
'<leader>ct',
'<cmd>Lspsaga peek_type_definition<cr>',
desc = 'LSPSaga: Peek Type Definition',
},
{
'<leader>cu',
'<cmd>Lspsaga preview_definition<cr>',
desc = 'LSPSaga: Preview Definition',
},
{
'<leader>cv',
'<cmd>Lspsaga diagnostic_jump_prev<cr>',
desc = 'LSPSaga: Diagnostic Jump Prev',
},
{
'<leader>cw',
'<cmd>Lspsaga diagnostic_jump_next<cr>',
desc = 'LSPSaga: Diagnostic Jump Next',
},
-- ── DAP ─────────────────────────────────────────────────────────────
{ '<leader>d', group = '[d] DAP' },
{
{
'<leader>db',
'<cmd>DapToggleBreakpoint',
desc = 'DAP: Toggle Breakpoint',
},
{ '<leader>dc', '<cmd>DapContinue', desc = 'DAP: Continue' },
{
'<leader>do',
'<cmd>lua vim.diagnostic.open_float()<CR>',
desc = 'Diagnostic: Open float',
},
{
'<leader>dq',
'<cmd>lua vim.diagnostic.setloclist()<CR>',
desc = 'Diagnostic: Set loc list',
},
{
'<leader>dr',
"<cmd>lua require('dapui').open({reset = true})<CR>",
desc = 'DAP: Reset',
},
{
'<leader>ds',
'<cmd>lua require("telescope.builtin").lsp_document_symbols()<CR>',
desc = 'LSP: Document Symbols',
},
{ '<leader>dt', '<cmd>DapUiToggle', desc = 'DAP: Toggle UI' },
},
-- ── Harpoon ─────────────────────────────────────────────────────────
-- See: lua/plugins/telescope.lua
{ '<leader>h', group = '[h] Harpoon' },
{
{
'<leader>ha',
'<cmd>lua require("harpoon"):list():add()<cr>',
desc = 'harpoon file',
},
{
'<leader>hn',
'<cmd>lua require("harpoon"):list():next()<cr>',
desc = 'harpoon to next file',
},
{
'<leader>hp',
'<cmd>lua require("harpoon"):list():prev()<cr>',
desc = 'harpoon to previous file',
},
{
'<leader>ht',
"<cmd>lua require('harpoon.ui').toggle_quick_menu()<CR>",
desc = 'DAP: Harpoon UI',
},
},
-- ── LSP ─────────────────────────────────────────────────────────────
{ '<leader>l', group = '[l] LSP' },
-- See: lua/plugins/lsp.lua
-- ── Quit ────────────────────────────────────────────────────────────
{ '<leader>q', group = '[q] Quit' },
{
{ '<leader>qf', '<cmd>q<CR>', desc = 'Quicker close split' },
{ '<leader>qq', '<cmd>wq!<CR>', desc = 'Quit with force saving' },
{ '<leader>qw', '<cmd>wq<CR>', desc = 'Write and quit' },
},
-- ── Search ──────────────────────────────────────────────────────────
{ '<leader>s', group = '[s] Search' },
-- See: lua/plugins/telescope.lua
{
'<leader><space>',
"<cmd>lua require('telescope.builtin').buffers()<cr>",
desc = 'Find existing buffers',
},
{
'<leader><tab>',
"<cmd>lua require('telescope.builtin').commands()<CR>",
desc = 'Telescope: Commands',
},
{
'<leader>sd',
"<cmd>lua require('telescope.builtin').diagnostics()<cr>",
desc = 'Search Diagnostics',
},
{
'<leader>sg',
"<cmd>lua require('telescope.builtin').live_grep()<cr>",
desc = 'Search by Grep',
},
{
'<leader>sm',
'<cmd>Telescope harpoon marks<CR>',
desc = 'Harpoon Marks',
},
{
'<leader>sn',
"<cmd>lua require('telescope').extensions.notify.notify()<CR>",
desc = 'Show Notifications',
},
{
'<leader>so',
"<cmd>lua require('telescope.builtin').oldfiles()<cr>",
desc = 'Find recently Opened files',
},
{
'<leader>sp',
"<cmd>lua require('telescope').extensions.lazy_plugins.lazy_plugins()<cr>",
desc = 'Find neovim/lazy configs',
},
{ '<leader>st', '<cmd>TodoTelescope<CR>', desc = 'Telescope: Show Todo' },
{
'<leader>sw',
"<cmd>lua require('telescope.builtin').grep_string()<cr>",
desc = 'Search current Word',
},
-- ── Toggle ──────────────────────────────────────────────────────────
{ '<leader>t', group = '[t] Toggle' },
{
{ '<leader>tc', '<cmd>CloakToggle<cr>', desc = 'Toggle Cloak' },
{ '<leader>tn', '<cmd>Noice dismiss<CR>', desc = 'Noice dismiss' },
{ '<leader>ts', '<cmd>noh<CR>', desc = 'Toggle Search Highlighting' },
{
'<leader>tt',
'<cmd>TransparentToggle<CR>',
desc = 'Toggle Transparency',
},
{ '<leader>tw', '<cmd>Twilight<cr>', desc = 'Toggle Twilight' },
},
-- ── Workspace ───────────────────────────────────────────────────────
{ '<leader>w', group = '[w] Workspace' },
{
{
'<leader>wa',
'<cmd>lua vim.lsp.buf.add_workspace_folder()<CR>',
desc = 'LSP: Workspace Add Folder',
},
{
'<leader>wl',
'<cmd>lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))<CR>',
desc = 'LSP: Workspace List Folders',
},
{
'<leader>wr',
'<cmd>lua vim.lsp.buf.remove_workspace_folder()<CR>',
desc = 'LSP: Workspace Remove Folder',
},
{
'<leader>ws',
'<cmd>lua require("telescope.builtin").lsp_dynamic_workspace_symbols()<CR>',
desc = 'LSP: Workspace Symbols',
},
},
-- ── Trouble ─────────────────────────────────────────────────────────
{ '<leader>x', group = '[x] Trouble' },
{
{
'<leader>xx',
'<cmd>Trouble diagnostics<cr>',
desc = 'Toggle Trouble Diagnostics',
},
{
'<leader>xw',
'<cmd>Trouble workspace_diagnostics<cr>',
desc = 'Toggle Workspace Diagnostics',
},
{
'<leader>xd',
'<cmd>Trouble document_diagnostics<cr>',
desc = 'Toggle Document Diagnostics',
},
{ '<leader>xl', '<cmd>Trouble loclist<cr>', desc = 'Toggle Loclist' },
{ '<leader>xq', '<cmd>Trouble quickfix<cr>', desc = 'Toggle Quickfix' },
},
-- ── Help ────────────────────────────────────────────────────────────
{ '<leader>?', group = '[?] Help & Cheat sheets' },
{
{
'<leader>?w',
'<cmd>lua require("which-key").show({global = false})<cr>',
desc = 'Buffer Local Keymaps (which-key)',
},
},
-- ── Misc ────────────────────────────────────────────────────────────
{
'<leader>1',
'<cmd>lua require("harpoon"):list():select(1)<cr>',
desc = 'harpoon to file 1',
},
{
'<leader>2',
'<cmd>lua require("harpoon"):list():select(2)<cr>',
desc = 'harpoon to file 2',
},
{
'<leader>3',
'<cmd>lua require("harpoon"):list():select(3)<cr>',
desc = 'harpoon to file 3',
},
{
'<leader>4',
'<cmd>lua require("harpoon"):list():select(4)<cr>',
desc = 'harpoon to file 4',
},
{
'<leader>5',
'<cmd>lua require("harpoon"):list():select(5)<cr>',
desc = 'harpoon to file 5',
},
{
'<leader>D',
'<cmd>lua vim.lsp.buf.type_definition()<CR>',
desc = 'LSP: Type Definition',
},
{ '<leader>e', '<cmd>Neotree reveal<CR>', desc = 'NeoTree reveal' },
-- ╭─────────────────────────────────────────────────────────╮
-- │ Without leader │
-- ╰─────────────────────────────────────────────────────────╯
{ 'y', group = 'Yank & Surround' },
{ 'gp', group = 'Goto Preview' },
{
{
'gpd',
'<cmd>lua require("goto-preview").goto_preview_definition()<CR>',
desc = 'Goto: Preview Definition',
},
{
'gpi',
'<cmd>lua require("goto-preview").goto_preview_implementation()<CR>',
desc = 'Goto: Preview Implementation',
},
{
'gpP',
'<cmd>lua require("goto-preview").close_all_windows()<CR>',
desc = 'Goto: Close All Preview Windows',
},
},
-- ── tmux navigation ─────────────────────────────────────────────────
{
{
'<c-h>',
'<cmd><C-U>TmuxNavigateLeft<cr>',
desc = 'tmux: Navigate Left',
},
{
'<c-j>',
'<cmd><C-U>TmuxNavigateDown<cr>',
desc = 'tmux: Navigate Down',
},
{ '<c-k>', '<cmd><C-U>TmuxNavigateUp<cr>', desc = 'tmux: Navigate Up' },
{
'<c-l>',
'<cmd><C-U>TmuxNavigateRight<cr>',
desc = 'tmux: Navigate Right',
},
{
'<c-\\>',
'<cmd><C-U>TmuxNavigatePrevious<cr>',
desc = 'tmux: Navigate Previous',
},
},
-- ── Old habits ──────────────────────────────────────────────────────
{ '<C-s>', '<cmd>w<CR>', desc = 'Save file' },
-- ── Text manipulation in visual mode ────────────────────────────────
{
mode = 'v',
{ '>', '>gv', desc = 'Indent Right' },
{ '<', '<gv', desc = 'Indent Left' },
{ 'J', "<cmd>m '>+1<CR>gv=gv", desc = 'Move Block Down' },
{ 'K', "<cmd>m '<-2<CR>gv=gv", desc = 'Move Block Up' },
},
-- ── LSP ─────────────────────────────────────────────────────────────
{
'<C-k>',
'<cmd>lua vim.lsp.buf.signature_help()<CR>',
desc = 'LSP: Signature Documentation',
},
{
'K',
'<cmd>Lspsaga hover_doc<cr>',
desc = 'LSPSaga: Hover Documentation',
},
{ 'd', group = 'Diagnostics' },
{
{
'dn',
'<cmd>lua vim.diagnostic.goto_next()<CR>',
desc = 'Diagnostic: Goto Next',
},
{
'dp',
'<cmd>lua vim.diagnostic.goto_prev()<CR>',
desc = 'Diagnostic: Goto Prev',
},
},
{
{ 'g', group = 'Goto' },
{
'gD',
'<cmd>lua vim.lsp.buf.declaration()<CR>',
desc = 'LSP: Goto Declaration',
},
{
'gI',
'<cmd>lua vim.lsp.buf.implementation()<CR>',
desc = 'LSP: Goto Implementation',
},
{
'gR',
'<cmd>Trouble lsp_references<cr>',
desc = 'Toggle LSP References',
},
{
'gd',
'<cmd>lua vim.lsp.buf.definition()<CR>',
desc = 'LSP: Goto Definition',
},
{
'gr',
'<cmd>lua require("telescope.builtin").lsp_references()<CR>',
desc = 'LSP: Goto References',
},
},
-- ── Misc keybinds ───────────────────────────────────────────────────
-- Sublime-like shortcut 'go to file' ctrl+p.
{
'<C-p>',
'<cmd>Telescope find_files<CR>',
desc = 'Search for files starting at current directory.',
},
{ 'QQ', '<cmd>q!<CR>', desc = 'Quit without saving' },
{ 'WW', '<cmd>w!<CR>', desc = 'Force write to file' },
{ 'ss', '<cmd>noh<CR>', desc = 'Clear Search Highlighting' },
{
'jj',
'<Esc>',
desc = 'Esc without touching esc in insert mode',
mode = 'i',
},
-- ── Splits ──────────────────────────────────────────────────────────
-- Use CTRL+<hjkl> to switch between windows in normal mode
-- See `:help wincmd` for a list of all window commands
{ '<C-h>', '<C-w><C-h>', desc = 'Move focus to the left window' },
{ '<C-l>', '<C-w><C-l>', desc = 'Move focus to the right window' },
{ '<C-j>', '<C-w><C-j>', desc = 'Move focus to the lower window' },
{ '<C-k>', '<C-w><C-k>', desc = 'Move focus to the upper window' },
-- Split resizing
{ '<C-w>,', '<cmd>vertical resize -10<CR>', desc = 'V Resize -' },
{ '<C-w>.', '<cmd>vertical resize +10<CR>', desc = 'V Resize +' },
-- ── Disable arrow keys in normal mode ───────────────────────────────
{ '<left>', '<cmd>echo "Use h to move!!"<CR>' },
{ '<right>', '<cmd>echo "Use l to move!!"<CR>' },
{ '<up>', '<cmd>echo "Use k to move!!"<CR>' },
{ '<down>', '<cmd>echo "Use j to move!!"<CR>' },
-- ── Terminal ────────────────────────────────────────────────────────
-- Exit terminal mode in the builtin terminal with a shortcut that is
-- a bit easier for people to discover. Otherwise, you normally need
-- to press <C-\><C-n>, which is not what someone will guess without
-- a bit more experience.
--
-- NOTE: This won't work in all terminal emulators/tmux/etc.
-- Try your own mapping or just use <C-\><C-n> to exit terminal mode.
{ '<Esc><Esc>', '<C-\\><C-n>', desc = 'Exit terminal mode', mode = 't' },
-- ── Search ──────────────────────────────────────────────────────────
-- :noh if you have search highlights
{ '<Esc><Esc>', '<cmd>noh<CR>', desc = 'Clear search highlights' },
}
end,
}

View File

@@ -1,13 +0,0 @@
#'ve
i/!
i've/!
I've
I
good
#rd
#rd/!
#rd
#rd
#rd/!
#rd
wrd/!

View File

View File

@@ -2,52 +2,98 @@
```txt ```txt
n <Esc> * <Cmd>nohlsearch<CR> n <Space>/ * <Lua 380: ~/.config/nvim/lua/plugins/telescope.lua:82>
n <Space>zg * :Rg<CR> [/] Fuzzily search in current buffer]
FZF: search with rg (aka live grep). n <Space>hw * <Lua 42: ~/.config/nvim/lua/plugins/harpoon.lua:40>
n <Space>zm * :Maps<CR> Open harpoon window with telescope
FZF: search mappings. n <Space>1 * <Lua 40: ~/.config/nvim/lua/plugins/harpoon.lua:68>
n <Space>zh * :History<CR> harpoon to file 1
FZF: search history of opened files n <Space>hn * <Lua 39: ~/.config/nvim/lua/plugins/harpoon.lua:61>
n <Space>zb * :Buffers<CR> harpoon to next file
FZF: search open buffers. n <Space>hp * <Lua 38: ~/.config/nvim/lua/plugins/harpoon.lua:54>
n <Space>zt * :Windows<CR> harpoon to previous file
FZF: search open tabs. n <Space>ha * <Lua 37: ~/.config/nvim/lua/plugins/harpoon.lua:47>
n <Space>zc * :Commands<CR> harpoon file
FZF: search commands. n <Space>5 * <Lua 36: ~/.config/nvim/lua/plugins/harpoon.lua:96>
n <Space>zf * :FZF<Space> harpoon to file 5
FZF: search for files in given path. n <Space>4 * <Lua 35: ~/.config/nvim/lua/plugins/harpoon.lua:89>
harpoon to file 4
n <Space>3 * <Lua 34: ~/.config/nvim/lua/plugins/harpoon.lua:82>
harpoon to file 3
n <Space>2 * <Lua 33: ~/.config/nvim/lua/plugins/harpoon.lua:75>
harpoon to file 2
n <Space>tc * <Cmd>CloakToggle<CR> n <Space>tc * <Cmd>CloakToggle<CR>
[tc] Toggle Cloak [tc] Toggle Cloak
n <Space>4 * <Lua 84: ~/.local/share/nvim-kickstart/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:121> n <Space>xx * <Cmd>Trouble<CR>
harpoon to file 4 Toggle Trouble
n <Space>3 * <Lua 83: ~/.local/share/nvim-kickstart/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:121> n <Space>xq * <Cmd>Trouble quickfix<CR>
harpoon to file 3 Toggle Quickfix
n <Space>2 * <Lua 82: ~/.local/share/nvim-kickstart/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:121> n <Space>xl * <Cmd>Trouble loclist<CR>
harpoon to file 2 Toggle Loclist
n <Space>1 * <Lua 81: ~/.local/share/nvim-kickstart/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:121> n <Space>xd * <Cmd>Trouble document_diagnostics<CR>
harpoon to file 1 Toggle Document Diagnostics
n <Space>xn * <Lua 80: ~/.local/share/nvim-kickstart/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:121> n <Space>xw * <Cmd>Trouble workspace_diagnostics<CR>
harpoon to next file Toggle Workspace Diagnostics
n <Space>xa * <Lua 79: ~/.local/share/nvim-kickstart/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:121> n <Space>?s * <Cmd>Neoconf show<CR>
harpoon quick menu Neoconf: Show merged config
n <Space>xN * <Lua 78: ~/.local/share/nvim-kickstart/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:121> n <Space>?m * <Cmd>Neoconf lsp<CR>
harpoon to previous file Neoconf: Show merged LSP config
n <Space>xA * <Lua 77: ~/.local/share/nvim-kickstart/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:121> n <Space>?l * <Cmd>Neoconf local<CR>
harpoon file Neoconf: Local
n <Space>5 * <Lua 76: ~/.local/share/nvim-kickstart/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:121> n <Space>?g * <Cmd>Neoconf global<CR>
harpoon to file 5 Neoconf: Global
n <Space>tz * <Lua 51: ~/.local/share/nvim-kickstart/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:121> n <Space>?c * <Cmd>Neoconf<CR>
[tz] Toggle ZenMode Neoconf: Open
n <Space>e * <Lua 47: ~/.local/share/nvim-kickstart/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:121> n <Space>wl * <Cmd>lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))<CR>
<Space>f * <Lua 40: ~/.local/share/nvim-kickstart/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:121> LSP: Workspace List Folders
n <Space>wr * <Cmd>lua vim.lsp.buf.remove_workspace_folder()<CR>
LSP: Workspace Remove Folder
n <Space>wa * <Cmd>lua vim.lsp.buf.add_workspace_folder()<CR>
LSP: Workspace Add Folder
n <Space>ws * <Cmd>lua require("telescope.builtin").lsp_dynamic_workspace_symbols()<CR>
LSP: Workspace Symbols
n <Space>ds * <Cmd>lua require("telescope.builtin").lsp_document_symbols()<CR>
LSP: Document Symbols
n <Space>D * <Cmd>lua vim.lsp.buf.type_definition()<CR>
LSP: Type Definition
n <Space>ca * <Cmd>lua vim.lsp.buf.code_action()<CR>
LSP: Code Action
n <Space>cr * <Cmd>lua vim.lsp.buf.rename()<CR>
LSP: Rename
n <Space>dq * <Cmd>lua vim.diagnostic.setloclist()<CR>
Diagnostic: Set loc list
n <Space>do * <Cmd>lua vim.diagnostic.open_float()<CR>
Diagnostic: Open float
<Space>cf * <Lua 107: ~/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:121>
[f] Format buffer [f] Format buffer
n <Space>qq * <Cmd>wq!<CR> n <Space>e * <Lua 81: ~/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:121>
Quickly Quit NeoTree reveal
n <Space>bq * <Lua 28: ~/.local/share/bob/v0.10.0/nvim-macos-arm64/share/nvim/runtime/lua/vim/diagnostic.lua:1984> n <Space>cg * <Lua 50: ~/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:121>
Open diagnostic [Q]uickfix list Generate annotations
n <Space>be * <Lua 27: ~/.local/share/bob/v0.10.0/nvim-macos-arm64/share/nvim/runtime/lua/vim/diagnostic.lua:1694> n <Space>zm * <Lua 49: ~/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:121>
Show diagnostic [E]rror messages FZF: search mappings.
n <Space>zh * <Lua 48: ~/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:121>
FZF: search history of opened files
n <Space>zb * <Lua 47: ~/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:121>
FZF: search open buffers.
n <Space>zt * <Lua 46: ~/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:121>
FZF: search open tabs.
n <Space>zc * <Lua 32: ~/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:121>
FZF: search commands.
n <Space>zf * <Lua 31: ~/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:121>
FZF: search for files in given path.
n <Space>zg * <Lua 25: ~/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:121>
FZF: search with rg (aka live grep).
n <Space>dc * <Lua 45: ~/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:121>
DAP: Continue
n <Space>db * <Lua 44: ~/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:121>
DAP: Toggle Breakpoint
n <Space>dt * <Lua 43: ~/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:121>
DAP: Toggle UI
n <Space>ht * <Lua 369: ~/.config/nvim/lua/plugins/harpoon.lua:16>
Open Harpoon Quick menu
n <Space>dr * <Lua 41: ~/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:121>
DAP: Reset
x # * <Lua 7: vim/_defaults.lua:0> x # * <Lua 7: vim/_defaults.lua:0>
:help v_#-default :help v_#-default
o % <Plug>(MatchitOperationForward) o % <Plug>(MatchitOperationForward)
@@ -59,8 +105,11 @@ x * * <Lua 3: vim/_defaults.lua:0>
:help v_star-default :help v_star-default
x @ * mode() == 'V' ? ':normal! @'.getcharstr().'<CR>' : '@' x @ * mode() == 'V' ? ':normal! @'.getcharstr().'<CR>' : '@'
:help v_@-default :help v_@-default
n K * <Cmd>lua vim.lsp.buf.hover()<CR>
LSP: Hover Documentation
x Q * mode() == 'V' ? ':normal! @<C-R>=reg_recorded()<CR><CR>' : 'Q' x Q * mode() == 'V' ? ':normal! @<C-R>=reg_recorded()<CR><CR>' : 'Q'
:help v_Q-default :help v_Q-default
x S <Plug>VSurround
n Y * y$ n Y * y$
:help Y-default :help Y-default
o [% <Plug>(MatchitOperationMultiBackward) o [% <Plug>(MatchitOperationMultiBackward)
@@ -74,39 +123,27 @@ n ]% <Plug>(MatchitNormalMultiForward)
n ]d * <Lua 14: vim/_defaults.lua:0> n ]d * <Lua 14: vim/_defaults.lua:0>
Jump to the next diagnostic Jump to the next diagnostic
x a% <Plug>(MatchitVisualTextObject) x a% <Plug>(MatchitVisualTextObject)
o al <Lua 247: ~/.local/share/nvim-kickstart/lazy/mini.nvim/lua/mini/ai.lua:1172> n cS <Plug>CSurround
Around last textobject n cs <Plug>Csurround
o an <Lua 246: ~/.local/share/nvim-kickstart/lazy/mini.nvim/lua/mini/ai.lua:1172> n ds <Plug>Dsurround
Around next textobject n dp * <Cmd>lua vim.diagnostic.goto_prev()<CR>
x al <Lua 243: ~/.local/share/nvim-kickstart/lazy/mini.nvim/lua/mini/ai.lua:1172> Diagnostic: Goto Prev
Around last textobject n dn * <Cmd>lua vim.diagnostic.goto_next()<CR>
x an <Lua 242: ~/.local/share/nvim-kickstart/lazy/mini.nvim/lua/mini/ai.lua:1172> Diagnostic: Goto Next
Around next textobject
o a <Lua 240: ~/.local/share/nvim-kickstart/lazy/mini.nvim/lua/mini/ai.lua:1172>
Around textobject
x a <Lua 238: ~/.local/share/nvim-kickstart/lazy/mini.nvim/lua/mini/ai.lua:1172>
Around textobject
n dj * <Lua 26: ~/.local/share/bob/v0.10.0/nvim-macos-arm64/share/nvim/runtime/lua/vim/diagnostic.lua:1222>
Go to next [D]iagnostic message
n dk * <Lua 25: ~/.local/share/bob/v0.10.0/nvim-macos-arm64/share/nvim/runtime/lua/vim/diagnostic.lua:1145>
Go to previous [D]iagnostic message
o g% <Plug>(MatchitOperationBackward) o g% <Plug>(MatchitOperationBackward)
x g% <Plug>(MatchitVisualBackward) x g% <Plug>(MatchitVisualBackward)
n g% <Plug>(MatchitNormalBackward) n g% <Plug>(MatchitNormalBackward)
x gS <Plug>VgSurround
n gR * :RegexplainerToggle<CR> n gR * :RegexplainerToggle<CR>
Toggle Regexplainer Toggle Regexplainer
o g] <Lua 237: ~/.local/share/nvim-kickstart/lazy/mini.nvim/lua/mini/ai.lua:1169> n gD * <Cmd>lua vim.lsp.buf.declaration()<CR>
Move to right "around" LSP: Goto Declaration
x g] <Lua 236: ~/.local/share/nvim-kickstart/lazy/mini.nvim/lua/mini/ai.lua:1169> n gd * <Cmd>lua vim.lsp.buf.definition()<CR>
Move to right "around" LSP: Goto Definition
n g] <Lua 235: ~/.local/share/nvim-kickstart/lazy/mini.nvim/lua/mini/ai.lua:1169> n gr * <Cmd>lua require("telescope.builtin").lsp_references()<CR>
Move to right "around" LSP: Goto References
o g[ <Lua 234: ~/.local/share/nvim-kickstart/lazy/mini.nvim/lua/mini/ai.lua:1168> n gI * <Cmd>lua vim.lsp.buf.implementation()<CR>
Move to left "around" LSP: Goto Implementation
x g[ <Lua 233: ~/.local/share/nvim-kickstart/lazy/mini.nvim/lua/mini/ai.lua:1168>
Move to left "around"
n g[ <Lua 232: ~/.local/share/nvim-kickstart/lazy/mini.nvim/lua/mini/ai.lua:1168>
Move to left "around"
o gc * <Lua 13: vim/_defaults.lua:0> o gc * <Lua 13: vim/_defaults.lua:0>
Comment textobject Comment textobject
n gcc * <Lua 12: vim/_defaults.lua:0> n gcc * <Lua 12: vim/_defaults.lua:0>
@@ -119,54 +156,17 @@ x gx * <Lua 9: vim/_defaults.lua:0>
Opens filepath or URI under cursor with the system handler (file explorer, web browser, …) Opens filepath or URI under cursor with the system handler (file explorer, web browser, …)
n gx * <Lua 8: vim/_defaults.lua:0> n gx * <Lua 8: vim/_defaults.lua:0>
Opens filepath or URI under cursor with the system handler (file explorer, web browser, …) Opens filepath or URI under cursor with the system handler (file explorer, web browser, …)
o il <Lua 249: ~/.local/share/nvim-kickstart/lazy/mini.nvim/lua/mini/ai.lua:1172> n j * v:count == 0 ? 'gj' : 'j'
Inside last textobject Move down
o in <Lua 248: ~/.local/share/nvim-kickstart/lazy/mini.nvim/lua/mini/ai.lua:1172> n k * v:count == 0 ? 'gk' : 'k'
Inside next textobject Move up
x il <Lua 245: ~/.local/share/nvim-kickstart/lazy/mini.nvim/lua/mini/ai.lua:1172> n n * <Lua 51: ~/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:121>
Inside last textobject Twilight
x in <Lua 244: ~/.local/share/nvim-kickstart/lazy/mini.nvim/lua/mini/ai.lua:1172> n ySS <Plug>YSsurround
Inside next textobject n ySs <Plug>YSsurround
o i <Lua 241: ~/.local/share/nvim-kickstart/lazy/mini.nvim/lua/mini/ai.lua:1172> n yss <Plug>Yssurround
Inside textobject n yS <Plug>YSurround
x i <Lua 239: ~/.local/share/nvim-kickstart/lazy/mini.nvim/lua/mini/ai.lua:1172> n ys <Plug>Ysurround
Inside textobject
n shn * <Lua 266: ~/.local/share/nvim-kickstart/lazy/mini.nvim/lua/mini/surround.lua:1252>
Highlight next surrounding
n sFn * <Lua 265: ~/.local/share/nvim-kickstart/lazy/mini.nvim/lua/mini/surround.lua:1252>
Find next left surrounding
n sfn * <Lua 264: ~/.local/share/nvim-kickstart/lazy/mini.nvim/lua/mini/surround.lua:1252>
Find next right surrounding
n srn * <Lua 263: ~/.local/share/nvim-kickstart/lazy/mini.nvim/lua/mini/surround.lua:1252>
Replace next surrounding
n sdn * <Lua 262: ~/.local/share/nvim-kickstart/lazy/mini.nvim/lua/mini/surround.lua:1252>
Delete next surrounding
n shl * <Lua 261: ~/.local/share/nvim-kickstart/lazy/mini.nvim/lua/mini/surround.lua:1252>
Highlight previous surrounding
n sFl * <Lua 260: ~/.local/share/nvim-kickstart/lazy/mini.nvim/lua/mini/surround.lua:1252>
Find previous left surrounding
n sfl * <Lua 259: ~/.local/share/nvim-kickstart/lazy/mini.nvim/lua/mini/surround.lua:1252>
Find previous right surrounding
n srl * <Lua 258: ~/.local/share/nvim-kickstart/lazy/mini.nvim/lua/mini/surround.lua:1252>
Replace previous surrounding
n sdl * <Lua 257: ~/.local/share/nvim-kickstart/lazy/mini.nvim/lua/mini/surround.lua:1252>
Delete previous surrounding
x sa * :<C-U>lua MiniSurround.add('visual')<CR>
Add surrounding to selection
n sn * <Lua 256: ~/.local/share/nvim-kickstart/lazy/mini.nvim/lua/mini/surround.lua:892>
Update `MiniSurround.config.n_lines`
n sh * <Lua 255: ~/.local/share/nvim-kickstart/lazy/mini.nvim/lua/mini/surround.lua:1252>
Highlight surrounding
n sF * <Lua 254: ~/.local/share/nvim-kickstart/lazy/mini.nvim/lua/mini/surround.lua:1252>
Find left surrounding
n sf * <Lua 253: ~/.local/share/nvim-kickstart/lazy/mini.nvim/lua/mini/surround.lua:1252>
Find right surrounding
n sr * <Lua 252: ~/.local/share/nvim-kickstart/lazy/mini.nvim/lua/mini/surround.lua:1252>
Replace surrounding
n sd * <Lua 251: ~/.local/share/nvim-kickstart/lazy/mini.nvim/lua/mini/surround.lua:1252>
Delete surrounding
n sa * <Lua 250: ~/.local/share/nvim-kickstart/lazy/mini.nvim/lua/mini/surround.lua:1252>
Add surrounding
x <Plug>(MatchitVisualTextObject) <Plug>(MatchitVisualMultiBackward)o<Plug>(MatchitVisualMultiForward) x <Plug>(MatchitVisualTextObject) <Plug>(MatchitVisualMultiBackward)o<Plug>(MatchitVisualMultiForward)
o <Plug>(MatchitOperationMultiForward) * :<C-U>call matchit#MultiMatch("W", "o")<CR> o <Plug>(MatchitOperationMultiForward) * :<C-U>call matchit#MultiMatch("W", "o")<CR>
o <Plug>(MatchitOperationMultiBackward) * :<C-U>call matchit#MultiMatch("bW", "o")<CR> o <Plug>(MatchitOperationMultiBackward) * :<C-U>call matchit#MultiMatch("bW", "o")<CR>
@@ -180,28 +180,44 @@ x <Plug>(MatchitVisualBackward) * :<C-U>call matchit#Match_wrapper('',0,'v')<CR
x <Plug>(MatchitVisualForward) * :<C-U>call matchit#Match_wrapper('',1,'v')<CR>:if col("''") != col("$") | exe ":normal! m'" | endif<CR>gv`` x <Plug>(MatchitVisualForward) * :<C-U>call matchit#Match_wrapper('',1,'v')<CR>:if col("''") != col("$") | exe ":normal! m'" | endif<CR>gv``
n <Plug>(MatchitNormalBackward) * :<C-U>call matchit#Match_wrapper('',0,'n')<CR> n <Plug>(MatchitNormalBackward) * :<C-U>call matchit#Match_wrapper('',0,'n')<CR>
n <Plug>(MatchitNormalForward) * :<C-U>call matchit#Match_wrapper('',1,'n')<CR> n <Plug>(MatchitNormalForward) * :<C-U>call matchit#Match_wrapper('',1,'n')<CR>
n <C-P> * :Files<CR> v <Plug>VgSurround * :<C-U>call <SNR>27_opfunc(visualmode(),visualmode() ==# 'V' ? 0 : 1)<CR>
v <Plug>VSurround * :<C-U>call <SNR>27_opfunc(visualmode(),visualmode() ==# 'V' ? 1 : 0)<CR>
n <Plug>YSurround * <SNR>27_opfunc2('setup')
n <Plug>Ysurround * <SNR>27_opfunc('setup')
n <Plug>YSsurround * <SNR>27_opfunc2('setup').'_'
n <Plug>Yssurround * '^'.v:count1.<SNR>27_opfunc('setup').'g_'
n <Plug>CSurround * :<C-U>call <SNR>27_changesurround(1)<CR>
n <Plug>Csurround * :<C-U>call <SNR>27_changesurround()<CR>
n <Plug>Dsurround * :<C-U>call <SNR>27_dosurround(<SNR>27_inputtarget())<CR>
n <Plug>SurroundRepeat * .
n <C-L> * :<C-U>TmuxNavigateRight<CR>
n <C-Bslash> * :<C-U>TmuxNavigatePrevious<CR>
n <C-J> * :<C-U>TmuxNavigateDown<CR>
n <C-H> * :<C-U>TmuxNavigateLeft<CR>
n <C-K> * :<C-U>TmuxNavigateUp<CR>
s <Plug>luasnip-jump-prev * <Lua 283: ~/.local/share/nvim/lazy/LuaSnip/plugin/luasnip.lua:57>
LuaSnip: Jump to the previous node
s <Plug>luasnip-jump-next * <Lua 282: ~/.local/share/nvim/lazy/LuaSnip/plugin/luasnip.lua:54>
LuaSnip: Jump to the next node
s <Plug>luasnip-prev-choice * <Lua 281: ~/.local/share/nvim/lazy/LuaSnip/plugin/luasnip.lua:51>
LuaSnip: Change to the previous choice from the choiceNode
s <Plug>luasnip-next-choice * <Lua 280: ~/.local/share/nvim/lazy/LuaSnip/plugin/luasnip.lua:48>
LuaSnip: Change to the next choice from the choiceNode
s <Plug>luasnip-expand-snippet * <Lua 279: ~/.local/share/nvim/lazy/LuaSnip/plugin/luasnip.lua:45>
LuaSnip: Expand the current snippet
s <Plug>luasnip-expand-or-jump * <Lua 278: ~/.local/share/nvim/lazy/LuaSnip/plugin/luasnip.lua:42>
LuaSnip: Expand or jump in the current snippet
<Plug>luasnip-expand-repeat * <Lua 276: ~/.local/share/nvim/lazy/LuaSnip/plugin/luasnip.lua:35>
LuaSnip: Repeat last node expansion
n <Plug>luasnip-delete-check * <Lua 274: ~/.local/share/nvim/lazy/LuaSnip/plugin/luasnip.lua:28>
LuaSnip: Removes current snippet from jumplist
n <Plug>PlenaryTestFile * :lua require('plenary.test_harness').test_file(vim.fn.expand("%:p"))<CR>
n <C-P> * <Lua 26: ~/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:121>
FZF: search for files starting at current directory. FZF: search for files starting at current directory.
o <Plug>(fzf-maps-o) * <C-C>:<C-U>call fzf#vim#maps('o', 0)<CR>
x <Plug>(fzf-maps-x) * :<C-U>call fzf#vim#maps('x', 0)<CR>
n <Plug>(fzf-maps-n) * :<C-U>call fzf#vim#maps('n', 0)<CR>
n <Plug>(fzf-normal) * <Nop>
n <Plug>(fzf-insert) * i
n <C-Bslash> * <Lua 60: ~/.local/share/nvim-kickstart/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:121>
n <C-S> * <Cmd>w<CR>
Save file
n <C-K> * <Lua 57: ~/.local/share/nvim-kickstart/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:121>
n <C-J> * <Lua 56: ~/.local/share/nvim-kickstart/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:121>
n <C-H> * <Lua 58: ~/.local/share/nvim-kickstart/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:121>
n <Down> * <Cmd>echo "Use j to move!!"<CR>
n <Up> * <Cmd>echo "Use k to move!!"<CR>
n <Right> * <Cmd>echo "Use l to move!!"<CR>
n <Left> * <Cmd>echo "Use h to move!!"<CR>
n <C-W><C-D> <C-W>d n <C-W><C-D> <C-W>d
Show diagnostics under the cursor Show diagnostics under the cursor
n <C-W>d * <Lua 16: vim/_defaults.lua:0> n <C-W>d * <Lua 16: vim/_defaults.lua:0>
Show diagnostics under the cursor Show diagnostics under the cursor
n <C-L> * <Lua 59: ~/.local/share/nvim-kickstart/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua:121>
``` ```
- Generated on Sat 10 Aug 2024 13:01:59 EEST - Generated on Wed 25 Sep 2024 14:52:25 EEST

View File

@@ -15,7 +15,7 @@ main()
printf "\`\`\`txt" printf "\`\`\`txt"
} > "$DEST" } > "$DEST"
NVIM_APPNAME="nvim-kickstart" nvim -c "redir! >> $DEST" -c 'silent verbose map' -c 'redir END' -c 'q' nvim -c "redir! >> $DEST" -c 'silent verbose map' -c 'redir END' -c 'q'
printf "\n\`\`\`\n\n- Generated on %s\n" "$(date)" >> "$DEST" printf "\n\`\`\`\n\n- Generated on %s\n" "$(date)" >> "$DEST"

View File

@@ -3,7 +3,7 @@
# #
# shellcheck source=shared.sh # shellcheck source=shared.sh
echo "This file has been deprecated in favor of asdf. Please use asdf instead." echo "This file ($0) has been deprecated in favor of asdf. Please use asdf instead."
exit 0 exit 0
eval "$HOME/.dotfiles/config/shared.sh" eval "$HOME/.dotfiles/config/shared.sh"

View File

@@ -2,6 +2,10 @@
# #
# Install fzf # Install fzf
# #
echo "This file ($0) has been deprecated in favor of asdf. Please use asdf instead."
exit 0
# shellcheck source=shared.sh # shellcheck source=shared.sh
eval "$DOTFILES/config/shared.sh" eval "$DOTFILES/config/shared.sh"

View File

@@ -3,7 +3,7 @@
# #
# shellcheck source=shared.sh # shellcheck source=shared.sh
echo "This file has been deprecated in favor of asdf. Please use asdf instead." echo "This file ($0) has been deprecated in favor of asdf. Please use asdf instead."
exit 0 exit 0
eval "$DOTFILES/config/shared.sh" eval "$DOTFILES/config/shared.sh"

View File

@@ -3,7 +3,7 @@
# #
# shellcheck source=shared.sh # shellcheck source=shared.sh
echo "This file has been deprecated in favor of asdf. Please use asdf instead." echo "This file ($0) has been deprecated in favor of asdf. Please use asdf instead."
exit 0 exit 0
eval "$DOTFILES/config/shared.sh" eval "$DOTFILES/config/shared.sh"

View File

@@ -3,7 +3,7 @@
# #
# shellcheck source=shared.sh # shellcheck source=shared.sh
echo "This file has been deprecated in favor of asdf. Please use asdf instead." echo "This file ($0) has been deprecated in favor of asdf. Please use asdf instead."
exit 0 exit 0
source "${DOTFILES}/config/shared.sh" source "${DOTFILES}/config/shared.sh"