Skip to content

Commit 70b9c15

Browse files
authored
refactor: reinitialize all my configuration (#22)
Get rid of everything and reinitializing this branch from scratch ```sh rm -rf ~/.local/{share,state}/nvim ~/.cache/nvim nvim --headless '+Lazy! sync' +qa ``` https://github.com/user-attachments/assets/dbf4da10-2af5-4639-9909-ed648c1846dd Noticed that once we run `Lazy! sync` we still have to initialize other plugins through nvim ui in order to ensure nothing is left behind - Open nvim for the first time will initiate [`mason-lspconfig`](https://github.com/feryardiant/config-nvim/blob/5b53f7e7e002bde2da651a6461132cb9d8114c6f/lua/plugins/mason.lua#L13-L30) and [`nvim-treesitter`](https://github.com/feryardiant/config-nvim/blob/5b53f7e7e002bde2da651a6461132cb9d8114c6f/lua/plugins/treesitter.lua#L18-L48) to install all necessary requirement - Open `nvim-dapui` for the first time to install all [necessary debuggers](https://github.com/feryardiant/config-nvim/blob/5b53f7e7e002bde2da651a6461132cb9d8114c6f/lua/plugins/debugging.lua#L312-L316) Once everything is installed, restart `nvim` and we should good to go. ## Summary ### Kept - [`folke/lazy.nvim`](https://github.com/folke/lazy.nvim) - [`folke/lazydev.nvim`](https://github.com/folke/lazydev.nvim) - [`folke/trouble.nvim`](https://github.com/folke/trouble.nvim) - [`folke/noice.nvim`](https://github.com/folke/noice.nvim) - [`folke/which-key.nvim`](https://github.com/folke/which-key.nvim) - [`stevearc/conform.nvim`](https://github.com/stevearc/conform.nvim) - [`neovim/nvim-lspconfig`](https://github.com/neovim/nvim-lspconfig) - [`MunifTanjim/nui.nvim`](https://github.com/MunifTanjim/nui.nvim) - [`rafamadriz/friendly-snippets`](https://github.com/rafamadriz/friendly-snippets) - [`lewis6991/gitsigns.nvim`](https://github.com/lewis6991/gitsigns.nvim) - [`akinsho/git-conflict.nvim`](https://github.com/akinsho/git-conflict.nvim) - [`ricardoramirezr/blade-nav.nvim`](https://github.com/ricardoramirezr/blade-nav.nvim) - [`williamboman/mason.nvim`](https://github.com/williamboman/mason.nvim) - [`williamboman/mason-lspconfig.nvim`](https://github.com/williamboman/mason-lspconfig.nvim) - [`mfussenegger/nvim-dap`](https://github.com/mfussenegger/nvim-dap) - [`rcarriga/nvim-dap-ui`](https://github.com/rcarriga/nvim-dap-ui) - [`jay-babu/mason-nvim-dap.nvim`](https://github.com/jay-babu/mason-nvim-dap.nvim) - [`theHamsta/nvim-dap-virtual-text`](https://github.com/theHamsta/nvim-dap-virtual-text) - [`nvim-neotest/neotest`](https://github.com/nvim-neotest/neotest) - [`nvim-neotest/nvim-nio`](https://github.com/nvim-neotest/nvim-nio) - [`nvim-lua/plenary.nvim`](https://github.com/nvim-lua/plenary.nvim) - [`V13Axel/neotest-pest`](https://github.com/V13Axel/neotest-pest) - [`olimorris/neotest-phpunit`](https://github.com/olimorris/neotest-phpunit) - [`marilari88/neotest-vitest`](https://github.com/marilari88/neotest-vitest) - [`nvim-treesitter/nvim-treesitter`](https://github.com/nvim-treesitter/nvim-treesitter) - [`nvim-treesitter/nvim-treesitter-context`](https://github.com/nvim-treesitter/nvim-treesitter-context) - [`nvim-treesitter/nvim-treesitter-textobjects`](https://github.com/nvim-treesitter/nvim-treesitter-textobjects) - [`JoosepAlviste/nvim-ts-context-commentstring`](https://github.com/JoosepAlviste/nvim-ts-context-commentstring) - [`LiadOz/nvim-dap-repl-highlights`](https://github.com/LiadOz/nvim-dap-repl-highlights) - [`windwp/nvim-ts-autotag`](https://github.com/windwp/nvim-ts-autotag) ### New - [`WhoIsSethDaniel/mason-tool-installer.nvim`](https://github.com/WhoIsSethDaniel/mason-tool-installer.nvim) to help installing `linter`, `formater` and `debugger` via `mason` - [`echasnovski/mini.nvim`](https://github.com/echasnovski/mini.nvim) to replace its own subpackages : - [`echasnovski/mini.surround`](https://github.com/echasnovski/mini.surround) - [`echasnovski/mini.comment`](https://github.com/echasnovski/mini.comment) - [`echasnovski/mini.pairs`](https://github.com/echasnovski/mini.pairs) - [`saghen/blink.cmp`](https://github.com/saghen/blink.cmp) with [`saghen/blink.compat`](https://github.com/saghen/blink.compat) to maintain compatibility with other plugins that depends on : - [`hrsh7th/nvim-cmp`](https://github.com/hrsh7th/nvim-cmp) - [`hrsh7th/cmp-buffer`](https://github.com/hrsh7th/cmp-buffer) - [`hrsh7th/cmp-nvim-lsp`](https://github.com/hrsh7th/cmp-nvim-lsp) - [`hrsh7th/cmp-nvim-lsp-signature-help`](https://github.com/hrsh7th/cmp-nvim-lsp-signature-help) - [`hrsh7th/cmp-path`](https://github.com/hrsh7th/cmp-path) ### Replaced - [`nvim-lualine/lualine.nvim`](https://github.com/nvim-lualine/lualine.nvim) to [`mini.statusline`](https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-statusline.md) - [`L3MON4D3/LuaSnip`](https://github.com/L3MON4D3/LuaSnip) to [`mini.snippets`](https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-snippets.md) - [`rcarriga/nvim-notify`](https://github.com/rcarriga/nvim-notify) to [`Snacks.notify`](https://github.com/folke/snacks.nvim/blob/main/docs/notify.md) - [`akinsho/toggleterm.nvim`](https://github.com/akinsho/toggleterm.nvim) to [`Snacks.terminal`](https://github.com/folke/snacks.nvim/blob/main/docs/terminal.md) - [`nvim-neo-tree/neo-tree.nvim`](https://github.com/nvim-neo-tree/neo-tree.nvim) to [`Snacks.explorer`](https://github.com/folke/snacks.nvim/blob/main/docs/explorer.md) - [`nvim-telescope/telescope.nvim`](https://github.com/nvim-telescope/telescope.nvim) to [`Snacks.picker`](https://github.com/folke/snacks.nvim/blob/main/docs/picker.md) - [`nvim-tree/nvim-web-devicons`](https://github.com/nvim-tree/nvim-web-devicons) to [`mini.icons`](https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-icons.md) - [`lukas-reineke/indent-blankline.nvim`](https://github.com/lukas-reineke/indent-blankline.nvim) to [`Snacks.indent`](https://github.com/folke/snacks.nvim/blob/main/docs/indent.md) ### Dropped - [`stevearc/dressing.nvim`](https://github.com/stevearc/dressing.nvim) see #15 - [`akinsho/bufferline.nvim`](https://github.com/akinsho/bufferline.nvim): realized that I haven't really use advance tab feature that much lately - [`mfussenegger/nvim-lint`](https://github.com/mfussenegger/nvim-lint) - [`onsails/lspkind.nvim`](https://github.com/onsails/lspkind.nvim) already covered by combination of `blink.cmp` + `mini.icons` see [36a8b70](36a8b70)
2 parents ef25d1c + e6fcfbd commit 70b9c15

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+1367
-1468
lines changed

.luarc.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"$schema": "https://raw.githubusercontent.com/LuaLS/vscode-lua/master/setting/schema.json",
3+
"runtime": {
4+
"path": [
5+
"lua/?.lua",
6+
"lua/?/init.lua"
7+
],
8+
"version": "LuaJIT"
9+
},
10+
"diagnostics": {
11+
"unusedLocalExclude": ["_*"]
12+
},
13+
"workspace": {
14+
"checkThirdParty": false,
15+
"ignoreDir": [
16+
".vscode",
17+
"test"
18+
],
19+
"library": [
20+
"$VIMRUNTIME"
21+
]
22+
}
23+
}

README.md

Lines changed: 143 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,173 @@
11
# My personal NeoVim config
22

3+
## Installation
4+
5+
1. Clone this repo to your `~/.config/nvim`
6+
2. Run the following command to install all the plugins in headless mode
7+
8+
```sh
9+
nvim --headless '+Lazy! sync' +qa
10+
```
11+
12+
3. Open any file using `nvim` for the first time to initiate `treesitter` and `mason` plugins
13+
14+
4. run the following command to install additional `mason` plugins
15+
16+
```vim
17+
:MasonToolsInstallSync
18+
```
19+
20+
5. You should good to go!
21+
22+
## Plugins
23+
24+
### Essentials
25+
26+
- [`folke/lazy.nvim`](https://github.com/folke/lazy.nvim)
27+
- [`folke/noice.nvim`](https://github.com/folke/noice.nvim)
28+
- [`folke/snacks.nvim`](https://github.com/folke/snacks.nvim) with the following subpackages are enabled :
29+
- [`Snacks.dashboard`](https://github.com/folke/snacks.nvim/blob/main/docs/dashboard.md)
30+
- [`Snacks.explorer`](https://github.com/folke/snacks.nvim/blob/main/docs/explorer.md)
31+
- [`Snacks.input`](https://github.com/folke/snacks.nvim/blob/main/docs/input.md)
32+
- [`Snacks.indent`](https://github.com/folke/snacks.nvim/blob/main/docs/indent.md)
33+
- [`Snacks.image`](https://github.com/folke/snacks.nvim/blob/main/docs/image.md)
34+
- [`Snacks.notifier`](https://github.com/folke/snacks.nvim/blob/main/docs/notifier.md)
35+
- [`Snacks.picker`](https://github.com/folke/snacks.nvim/blob/main/docs/picker.md)
36+
- [`Snacks.statuscolumn`](https://github.com/folke/snacks.nvim/blob/main/docs/statuscolumn.md)
37+
- [`Snacks.terminal`](https://github.com/folke/snacks.nvim/blob/main/docs/terminal.md)
38+
- [`folke/trouble.nvim`](https://github.com/folke/trouble.nvim)
39+
- [`folke/which-key.nvim`](https://github.com/folke/which-key.nvim)
40+
- [`stevearc/conform.nvim`](https://github.com/stevearc/conform.nvim)
41+
- [`neovim/nvim-lspconfig`](https://github.com/neovim/nvim-lspconfig)
42+
- [`MunifTanjim/nui.nvim`](https://github.com/MunifTanjim/nui.nvim)
43+
- [`echasnovski/mini.nvim`](https://github.com/echasnovski/mini.nvim) with the following subpackages are enabled :
44+
- [`mini.comment`](https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-comment.md)
45+
- [`mini.icons`](https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-icons.md)
46+
- [`mini.pairs`](https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-pairs.md)
47+
- [`mini.snippets`](https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-snippets.md)
48+
- [`mini.statusline`](https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-statusline.md)
49+
- [`mini.surround`](https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-surround.md)
50+
- [`williamboman/mason.nvim`](https://github.com/williamboman/mason.nvim)
51+
- [`williamboman/mason-lspconfig.nvim`](https://github.com/williamboman/mason-lspconfig.nvim)
52+
- [`WhoIsSethDaniel/mason-tool-installer.nvim`](https://github.com/WhoIsSethDaniel/mason-tool-installer.nvim)
53+
- [`nvim-treesitter/nvim-treesitter`](https://github.com/nvim-treesitter/nvim-treesitter)
54+
- [`nvim-treesitter/nvim-treesitter-context`](https://github.com/nvim-treesitter/nvim-treesitter-context)
55+
- [`nvim-treesitter/nvim-treesitter-textobjects`](https://github.com/nvim-treesitter/nvim-treesitter-textobjects)
56+
- [`JoosepAlviste/nvim-ts-context-commentstring`](https://github.com/JoosepAlviste/nvim-ts-context-commentstring)
57+
- [`windwp/nvim-ts-autotag`](https://github.com/windwp/nvim-ts-autotag)
58+
- [`EmranMR/tree-sitter-blade`](https://github.com/EmranMR/tree-sitter-blade)
59+
- [`pnx/tree-sitter-dotenv`](https://github.com/pnx/tree-sitter-dotenv)
60+
61+
### Extras
62+
63+
- [`folke/lazydev.nvim`](https://github.com/folke/lazydev.nvim)
64+
- [`ricardoramirezr/blade-nav.nvim`](https://github.com/ricardoramirezr/blade-nav.nvim)
65+
66+
### Completion
67+
68+
- [`saghen/blink.cmp`](https://github.com/saghen/blink.cmp)
69+
- [`saghen/blink.compat`](https://github.com/saghen/blink.compat)
70+
- [`rafamadriz/friendly-snippets`](https://github.com/rafamadriz/friendly-snippets)
71+
72+
### Debugging
73+
74+
- [`mfussenegger/nvim-dap`](https://github.com/mfussenegger/nvim-dap) with the following debuggers pre-configured :
75+
- [`js-debug-adapter`](https://github.com/microsoft/vscode-js-debug) to integrate with chromium-base browsers (`chrome`, `edge`, etc) for debugging node backend and js/ts frontend
76+
- [`php-debug-adapter`](https://github.com/xdebug/vscode-php-debug) to integrate with `ext-xdebug`
77+
- [`firefox-debug-adapter`](https://github.com/firefox-devtools/vscode-firefox-debug) to debug js/ts frontend using `firefox`
78+
- [`rcarriga/nvim-dap-ui`](https://github.com/rcarriga/nvim-dap-ui)
79+
- [`jay-babu/mason-nvim-dap.nvim`](https://github.com/jay-babu/mason-nvim-dap.nvim)
80+
- [`theHamsta/nvim-dap-virtual-text`](https://github.com/theHamsta/nvim-dap-virtual-text)
81+
- [`LiadOz/nvim-dap-repl-highlights`](https://github.com/LiadOz/nvim-dap-repl-highlights)
82+
83+
### Git
84+
85+
- [`lewis6991/gitsigns.nvim`](https://github.com/lewis6991/gitsigns.nvim)
86+
- [`akinsho/git-conflict.nvim`](https://github.com/akinsho/git-conflict.nvim)
87+
88+
### Testing
89+
90+
- [`nvim-neotest/neotest`](https://github.com/nvim-neotest/neotest)
91+
- [`nvim-neotest/nvim-nio`](https://github.com/nvim-neotest/nvim-nio)
92+
- [`nvim-lua/plenary.nvim`](https://github.com/nvim-lua/plenary.nvim)
93+
- [`V13Axel/neotest-pest`](https://github.com/V13Axel/neotest-pest)
94+
- [`olimorris/neotest-phpunit`](https://github.com/olimorris/neotest-phpunit)
95+
- [`marilari88/neotest-vitest`](https://github.com/marilari88/neotest-vitest)
96+
397
## Keymaps
498

599
- Diagnostics
6100
- `[d` and `]d` : Jump to previous and next diagnostics
7101
- `[e` and `]e` : Jump to previous and next error diagnostics
8102
- `[w` and `]w` : Jump to previous and next warning diagnostics
9103
- `<leader>`+`e` : Open floating diagnostic message
10-
- `<leader>`+`q` : Open diagnostic list
11-
- `<leader>`+`xx` : [Trouble] Toggle diagnostics
12-
- `<leader>`+`xX` : [Trouble] Buffer diagnostics
13-
- `<leader>`+`xs` : [Trouble] Symbols
14-
- `<leader>`+`xl` : [Trouble] LSP Definitions
15-
- `<leader>`+`xL` : [Trouble] Location list
16-
- `<leader>`+`xq` : [Trouble] Quickfix list
104+
- `<leader>`+`ea` : Open workspace diagnostics
105+
- `<leader>`+`ee` : Open buffer diagnostic
17106
- Buffer
18107
- `<` and `>` : Dedent and Indent line(s) on `visual` mode
19108
- `ALT`+`j`/`k` : Move line(s) down or up
20-
- `CTRL`+`j`/`k` : Scroll 4 lines down or up
21-
- `TAB` or `SHIFT`+`TAB` : Navigate to next or previous completion item (insert mode)
22-
- `<leader>`+`fb` : Format current buffer
23-
- `<leader>`+`fl` : Lint current buffer
109+
- `<leader>`+`fo` : Format current buffer
24110
- Panes / Splits
25111
- `ALT`+`Up`/`Down` arrow : Increase or decrease window height
26112
- `ALT`+`Left`/`Right` arrow : Decrease or increase window width
27113
- `CTRL`+`h`/`j`/`k`/`l` : Jump to `left`, `below`, `above` or `right` window
28114
- `CTRL`+<code>`</code> : Toggle integrated terminal
115+
- Language Services
116+
- `K` : Show signature help
117+
- `gd` : Goto Definition
118+
- `gD` : Goto Declaration
119+
- `gr` : Goto References
120+
- `gi` : Goto Implementation
121+
- `gy` : Goto Type Definition
122+
- `<leader>`+`s` : Workspace Symbols
123+
- `<leader>`+`ss` : Document Symbols
124+
- `<leader>`+`rn` : Rename Symbol
125+
- `<C-.>` : Code Action
126+
- Git
127+
- `<leader>`+`gg` : Open lazygit
128+
- `<leader>`+`gl` : Toggle Git Logs Picker
129+
- Hunks
130+
- `[h` and `]h` : Jump to previous and next hunk
131+
- `[H` and `]H` : Jump to first and last hunk
132+
- `<leader>`+`hs` : Toggle Stage Hunk
133+
- `<leader>`+`hS` : Toggle Stage Buffer
134+
- `<leader>`+`hr` : Reset Hunk
135+
- `<leader>`+`hR` : Reset Buffer
136+
- `<leader>`+`h?` : Toggle Preview Hunk
137+
- Conflicts
138+
- `<leader>`+`co` : Choose ours
139+
- `<leader>`+`ct` : Choose theirs
140+
- `<leader>`+`c0` : Choose none
141+
- `<leader>`+`cb` : Choose both
29142
- File Navigations
30-
- `TAB` or `SHIFT`+`TAB` : Navigate to next or previous buffer windows (normal mode)
143+
- `TAB` or `SHIFT`+`TAB` : Navigate to next or previous buffers (normal mode)
31144
- `n` and `N` : Jump to previous and next search results and keep the cursor in the center
32-
- `gd` : [G]oto [D]efinition
33-
- `gD` : [G]oto [D]eclaration
34-
- `gr` : [G]oto [R]eferences
35-
- `gI` : [G]oto [I]mplementation
36-
- `K` : Show signature help
37-
- `<leader>`+`D` : Type [D]efinition
38-
- `<leader>`+`ds` : [D]ocument [S]ymbols
39-
- `<leader>`+`ws` : [W]orkspace [S]ymbols
40-
- `<leader>`+`rn` : [R]e[n]ame
41-
- `<leader>`+`ca` : [C]ode [A]ction
42-
- `<leader>`+`th` : [T]oggle Signature [H]elp (if any)
43-
- `<leader>`+`ge` : Git explorer
44-
- `<leader>`+`be` : Buffers explorer
45-
- `<leader>`+`fe` : File explorer
46-
- `<leader>`+`<space>` : Find files from existing buffer
47-
- `<leader>`+`ff` : Find files
48-
- `<leader>`+`fw` : Find current word
49-
- `<C-p>` : Find files inside git repository
50-
- `<leader>`+`ds` : Find document symbols
145+
- `<leader>`+`f` : File explorer
146+
- `<leader>`+`ff` : Find Buffers
147+
- `<leader>`+`fg` : Find File in current git repo
148+
- `<leader>`+`r` : Rename File
149+
- `<leader>`+`<space>` : File Picker
150+
- `<C-f>` : Find files
151+
- `<C-p>` : Projects Picker
51152
- Testing
52-
- `<leader>`+`tr` : [T]est [R]un
53-
- `<leader>`+`tx` : [T]est stop
54-
- `<leader>`+`td` : [T]est run with [D]AP
55-
- `<leader>`+`tf` : [T]est [F]ile
56-
- `<leader>`+`ts` : [T]est [S]uite
57-
- `<leader>`+`to` : [T]est [O]utput
58-
- `<leader>`+`top` : [T]est [O]utput [P]anel
59-
- `<leader>`+`tS` : Toggle [T]est [S]ummary
153+
- `<leader>`+`t` : Toggle Test Summary
154+
- `<leader>`+`tr` : Test Run
155+
- `<leader>`+`tx` : Test stop
156+
- `<leader>`+`td` : Test run with DAP
157+
- `<leader>`+`tf` : Test File
158+
- `<leader>`+`ts` : Test Suite
159+
- `<leader>`+`to` : Test Output
160+
- `<leader>`+`tp` : Test Output Panel
60161
- Debugging
61162
- `F1` : Debug: Step into
62163
- `F2` : Debug: Step over
63164
- `F3` : Debug: Step out
64165
- `F4` : Debug: Step back
65166
- `F5` : Start debugger
66167
- `F7` : Toggle DAP UI
67-
- `<leader>`+`b` : Toggle breakpoint
68-
- `<leader>`+`?` : Debug: Evaluate value under the cursor
168+
- `<leader>`+`db` : Toggle breakpoint
169+
- `<leader>`+`dc` : Clear all breakpoints
170+
- `<leader>`+`dd` : Evaluate value under the cursor
69171

70172
## License
71173

after/.gitkeep

Whitespace-only changes.

after/queries/.gitignore

Whitespace-only changes.

after/queries/blade/highlights.scm

Lines changed: 0 additions & 11 deletions
This file was deleted.

after/queries/blade/injections.scm

Lines changed: 0 additions & 20 deletions
This file was deleted.

init.lua

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
local lazypath = vim.fn.stdpath('data') .. '/lazy/lazy.nvim'
2+
23
if not (vim.uv or vim.loop).fs_stat(lazypath) then
34
local lazyrepo = 'https://github.com/folke/lazy.nvim.git'
45
local out = vim.fn.system({ 'git', 'clone', '--filter=blob:none', '--branch=stable', lazyrepo, lazypath })
@@ -16,28 +17,14 @@ end
1617

1718
vim.opt.rtp:prepend(lazypath)
1819

19-
vim.g.mapleader = ' '
20-
vim.g.maplocalleader = ' '
21-
22-
local spec = {
23-
{ import = 'plugins' },
24-
}
25-
26-
if vim.fn.executable('ghostty') then
27-
table.insert(spec, {
28-
'ghostty',
29-
dir = '/Applications/Ghostty.app/Contents/Resources/vim/vimfiles/',
30-
ft = 'ghostty',
31-
})
32-
end
20+
require('bootstrap')
3321

3422
require('lazy').setup({
23+
spec = {
24+
{ 'wakatime/vim-wakatime', lazy = false },
25+
{ import = 'plugins' },
26+
},
3527
ui = {
3628
border = 'rounded',
3729
},
38-
rocks = { hererocks = true },
39-
spec = spec,
4030
})
41-
42-
require('options')
43-
require('keymaps')

lua/bootstrap.lua

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
vim.g.mapleader = ' '
2+
vim.g.maplocalleader = ' '
3+
4+
-- Open checkhealth in floating window, see `:h g:health`
5+
vim.g.health = { style = 'float' }
6+
7+
require('custom.autocmds')
8+
require('custom.options')
9+
require('custom.keymaps')

lua/custom/autocmds.lua

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
vim.api.nvim_create_autocmd('FileType', {
2+
pattern = { 'checkhealth', 'dap-repl', 'qf', 'help', 'netrw', 'man', 'nofile', 'lspinfo' },
3+
callback = function(event)
4+
vim.bo[event.buf].buflisted = false
5+
6+
vim.wo.colorcolumn = ''
7+
vim.wo.statuscolumn = ''
8+
vim.wo.signcolumn = 'no'
9+
10+
vim.api.nvim_buf_set_keymap(event.buf, 'n', 'q', '<Cmd>close<CR>', { silent = true })
11+
end,
12+
})
13+
14+
vim.api.nvim_create_autocmd('TextYankPost', {
15+
pattern = '*',
16+
callback = function()
17+
-- Highlight yanked line(s)
18+
vim.highlight.on_yank({ higroup = 'Visual', timeout = 150 })
19+
end,
20+
})
21+
22+
vim.api.nvim_create_autocmd('BufWinEnter', {
23+
callback = function()
24+
-- Disable status column on DAP-UI panels
25+
if vim.bo.ft:match('^dapui_') then
26+
vim.wo.statuscolumn = ''
27+
vim.wo.colorcolumn = ''
28+
vim.wo.signcolumn = 'no'
29+
end
30+
end,
31+
})
32+
33+
vim.api.nvim_create_autocmd('FileType', {
34+
pattern = 'dap-repl',
35+
callback = function()
36+
---@see dap-completion
37+
require('dap.ext.autocompl').attach()
38+
end,
39+
})

0 commit comments

Comments
 (0)