Compare commits

...

57 Commits

Author SHA1 Message Date
github-actions[bot]
8b037630e2 chore(main): release 10.22.0 2024-04-11 15:25:14 +00:00
github-actions[bot]
bb36f71b77 chore(build): auto-generate vimdoc 2024-04-11 15:24:29 +00:00
Folke Lemaitre
9e3af1070f feat(git): <leader>gb for Git Blame Line 2024-04-11 17:23:46 +02:00
Folke Lemaitre
32eacde793 fix(mini.pairs): better default for ```` 2024-04-11 17:23:17 +02:00
Rubin Bhandari
97480dc5d2 feat(dot): add bashls and shellcheck (#2879) 2024-03-29 22:10:03 +01:00
Rubin Bhandari
50b7f426f2 fix(harpoon): optimizes harpoon keys (#2877) 2024-03-29 14:51:56 +01:00
github-actions[bot]
5646ee5191 chore(main): release 10.21.1 (#2873)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-03-29 10:08:37 +01:00
Folke Lemaitre
aaa10e717d fix(lsp): better support for diagnostics icons on Neovim nightly/stable 2024-03-29 09:45:52 +01:00
Folke Lemaitre
64f86147f9 fix(lsp): dont define diagnostics signs on >= 0.10.0 2024-03-29 09:45:52 +01:00
Folke Lemaitre
349ae03f09 fix: merge conflict 2024-03-29 09:45:31 +01:00
Folke Lemaitre
f308867570 fix(native_snippets): don't try to enable native snippets on Neovim < 0.10.0 and show warning 2024-03-29 09:44:40 +01:00
github-actions[bot]
0af1fd82d7 chore(main): release 10.21.0 (#2870)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-03-29 08:19:18 +01:00
Folke Lemaitre
914f26d04e fix(tex): don't override conceallevel for tex. Not sure why that was added 2024-03-29 07:56:32 +01:00
github-actions[bot]
3def2097ad chore(build): auto-generate vimdoc 2024-03-29 06:28:38 +00:00
Folke Lemaitre
80a8b18be6 feat(trouble): enabled edgy 2024-03-29 07:27:55 +01:00
Folke Lemaitre
754467525b feat(trouble): added <leader>cS to open a trouble list of all references / definitions / ... of the item under the cursor 2024-03-29 07:27:43 +01:00
Folke Lemaitre
3166236ff8 fix(mini.move): default mini.move setup already maps the correct keys 2024-03-29 00:21:52 +01:00
github-actions[bot]
20b2806a8f chore(main): release 10.20.1 (#2869)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-03-28 23:57:49 +01:00
Folke Lemaitre
4ca0bf69dd fix(trouble-v3): use the filtered symbols list for lualine 2024-03-28 23:55:41 +01:00
github-actions[bot]
b26be29330 chore(main): release 10.20.0 (#2849)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-03-28 23:51:31 +01:00
ammon134
8f1fb60f0a feat(extras): use mini.move instead of native move (#2865) 2024-03-28 23:49:48 +01:00
Folke Lemaitre
e29c7acd2d feat(extras): added extra for mini.diff 2024-03-28 23:41:54 +01:00
Folke Lemaitre
a786c471df fix(statuscolumn): right align signs when virtnum > 0 2024-03-28 23:25:06 +01:00
Folke Lemaitre
9a2f773090 fix(trouble): show message if use hasnt updated with Lazy yet after enabling the extra 2024-03-28 22:49:35 +01:00
Folke Lemaitre
bb6aa98cbf feat(extras): added extra for the trouble.nvim v3 beta 2024-03-28 22:11:55 +01:00
github-actions[bot]
dd54a29cc5 chore(build): auto-generate vimdoc 2024-03-28 20:33:40 +00:00
Folke Lemaitre
d95c2ba1dc feat(python): enable auto_brackets for python, since pyright and basedpyright dont support this natively 2024-03-28 21:32:37 +01:00
Folke Lemaitre
bf8ce8076e feat(cmp): added option auto_brackets that adds brackets to functions/methods in configured filetypes 2024-03-28 21:32:09 +01:00
Folke Lemaitre
cfbd358273 fix(nvim-lint): don't duplicate linters. Fixes #2852 2024-03-27 16:54:38 +01:00
Folke Lemaitre
e3075b05ef fix(config): type filter was broken for telescope symbols 2024-03-27 15:04:41 +01:00
github-actions[bot]
c901640167 chore(main): release 10.19.0 (#2835)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-03-27 11:28:17 +01:00
Amaan Qureshi
d945137a32 fix(python-semshi): better highlights (#2839) 2024-03-27 11:23:26 +01:00
Folke Lemaitre
bb1480a6b9 feat(lazygit): allow customizing the lazygit theme. Check the code to change the hl group mapping. Fixes #2846 2024-03-27 11:19:06 +01:00
Folke Lemaitre
6ed771de9d fix(lazygit): use Visual instead of CursorLine for selected line. Fixes #2846 2024-03-27 10:43:32 +01:00
Folke Lemaitre
ce5917a589 fix(lazygit): error handling for getting lazygit's config path 2024-03-27 10:21:09 +01:00
github-actions[bot]
2a8bfccc3e chore(build): auto-generate vimdoc 2024-03-27 07:57:14 +00:00
Kevin Traver
eb9f9a8862 fix(keymaps): update all keymap descriptions to be Title Case (#2844) 2024-03-27 08:56:44 +01:00
Folke Lemaitre
7d570fad79 fix(autocmds): auto create directory on windows for uris. Fixes #2442 2024-03-26 20:48:56 +01:00
Folke Lemaitre
1910cd5cb7 refactor: use LazyVim.is_win() 2024-03-26 20:48:56 +01:00
github-actions[bot]
1de90e7e4c chore(main): release 10.18.0 (#2834)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-03-26 20:33:06 +01:00
Feliche-Demian Netliukh
76b037dcc1 feat(extras): add dial extra (#2798)
* feat: add dial extra

* refactor: removed print statements

* fix(extras): early return for dial extra

* refactor: dials_by_ft like conform, nvim-lint. Simplified buffer specific groups

---------

Co-authored-by: Folke Lemaitre <folke.lemaitre@gmail.com>
2024-03-26 20:26:08 +01:00
Folke Lemaitre
fd0677fb9a fix(terminal): dont use backdrop for edgy terminal windows 2024-03-26 19:55:14 +01:00
Folke Lemaitre
426cd3ed91 feat(lazygit): configure lazygit nvim-remote as editor and enable nerdfont icons
can be disabled with `vim.g.lazygit_config = false`
2024-03-26 19:55:14 +01:00
github-actions[bot]
55c2527dfe chore(main): release 10.17.3 (#2833)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-03-26 17:41:37 +01:00
Folke Lemaitre
f3655c33a3 perf(notify): disable animation notifications. too big impact on performance for too little benefit
To keep using animations, you can set stages = fade_in_slide_out for the
nvim-notify plugin
2024-03-26 17:35:27 +01:00
github-actions[bot]
49a1afab53 chore(main): release 10.17.2 (#2831)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-03-26 15:30:56 +01:00
Folke Lemaitre
a26ca7bf56 fix(lazygit): dont error when setting ansi color fails. Fixes #2829 2024-03-26 15:24:16 +01:00
github-actions[bot]
20efdd44da chore(main): release 10.17.1 (#2827)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-03-26 13:46:01 +01:00
Folke Lemaitre
bfe8c608a3 fix(lazygit): allow overriding default terminal options 2024-03-26 13:42:57 +01:00
github-actions[bot]
4796dba8f7 chore(main): release 10.17.0 (#2805)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-03-26 12:47:36 +01:00
Folke Lemaitre
7d0dbc6ded feat(lazygit): lazygit now automatically uses colors from your Neovim colorscheme
Disable by setting `vim.g.lazygit_theme = false` in your `options.lua`
2024-03-26 12:43:07 +01:00
Folke Lemaitre
c00e3aa6b1 feat(util): added util function to get a fg/bg color from the active colorscheme 2024-03-26 12:43:07 +01:00
github-actions[bot]
1d2cb7d8d1 chore(build): auto-generate vimdoc 2024-03-26 08:28:44 +00:00
Folke Lemaitre
3e5a5dd621 feat(python): allow configuring other python lsp servers than pyright, basedpyright 2024-03-26 09:28:08 +01:00
github-actions[bot]
9e07a6615a chore(build): auto-generate vimdoc 2024-03-23 07:15:37 +00:00
Uthman Mohamed
b74ef23a27 feat(neo-tree): add mapping "O" to open with system default (#2758)
* feat(neo-tree): add mapping "O" to open with system default

* feat(neo-tree): add OS checks for system default open commands

* Use `vim.ui.open` if exists

* update OS checks

* Just use vim.ui.open or throw error if doesn't exist

* Make "O" undefined mapping if vim.ui.open isn't available

* fix: use lazy's util.open instead

---------

Co-authored-by: Uthman Mohamed <83053931+1239uth@users.noreply.github.com>
Co-authored-by: saeedahsan <ahsan02@gmail.com>
Co-authored-by: Folke Lemaitre <folke.lemaitre@gmail.com>
2024-03-23 08:15:04 +01:00
Sergey Kochetkov
7ab6285011 feat(options): Disable foldtext for nightly (#2447)
* chores(format.lua): Fix typo

* Change gitsigns.nvim hunk preview shortcut

Change `preview_hunk` to recently added `preview_hunk_inline` command

* feat(options): remove redundant commented line

* feat(options): use native folding

see https://github.com/neovim/neovim/pull/20750
2024-03-22 10:38:10 +01:00
36 changed files with 925 additions and 223 deletions

View File

@@ -1,5 +1,130 @@
# Changelog
## [10.22.0](https://github.com/LazyVim/LazyVim/compare/v10.21.1...v10.22.0) (2024-04-11)
### Features
* **dot:** add bashls and shellcheck ([#2879](https://github.com/LazyVim/LazyVim/issues/2879)) ([97480dc](https://github.com/LazyVim/LazyVim/commit/97480dc5d2dbb717b45a351e0b04835f138a9094))
* **git:** `&lt;leader&gt;gb` for Git Blame Line ([9e3af10](https://github.com/LazyVim/LazyVim/commit/9e3af1070fc1932da322105708ebb32a2cd9572b))
### Bug Fixes
* **harpoon:** optimizes harpoon keys ([#2877](https://github.com/LazyVim/LazyVim/issues/2877)) ([50b7f42](https://github.com/LazyVim/LazyVim/commit/50b7f426f287ecfc542dd9c197e430b0aca8af04))
* **mini.pairs:** better default for ```` ([32eacde](https://github.com/LazyVim/LazyVim/commit/32eacde793fddcca0bcfbbd494b6aa8b2c870d0f))
## [10.21.1](https://github.com/LazyVim/LazyVim/compare/v10.21.0...v10.21.1) (2024-03-29)
### Bug Fixes
* **lsp:** better support for diagnostics icons on Neovim nightly/stable ([aaa10e7](https://github.com/LazyVim/LazyVim/commit/aaa10e717dbe76c5b6b0ab302698f1d151863dc6))
* **lsp:** dont define diagnostics signs on &gt;= 0.10.0 ([64f8614](https://github.com/LazyVim/LazyVim/commit/64f86147f9f4c67548185798f755c80e03c2098a))
* merge conflict ([349ae03](https://github.com/LazyVim/LazyVim/commit/349ae03f0997d20aa6b4a23315e62dfeab77d559))
* **native_snippets:** don't try to enable native snippets on Neovim &lt; 0.10.0 and show warning ([f308867](https://github.com/LazyVim/LazyVim/commit/f3088675703986b6d37061ebcf0a417c132fd45f))
## [10.21.0](https://github.com/LazyVim/LazyVim/compare/v10.20.1...v10.21.0) (2024-03-29)
### Features
* **trouble:** added `&lt;leader&gt;cS` to open a trouble list of all references / definitions / ... of the item under the cursor ([7544675](https://github.com/LazyVim/LazyVim/commit/754467525b420c85150f13b2cd9e280570c7556c))
* **trouble:** enabled edgy ([80a8b18](https://github.com/LazyVim/LazyVim/commit/80a8b18be6577dcea35748eb563ebef7cf1b3c15))
### Bug Fixes
* **mini.move:** default mini.move setup already maps the correct keys ([3166236](https://github.com/LazyVim/LazyVim/commit/3166236ff88a13e7e5b7579ae780b682f2356d62))
* **tex:** don't override conceallevel for tex. Not sure why that was added ([914f26d](https://github.com/LazyVim/LazyVim/commit/914f26d04e6b9a61f7d4fc80ad433d75dac3f14b))
## [10.20.1](https://github.com/LazyVim/LazyVim/compare/v10.20.0...v10.20.1) (2024-03-28)
### Bug Fixes
* **trouble-v3:** use the filtered symbols list for lualine ([4ca0bf6](https://github.com/LazyVim/LazyVim/commit/4ca0bf69dd1e4a359af6894490f794bd5fc12cf0))
## [10.20.0](https://github.com/LazyVim/LazyVim/compare/v10.19.0...v10.20.0) (2024-03-28)
### Features
* **cmp:** added option `auto_brackets` that adds brackets to functions/methods in configured filetypes ([bf8ce80](https://github.com/LazyVim/LazyVim/commit/bf8ce8076e283ecabce6b2f2a04995b3deeeb593))
* **extras:** added extra for mini.diff ([e29c7ac](https://github.com/LazyVim/LazyVim/commit/e29c7acd2d149da8166f2f44c920cc7d5c89971a))
* **extras:** added extra for the `trouble.nvim` v3 beta ([bb6aa98](https://github.com/LazyVim/LazyVim/commit/bb6aa98cbfe0547150be89dc42f35e3b3eef8b5d))
* **extras:** use mini.move instead of native move ([#2865](https://github.com/LazyVim/LazyVim/issues/2865)) ([8f1fb60](https://github.com/LazyVim/LazyVim/commit/8f1fb60f0a78cb2e83b485e1f946822812c5ff50))
* **python:** enable auto_brackets for python, since pyright and basedpyright dont support this natively ([d95c2ba](https://github.com/LazyVim/LazyVim/commit/d95c2ba1dc75307b154c870aa808f322debc6070))
### Bug Fixes
* **config:** type filter was broken for telescope symbols ([e3075b0](https://github.com/LazyVim/LazyVim/commit/e3075b05ef9646e07639ae896bd8896f68ad5d5f))
* **nvim-lint:** don't duplicate linters. Fixes [#2852](https://github.com/LazyVim/LazyVim/issues/2852) ([cfbd358](https://github.com/LazyVim/LazyVim/commit/cfbd3582736286433ee5532e1ea3a8d05a1e2649))
* **statuscolumn:** right align signs when virtnum &gt; 0 ([a786c47](https://github.com/LazyVim/LazyVim/commit/a786c471df5c048690618b6ff17fa2bc9648891d))
* **trouble:** show message if use hasnt updated with Lazy yet after enabling the extra ([9a2f773](https://github.com/LazyVim/LazyVim/commit/9a2f7730907fd9124ec536f8dc2ad0a253f18f36))
## [10.19.0](https://github.com/LazyVim/LazyVim/compare/v10.18.0...v10.19.0) (2024-03-27)
### Features
* **lazygit:** allow customizing the lazygit theme. Check the code to change the hl group mapping. Fixes [#2846](https://github.com/LazyVim/LazyVim/issues/2846) ([bb1480a](https://github.com/LazyVim/LazyVim/commit/bb1480a6b9ca9e524450192423eac88ba2a32e18))
### Bug Fixes
* **autocmds:** auto create directory on windows for uris. Fixes [#2442](https://github.com/LazyVim/LazyVim/issues/2442) ([7d570fa](https://github.com/LazyVim/LazyVim/commit/7d570fad7949288711c6238468add594963cabaa))
* **keymaps:** update all keymap descriptions to be Title Case ([#2844](https://github.com/LazyVim/LazyVim/issues/2844)) ([eb9f9a8](https://github.com/LazyVim/LazyVim/commit/eb9f9a8862983abe1c7dd51f5f6bf2bd6978346f))
* **lazygit:** error handling for getting lazygit's config path ([ce5917a](https://github.com/LazyVim/LazyVim/commit/ce5917a58965b47ed09462ddb5d160dee2b130ae))
* **lazygit:** use `Visual` instead of `CursorLine` for selected line. Fixes [#2846](https://github.com/LazyVim/LazyVim/issues/2846) ([6ed771d](https://github.com/LazyVim/LazyVim/commit/6ed771de9dd3b14de78e83ed1c62b4f4fcee3c03))
* **python-semshi:** better highlights ([#2839](https://github.com/LazyVim/LazyVim/issues/2839)) ([d945137](https://github.com/LazyVim/LazyVim/commit/d945137a323c6c0200af50444981c7d05ed93f3f))
## [10.18.0](https://github.com/LazyVim/LazyVim/compare/v10.17.3...v10.18.0) (2024-03-26)
### Features
* **extras:** add dial extra ([#2798](https://github.com/LazyVim/LazyVim/issues/2798)) ([76b037d](https://github.com/LazyVim/LazyVim/commit/76b037dcc1105f23b92fe6211d747f97705413fa))
* **lazygit:** configure lazygit nvim-remote as editor and enable nerdfont icons ([426cd3e](https://github.com/LazyVim/LazyVim/commit/426cd3ed91b90e5304802904d14dc3826da317c9))
### Bug Fixes
* **terminal:** dont use backdrop for edgy terminal windows ([fd0677f](https://github.com/LazyVim/LazyVim/commit/fd0677fb9a512c4a4a6bae534a018f361a9bfe30))
## [10.17.3](https://github.com/LazyVim/LazyVim/compare/v10.17.2...v10.17.3) (2024-03-26)
### Performance Improvements
* **notify:** disable animation notifications. too big impact on performance for too little benefit ([f3655c3](https://github.com/LazyVim/LazyVim/commit/f3655c33a3239b67ce9c5e5a8cc384691fd8126c))
## [10.17.2](https://github.com/LazyVim/LazyVim/compare/v10.17.1...v10.17.2) (2024-03-26)
### Bug Fixes
* **lazygit:** dont error when setting ansi color fails. Fixes [#2829](https://github.com/LazyVim/LazyVim/issues/2829) ([a26ca7b](https://github.com/LazyVim/LazyVim/commit/a26ca7bf56790f6bc35134a5037df0405437a1be))
## [10.17.1](https://github.com/LazyVim/LazyVim/compare/v10.17.0...v10.17.1) (2024-03-26)
### Bug Fixes
* **lazygit:** allow overriding default terminal options ([bfe8c60](https://github.com/LazyVim/LazyVim/commit/bfe8c608a33255511fa3e79bf77fd7257022a525))
## [10.17.0](https://github.com/LazyVim/LazyVim/compare/v10.16.0...v10.17.0) (2024-03-26)
### Features
* **lazygit:** lazygit now automatically uses colors from your Neovim colorscheme ([7d0dbc6](https://github.com/LazyVim/LazyVim/commit/7d0dbc6dedc2d6cb4c3bc77fa296dc07ce5927c9))
* **neo-tree:** add mapping "O" to open with system default ([#2758](https://github.com/LazyVim/LazyVim/issues/2758)) ([b74ef23](https://github.com/LazyVim/LazyVim/commit/b74ef23a27dc4efc1cf76f14eb5ecced963d694d))
* **options:** Disable foldtext for nightly ([#2447](https://github.com/LazyVim/LazyVim/issues/2447)) ([7ab6285](https://github.com/LazyVim/LazyVim/commit/7ab628501150b6dbaa6daae4a8ac7b864318677f))
* **python:** allow configuring other python lsp servers than pyright, basedpyright ([3e5a5dd](https://github.com/LazyVim/LazyVim/commit/3e5a5dd621438cff4dbe29df227585b46ede7e44))
* **util:** added util function to get a fg/bg color from the active colorscheme ([c00e3aa](https://github.com/LazyVim/LazyVim/commit/c00e3aa6b1d053e5bea7bfdfbfd3b5aedb6cb5be))
## [10.16.0](https://github.com/LazyVim/LazyVim/compare/v10.15.0...v10.16.0) (2024-03-22)

33
NEWS.md
View File

@@ -2,6 +2,39 @@
## 10.x
- added new extra for [mini.diff](https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-diff.md)
This is a plugin similar to gitsigns but with a neat diff overlay
that can be toggled with `<leader>go`.
- **trouble.nvim** has been rewritten from scratch and is now in beta.
I've added a new extra for it (`trouble-v3`) for those of you who want to try it out.
You can find the updated docs [here](https://github.com/folke/trouble.nvim/tree/dev)
- The **lazygit** integration now configures:
- the theme based on the colorscheme
- nerd font icons (v3)
- editor preset is set to `nvim-remote` for better interop with Neovim
- The option `vim.g.lazygit_theme` was renamed to `vim.g.lazygit_config`
- **lazygit** now automatically uses the colors of your current colorscheme.
This is enabled by default. To disable, add the below to your `options.lua`:
```lua
vim.g.lazygit_config = false
```
- Added support for `basedpyright` to the **python** extra.
Enable in your `options.lua` with:
```lua
vim.g.lazyvim_python_lsp = "basedpyright"
```
Be aware that `basedpyright` is still in development and
may not work exactly the same as `pyright`.
- User extras under `lua/plugins/extras` can now also be managed
with **LazyExtras**

View File

@@ -1,4 +1,4 @@
*LazyVim.txt* For Neovim >= 0.9.0 Last change: 2024 March 22
*LazyVim.txt* For Neovim >= 0.9.0 Last change: 2024 April 11
==============================================================================
Table of Contents *LazyVim-table-of-contents*
@@ -8,6 +8,7 @@ Table of Contents *LazyVim-table-of-contents*
- Getting Started |LazyVim-getting-started|
- File Structure |LazyVim-file-structure|
- Configuration |LazyVim-configuration|
1. Links |LazyVim-links|
Install
·

View File

@@ -106,7 +106,7 @@ vim.api.nvim_create_autocmd({ "FileType" }, {
vim.api.nvim_create_autocmd({ "BufWritePre" }, {
group = augroup("auto_create_dir"),
callback = function(event)
if event.match:match("^%w%w+://") then
if event.match:match("^%w%w+:[\\/][\\/]") then
return
end
local file = vim.uv.fs_realpath(event.match) or event.match

View File

@@ -3,7 +3,8 @@ _G.LazyVim = require("lazyvim.util")
---@class LazyVimConfig: LazyVimOptions
local M = {}
M.version = "10.16.0" -- x-release-please-version
M.version = "10.22.0" -- x-release-please-version
LazyVim.config = M
---@class LazyVimOptions
local defaults = {
@@ -221,6 +222,9 @@ function M.get_kind_filter(buf)
if M.kind_filter[ft] == false then
return
end
if type(M.kind_filter[ft]) == "table" then
return M.kind_filter[ft]
end
---@diagnostic disable-next-line: return-type-mismatch
return type(M.kind_filter) == "table" and type(M.kind_filter.default) == "table" and M.kind_filter.default or nil
end

View File

@@ -11,35 +11,35 @@ map({ "n", "x" }, "k", "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true
map({ "n", "x" }, "<Up>", "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true })
-- Move to window using the <ctrl> hjkl keys
map("n", "<C-h>", "<C-w>h", { desc = "Go to left window", remap = true })
map("n", "<C-j>", "<C-w>j", { desc = "Go to lower window", remap = true })
map("n", "<C-k>", "<C-w>k", { desc = "Go to upper window", remap = true })
map("n", "<C-l>", "<C-w>l", { desc = "Go to right window", remap = true })
map("n", "<C-h>", "<C-w>h", { desc = "Go to Left Window", remap = true })
map("n", "<C-j>", "<C-w>j", { desc = "Go to Lower Window", remap = true })
map("n", "<C-k>", "<C-w>k", { desc = "Go to Upper Window", remap = true })
map("n", "<C-l>", "<C-w>l", { desc = "Go to Right Window", remap = true })
-- Resize window using <ctrl> arrow keys
map("n", "<C-Up>", "<cmd>resize +2<cr>", { desc = "Increase window height" })
map("n", "<C-Down>", "<cmd>resize -2<cr>", { desc = "Decrease window height" })
map("n", "<C-Left>", "<cmd>vertical resize -2<cr>", { desc = "Decrease window width" })
map("n", "<C-Right>", "<cmd>vertical resize +2<cr>", { desc = "Increase window width" })
map("n", "<C-Up>", "<cmd>resize +2<cr>", { desc = "Increase Window Height" })
map("n", "<C-Down>", "<cmd>resize -2<cr>", { desc = "Decrease Window Height" })
map("n", "<C-Left>", "<cmd>vertical resize -2<cr>", { desc = "Decrease Window Width" })
map("n", "<C-Right>", "<cmd>vertical resize +2<cr>", { desc = "Increase Window Width" })
-- Move Lines
map("n", "<A-j>", "<cmd>m .+1<cr>==", { desc = "Move down" })
map("n", "<A-k>", "<cmd>m .-2<cr>==", { desc = "Move up" })
map("i", "<A-j>", "<esc><cmd>m .+1<cr>==gi", { desc = "Move down" })
map("i", "<A-k>", "<esc><cmd>m .-2<cr>==gi", { desc = "Move up" })
map("v", "<A-j>", ":m '>+1<cr>gv=gv", { desc = "Move down" })
map("v", "<A-k>", ":m '<-2<cr>gv=gv", { desc = "Move up" })
map("n", "<A-j>", "<cmd>m .+1<cr>==", { desc = "Move Down" })
map("n", "<A-k>", "<cmd>m .-2<cr>==", { desc = "Move Up" })
map("i", "<A-j>", "<esc><cmd>m .+1<cr>==gi", { desc = "Move Down" })
map("i", "<A-k>", "<esc><cmd>m .-2<cr>==gi", { desc = "Move Up" })
map("v", "<A-j>", ":m '>+1<cr>gv=gv", { desc = "Move Down" })
map("v", "<A-k>", ":m '<-2<cr>gv=gv", { desc = "Move Up" })
-- buffers
map("n", "<S-h>", "<cmd>bprevious<cr>", { desc = "Prev buffer" })
map("n", "<S-l>", "<cmd>bnext<cr>", { desc = "Next buffer" })
map("n", "[b", "<cmd>bprevious<cr>", { desc = "Prev buffer" })
map("n", "]b", "<cmd>bnext<cr>", { desc = "Next buffer" })
map("n", "<S-h>", "<cmd>bprevious<cr>", { desc = "Prev Buffer" })
map("n", "<S-l>", "<cmd>bnext<cr>", { desc = "Next Buffer" })
map("n", "[b", "<cmd>bprevious<cr>", { desc = "Prev Buffer" })
map("n", "]b", "<cmd>bnext<cr>", { desc = "Next Buffer" })
map("n", "<leader>bb", "<cmd>e #<cr>", { desc = "Switch to Other Buffer" })
map("n", "<leader>`", "<cmd>e #<cr>", { desc = "Switch to Other Buffer" })
-- Clear search with <esc>
map({ "i", "n" }, "<esc>", "<cmd>noh<cr><esc>", { desc = "Escape and clear hlsearch" })
map({ "i", "n" }, "<esc>", "<cmd>noh<cr><esc>", { desc = "Escape and Clear hlsearch" })
-- Clear search, diff update and redraw
-- taken from runtime/lua/_editor.lua
@@ -47,16 +47,16 @@ map(
"n",
"<leader>ur",
"<Cmd>nohlsearch<Bar>diffupdate<Bar>normal! <C-L><CR>",
{ desc = "Redraw / clear hlsearch / diff update" }
{ desc = "Redraw / Clear hlsearch / Diff Update" }
)
-- https://github.com/mhinz/vim-galore#saner-behavior-of-n-and-n
map("n", "n", "'Nn'[v:searchforward].'zv'", { expr = true, desc = "Next search result" })
map("x", "n", "'Nn'[v:searchforward]", { expr = true, desc = "Next search result" })
map("o", "n", "'Nn'[v:searchforward]", { expr = true, desc = "Next search result" })
map("n", "N", "'nN'[v:searchforward].'zv'", { expr = true, desc = "Prev search result" })
map("x", "N", "'nN'[v:searchforward]", { expr = true, desc = "Prev search result" })
map("o", "N", "'nN'[v:searchforward]", { expr = true, desc = "Prev search result" })
map("n", "n", "'Nn'[v:searchforward].'zv'", { expr = true, desc = "Next Search Result" })
map("x", "n", "'Nn'[v:searchforward]", { expr = true, desc = "Next Search Result" })
map("o", "n", "'Nn'[v:searchforward]", { expr = true, desc = "Next Search Result" })
map("n", "N", "'nN'[v:searchforward].'zv'", { expr = true, desc = "Prev Search Result" })
map("x", "N", "'nN'[v:searchforward]", { expr = true, desc = "Prev Search Result" })
map("o", "N", "'nN'[v:searchforward]", { expr = true, desc = "Prev Search Result" })
-- Add undo break-points
map("i", ",", ",<c-g>u")
@@ -64,7 +64,7 @@ map("i", ".", ".<c-g>u")
map("i", ";", ";<c-g>u")
-- save file
map({ "i", "x", "n", "s" }, "<C-s>", "<cmd>w<cr><esc>", { desc = "Save file" })
map({ "i", "x", "n", "s" }, "<C-s>", "<cmd>w<cr><esc>", { desc = "Save File" })
--keywordprg
map("n", "<leader>K", "<cmd>norm! K<cr>", { desc = "Keywordprg" })
@@ -82,8 +82,8 @@ map("n", "<leader>fn", "<cmd>enew<cr>", { desc = "New File" })
map("n", "<leader>xl", "<cmd>lopen<cr>", { desc = "Location List" })
map("n", "<leader>xq", "<cmd>copen<cr>", { desc = "Quickfix List" })
map("n", "[q", vim.cmd.cprev, { desc = "Previous quickfix" })
map("n", "]q", vim.cmd.cnext, { desc = "Next quickfix" })
map("n", "[q", vim.cmd.cprev, { desc = "Previous Quickfix" })
map("n", "]q", vim.cmd.cnext, { desc = "Next Quickfix" })
-- formatting
map({ "n", "v" }, "<leader>cf", function()
@@ -109,8 +109,8 @@ map("n", "[w", diagnostic_goto(false, "WARN"), { desc = "Prev Warning" })
-- stylua: ignore start
-- toggle options
map("n", "<leader>uf", function() LazyVim.format.toggle() end, { desc = "Toggle auto format (global)" })
map("n", "<leader>uF", function() LazyVim.format.toggle(true) end, { desc = "Toggle auto format (buffer)" })
map("n", "<leader>uf", function() LazyVim.format.toggle() end, { desc = "Toggle Auto Format (Global)" })
map("n", "<leader>uF", function() LazyVim.format.toggle(true) end, { desc = "Toggle Auto Format (Buffer)" })
map("n", "<leader>us", function() LazyVim.toggle("spell") end, { desc = "Toggle Spelling" })
map("n", "<leader>uw", function() LazyVim.toggle("wrap") end, { desc = "Toggle Word Wrap" })
map("n", "<leader>uL", function() LazyVim.toggle("relativenumber") end, { desc = "Toggle Relative Line Numbers" })
@@ -125,16 +125,17 @@ map("n", "<leader>uT", function() if vim.b.ts_highlight then vim.treesitter.stop
map("n", "<leader>ub", function() LazyVim.toggle("background", false, {"light", "dark"}) end, { desc = "Toggle Background" })
-- lazygit
map("n", "<leader>gg", function() LazyVim.terminal({ "lazygit" }, { cwd = LazyVim.root.git(), esc_esc = false, ctrl_hjkl = false }) end, { desc = "Lazygit (root dir)" })
map("n", "<leader>gG", function() LazyVim.terminal({ "lazygit" }, {esc_esc = false, ctrl_hjkl = false}) end, { desc = "Lazygit (cwd)" })
map("n", "<leader>gg", function() LazyVim.lazygit( { cwd = LazyVim.root.git() }) end, { desc = "Lazygit (Root Dir)" })
map("n", "<leader>gG", function() LazyVim.lazygit() end, { desc = "Lazygit (cwd)" })
map("n", "<leader>gb", LazyVim.lazygit.blame_line, { desc = "Git Blame Line" })
map("n", "<leader>gf", function()
local git_path = vim.api.nvim_buf_get_name(0)
LazyVim.terminal({ "lazygit", "-f", vim.trim(git_path) }, { esc_esc = false, ctrl_hjkl = false })
end, { desc = "Lazygit current file history" })
LazyVim.lazygit({args = { "-f", vim.trim(git_path) }})
end, { desc = "Lazygit Current File History" })
-- quit
map("n", "<leader>qq", "<cmd>qa<cr>", { desc = "Quit all" })
map("n", "<leader>qq", "<cmd>qa<cr>", { desc = "Quit All" })
-- highlights under cursor
map("n", "<leader>ui", vim.show_pos, { desc = "Inspect Pos" })
@@ -144,27 +145,27 @@ map("n", "<leader>L", function() LazyVim.news.changelog() end, { desc = "LazyVim
-- floating terminal
local lazyterm = function() LazyVim.terminal(nil, { cwd = LazyVim.root() }) end
map("n", "<leader>ft", lazyterm, { desc = "Terminal (root dir)" })
map("n", "<leader>ft", lazyterm, { desc = "Terminal (Root Dir)" })
map("n", "<leader>fT", function() LazyVim.terminal() end, { desc = "Terminal (cwd)" })
map("n", "<c-/>", lazyterm, { desc = "Terminal (root dir)" })
map("n", "<c-/>", lazyterm, { desc = "Terminal (Root Dir)" })
map("n", "<c-_>", lazyterm, { desc = "which_key_ignore" })
-- Terminal Mappings
map("t", "<esc><esc>", "<c-\\><c-n>", { desc = "Enter Normal Mode" })
map("t", "<C-h>", "<cmd>wincmd h<cr>", { desc = "Go to left window" })
map("t", "<C-j>", "<cmd>wincmd j<cr>", { desc = "Go to lower window" })
map("t", "<C-k>", "<cmd>wincmd k<cr>", { desc = "Go to upper window" })
map("t", "<C-l>", "<cmd>wincmd l<cr>", { desc = "Go to right window" })
map("t", "<C-h>", "<cmd>wincmd h<cr>", { desc = "Go to Left Window" })
map("t", "<C-j>", "<cmd>wincmd j<cr>", { desc = "Go to Lower Window" })
map("t", "<C-k>", "<cmd>wincmd k<cr>", { desc = "Go to Upper Window" })
map("t", "<C-l>", "<cmd>wincmd l<cr>", { desc = "Go to Right Window" })
map("t", "<C-/>", "<cmd>close<cr>", { desc = "Hide Terminal" })
map("t", "<c-_>", "<cmd>close<cr>", { desc = "which_key_ignore" })
-- windows
map("n", "<leader>ww", "<C-W>p", { desc = "Other window", remap = true })
map("n", "<leader>wd", "<C-W>c", { desc = "Delete window", remap = true })
map("n", "<leader>w-", "<C-W>s", { desc = "Split window below", remap = true })
map("n", "<leader>w|", "<C-W>v", { desc = "Split window right", remap = true })
map("n", "<leader>-", "<C-W>s", { desc = "Split window below", remap = true })
map("n", "<leader>|", "<C-W>v", { desc = "Split window right", remap = true })
map("n", "<leader>ww", "<C-W>p", { desc = "Other Window", remap = true })
map("n", "<leader>wd", "<C-W>c", { desc = "Delete Window", remap = true })
map("n", "<leader>w-", "<C-W>s", { desc = "Split Window Below", remap = true })
map("n", "<leader>w|", "<C-W>v", { desc = "Split Window Right", remap = true })
map("n", "<leader>-", "<C-W>s", { desc = "Split Window Below", remap = true })
map("n", "<leader>|", "<C-W>v", { desc = "Split Window Right", remap = true })
-- tabs
map("n", "<leader><tab>l", "<cmd>tablast<cr>", { desc = "Last Tab" })

View File

@@ -12,6 +12,13 @@ vim.g.autoformat = true
-- * a function with signature `function(buf) -> string|string[]`
vim.g.root_spec = { "lsp", { ".git", "lua" }, "cwd" }
-- LazyVim automatically configures lazygit:
-- * theme, based on the active colorscheme.
-- * editorPreset to nvim-remote
-- * enables nerd font icons
-- Set to false to disable.
vim.g.lazygit_config = true
-- Optionally setup the terminal to use
-- This sets `vim.o.shell` and does some additional configuration for:
-- * pwsh
@@ -74,7 +81,6 @@ opt.wrap = false -- Disable line wrap
opt.fillchars = {
foldopen = "",
foldclose = "",
-- fold = "⸱",
fold = " ",
foldsep = " ",
diff = "",
@@ -87,16 +93,18 @@ end
-- Folding
vim.opt.foldlevel = 99
vim.opt.foldtext = "v:lua.require'lazyvim.util'.ui.foldtext()"
if vim.fn.has("nvim-0.9.0") == 1 then
vim.opt.statuscolumn = [[%!v:lua.require'lazyvim.util'.ui.statuscolumn()]]
vim.opt.foldtext = "v:lua.require'lazyvim.util'.ui.foldtext()"
end
-- HACK: causes freezes on <= 0.9, so only enable on >= 0.10 for now
if vim.fn.has("nvim-0.10") == 1 then
vim.opt.foldmethod = "expr"
vim.opt.foldexpr = "v:lua.require'lazyvim.util'.ui.foldexpr()"
vim.opt.foldtext = ""
vim.opt.fillchars = "fold: "
else
vim.opt.foldmethod = "indent"
end

View File

@@ -10,11 +10,22 @@ return {
"hrsh7th/cmp-buffer",
"hrsh7th/cmp-path",
},
-- Not all LSP servers add brackets when completing a function.
-- To better deal with this, LazyVim adds a custom option to cmp,
-- that you can configure. For example:
--
-- ```lua
-- opts = {
-- auto_brackets = { "python" }
-- }
-- ```
opts = function()
vim.api.nvim_set_hl(0, "CmpGhostText", { link = "Comment", default = true })
local cmp = require("cmp")
local defaults = require("cmp.config.default")()
return {
auto_brackets = {}, -- configure any filetype to auto add brackets
completion = {
completeopt = "menu,menuone,noinsert",
},
@@ -58,19 +69,32 @@ return {
sorting = defaults.sorting,
}
end,
---@param opts cmp.ConfigSchema
---@param opts cmp.ConfigSchema | {auto_brackets?: string[]}
config = function(_, opts)
for _, source in ipairs(opts.sources) do
source.group_index = source.group_index or 1
end
require("cmp").setup(opts)
local cmp = require("cmp")
local Kind = cmp.lsp.CompletionItemKind
cmp.setup(opts)
cmp.event:on("confirm_done", function(event)
if not vim.tbl_contains(opts.auto_brackets or {}, vim.bo.filetype) then
return
end
local entry = event.entry
local item = entry:get_completion_item()
if vim.tbl_contains({ Kind.Function, Kind.Method }, item.kind) then
local keys = vim.api.nvim_replace_termcodes("()<left>", false, false, true)
vim.api.nvim_feedkeys(keys, "i", true)
end
end)
end,
},
-- snippets
{
"L3MON4D3/LuaSnip",
build = (not jit.os:find("Windows"))
build = (not LazyVim.is_win())
and "echo 'NOTE: jsregexp is optional, so not a big deal if it fails to build'; make install_jsregexp"
or nil,
dependencies = {
@@ -117,7 +141,11 @@ return {
{
"echasnovski/mini.pairs",
event = "VeryLazy",
opts = {},
opts = {
mappings = {
["`"] = { action = "closeopen", pair = "``", neigh_pattern = "[^\\`].", register = { cr = false } },
},
},
keys = {
{
"<leader>up",
@@ -129,7 +157,7 @@ return {
LazyVim.info("Enabled auto pairs", { title = "Option" })
end
end,
desc = "Toggle auto pairs",
desc = "Toggle Auto Pairs",
},
},
},
@@ -145,12 +173,12 @@ return {
local plugin = require("lazy.core.config").spec.plugins["mini.surround"]
local opts = require("lazy.core.plugin").values(plugin, "opts", false)
local mappings = {
{ opts.mappings.add, desc = "Add surrounding", mode = { "n", "v" } },
{ opts.mappings.delete, desc = "Delete surrounding" },
{ opts.mappings.find, desc = "Find right surrounding" },
{ opts.mappings.find_left, desc = "Find left surrounding" },
{ opts.mappings.highlight, desc = "Highlight surrounding" },
{ opts.mappings.replace, desc = "Replace surrounding" },
{ opts.mappings.add, desc = "Add Surrounding", mode = { "n", "v" } },
{ opts.mappings.delete, desc = "Delete Surrounding" },
{ opts.mappings.find, desc = "Find Right Surrounding" },
{ opts.mappings.find_left, desc = "Find Left Surrounding" },
{ opts.mappings.highlight, desc = "Highlight Surrounding" },
{ opts.mappings.replace, desc = "Replace Surrounding" },
{ opts.mappings.update_n_lines, desc = "Update `MiniSurround.config.n_lines`" },
}
mappings = vim.tbl_filter(function(m)

View File

@@ -11,7 +11,7 @@ return {
function()
require("neo-tree.command").execute({ toggle = true, dir = LazyVim.root() })
end,
desc = "Explorer NeoTree (root dir)",
desc = "Explorer NeoTree (Root Dir)",
},
{
"<leader>fE",
@@ -20,21 +20,21 @@ return {
end,
desc = "Explorer NeoTree (cwd)",
},
{ "<leader>e", "<leader>fe", desc = "Explorer NeoTree (root dir)", remap = true },
{ "<leader>e", "<leader>fe", desc = "Explorer NeoTree (Root Dir)", remap = true },
{ "<leader>E", "<leader>fE", desc = "Explorer NeoTree (cwd)", remap = true },
{
"<leader>ge",
function()
require("neo-tree.command").execute({ source = "git_status", toggle = true })
end,
desc = "Git explorer",
desc = "Git Explorer",
},
{
"<leader>be",
function()
require("neo-tree.command").execute({ source = "buffers", toggle = true })
end,
desc = "Buffer explorer",
desc = "Buffer Explorer",
},
},
deactivate = function()
@@ -65,7 +65,13 @@ return {
local path = node:get_id()
vim.fn.setreg("+", path, "c")
end,
desc = "copy path to clipboard",
desc = "Copy Path to Clipboard",
},
["O"] = {
function(state)
require("lazy.util").open(state.tree:get_node().path, { system = true })
end,
desc = "Open with System Application",
},
},
},
@@ -109,7 +115,7 @@ return {
opts = { open_cmd = "noswapfile vnew" },
-- stylua: ignore
keys = {
{ "<leader>sr", function() require("spectre").open() end, desc = "Replace in files (Spectre)" },
{ "<leader>sr", function() require("spectre").open() end, desc = "Replace in Files (Spectre)" },
},
},
@@ -140,29 +146,29 @@ return {
"<cmd>Telescope buffers sort_mru=true sort_lastused=true<cr>",
desc = "Switch Buffer",
},
{ "<leader>/", LazyVim.telescope("live_grep"), desc = "Grep (root dir)" },
{ "<leader>/", LazyVim.telescope("live_grep"), desc = "Grep (Root Dir)" },
{ "<leader>:", "<cmd>Telescope command_history<cr>", desc = "Command History" },
{ "<leader><space>", LazyVim.telescope("files"), desc = "Find Files (root dir)" },
{ "<leader><space>", LazyVim.telescope("files"), desc = "Find Files (Root Dir)" },
-- find
{ "<leader>fb", "<cmd>Telescope buffers sort_mru=true sort_lastused=true<cr>", desc = "Buffers" },
{ "<leader>fc", LazyVim.telescope.config_files(), desc = "Find Config File" },
{ "<leader>ff", LazyVim.telescope("files"), desc = "Find Files (root dir)" },
{ "<leader>ff", LazyVim.telescope("files"), desc = "Find Files (Root Dir)" },
{ "<leader>fF", LazyVim.telescope("files", { cwd = false }), desc = "Find Files (cwd)" },
{ "<leader>fg", "<cmd>Telescope git_files<cr>", desc = "Find Files (git-files)" },
{ "<leader>fr", "<cmd>Telescope oldfiles<cr>", desc = "Recent" },
{ "<leader>fR", LazyVim.telescope("oldfiles", { cwd = vim.uv.cwd() }), desc = "Recent (cwd)" },
-- git
{ "<leader>gc", "<cmd>Telescope git_commits<CR>", desc = "commits" },
{ "<leader>gs", "<cmd>Telescope git_status<CR>", desc = "status" },
{ "<leader>gc", "<cmd>Telescope git_commits<CR>", desc = "Commits" },
{ "<leader>gs", "<cmd>Telescope git_status<CR>", desc = "Status" },
-- search
{ '<leader>s"', "<cmd>Telescope registers<cr>", desc = "Registers" },
{ "<leader>sa", "<cmd>Telescope autocommands<cr>", desc = "Auto Commands" },
{ "<leader>sb", "<cmd>Telescope current_buffer_fuzzy_find<cr>", desc = "Buffer" },
{ "<leader>sc", "<cmd>Telescope command_history<cr>", desc = "Command History" },
{ "<leader>sC", "<cmd>Telescope commands<cr>", desc = "Commands" },
{ "<leader>sd", "<cmd>Telescope diagnostics bufnr=0<cr>", desc = "Document diagnostics" },
{ "<leader>sD", "<cmd>Telescope diagnostics<cr>", desc = "Workspace diagnostics" },
{ "<leader>sg", LazyVim.telescope("live_grep"), desc = "Grep (root dir)" },
{ "<leader>sd", "<cmd>Telescope diagnostics bufnr=0<cr>", desc = "Document Diagnostics" },
{ "<leader>sD", "<cmd>Telescope diagnostics<cr>", desc = "Workspace Diagnostics" },
{ "<leader>sg", LazyVim.telescope("live_grep"), desc = "Grep (Root Dir)" },
{ "<leader>sG", LazyVim.telescope("live_grep", { cwd = false }), desc = "Grep (cwd)" },
{ "<leader>sh", "<cmd>Telescope help_tags<cr>", desc = "Help Pages" },
{ "<leader>sH", "<cmd>Telescope highlights<cr>", desc = "Search Highlight Groups" },
@@ -171,11 +177,11 @@ return {
{ "<leader>sm", "<cmd>Telescope marks<cr>", desc = "Jump to Mark" },
{ "<leader>so", "<cmd>Telescope vim_options<cr>", desc = "Options" },
{ "<leader>sR", "<cmd>Telescope resume<cr>", desc = "Resume" },
{ "<leader>sw", LazyVim.telescope("grep_string", { word_match = "-w" }), desc = "Word (root dir)" },
{ "<leader>sw", LazyVim.telescope("grep_string", { word_match = "-w" }), desc = "Word (Root Dir)" },
{ "<leader>sW", LazyVim.telescope("grep_string", { cwd = false, word_match = "-w" }), desc = "Word (cwd)" },
{ "<leader>sw", LazyVim.telescope("grep_string"), mode = "v", desc = "Selection (root dir)" },
{ "<leader>sw", LazyVim.telescope("grep_string"), mode = "v", desc = "Selection (Root Dir)" },
{ "<leader>sW", LazyVim.telescope("grep_string", { cwd = false }), mode = "v", desc = "Selection (cwd)" },
{ "<leader>uC", LazyVim.telescope("colorscheme", { enable_preview = true }), desc = "Colorscheme with preview" },
{ "<leader>uC", LazyVim.telescope("colorscheme", { enable_preview = true }), desc = "Colorscheme with Preview" },
{
"<leader>ss",
function()
@@ -466,7 +472,7 @@ return {
end
end
end,
desc = "Previous trouble/quickfix item",
desc = "Previous Trouble/Quickfix Item",
},
{
"]q",
@@ -480,7 +486,7 @@ return {
end
end
end,
desc = "Next trouble/quickfix item",
desc = "Next Trouble/Quickfix Item",
},
},
},
@@ -494,8 +500,8 @@ return {
config = true,
-- stylua: ignore
keys = {
{ "]t", function() require("todo-comments").jump_next() end, desc = "Next todo comment" },
{ "[t", function() require("todo-comments").jump_prev() end, desc = "Previous todo comment" },
{ "]t", function() require("todo-comments").jump_next() end, desc = "Next Todo Comment" },
{ "[t", function() require("todo-comments").jump_prev() end, desc = "Previous Todo Comment" },
{ "<leader>xt", "<cmd>TodoTrouble<cr>", desc = "Todo (Trouble)" },
{ "<leader>xT", "<cmd>TodoTrouble keywords=TODO,FIX,FIXME<cr>", desc = "Todo/Fix/Fixme (Trouble)" },
{ "<leader>st", "<cmd>TodoTelescope<cr>", desc = "Todo" },

View File

@@ -1,3 +1,8 @@
if not vim.snippet then
LazyVim.warn("Native snippets are only supported on Neovim >= 0.10.0")
return {}
end
return {
desc = "Use native snippets instead of LuaSnip. Only works on Neovim >= 0.10!",
{

View File

@@ -2,31 +2,31 @@ return {
-- better yank/paste
{
"gbprod/yanky.nvim",
dependencies = not jit.os:find("Windows") and { "kkharji/sqlite.lua" } or {},
dependencies = not LazyVim.is_win() and { "kkharji/sqlite.lua" } or {},
opts = {
highlight = { timer = 250 },
ring = { storage = jit.os:find("Windows") and "shada" or "sqlite" },
ring = { storage = LazyVim.is_win() and "shada" or "sqlite" },
},
keys = {
-- stylua: ignore
{ "<leader>p", function() require("telescope").extensions.yank_history.yank_history({ }) end, desc = "Open Yank History" },
{ "y", "<Plug>(YankyYank)", mode = { "n", "x" }, desc = "Yank text" },
{ "p", "<Plug>(YankyPutAfter)", mode = { "n", "x" }, desc = "Put yanked text after cursor" },
{ "P", "<Plug>(YankyPutBefore)", mode = { "n", "x" }, desc = "Put yanked text before cursor" },
{ "gp", "<Plug>(YankyGPutAfter)", mode = { "n", "x" }, desc = "Put yanked text after selection" },
{ "gP", "<Plug>(YankyGPutBefore)", mode = { "n", "x" }, desc = "Put yanked text before selection" },
{ "[y", "<Plug>(YankyCycleForward)", desc = "Cycle forward through yank history" },
{ "]y", "<Plug>(YankyCycleBackward)", desc = "Cycle backward through yank history" },
{ "]p", "<Plug>(YankyPutIndentAfterLinewise)", desc = "Put indented after cursor (linewise)" },
{ "[p", "<Plug>(YankyPutIndentBeforeLinewise)", desc = "Put indented before cursor (linewise)" },
{ "]P", "<Plug>(YankyPutIndentAfterLinewise)", desc = "Put indented after cursor (linewise)" },
{ "[P", "<Plug>(YankyPutIndentBeforeLinewise)", desc = "Put indented before cursor (linewise)" },
{ ">p", "<Plug>(YankyPutIndentAfterShiftRight)", desc = "Put and indent right" },
{ "<p", "<Plug>(YankyPutIndentAfterShiftLeft)", desc = "Put and indent left" },
{ ">P", "<Plug>(YankyPutIndentBeforeShiftRight)", desc = "Put before and indent right" },
{ "<P", "<Plug>(YankyPutIndentBeforeShiftLeft)", desc = "Put before and indent left" },
{ "=p", "<Plug>(YankyPutAfterFilter)", desc = "Put after applying a filter" },
{ "=P", "<Plug>(YankyPutBeforeFilter)", desc = "Put before applying a filter" },
{ "y", "<Plug>(YankyYank)", mode = { "n", "x" }, desc = "Yank Text" },
{ "p", "<Plug>(YankyPutAfter)", mode = { "n", "x" }, desc = "Put Yanked Text After Cursor" },
{ "P", "<Plug>(YankyPutBefore)", mode = { "n", "x" }, desc = "Put Yanked Text Before Cursor" },
{ "gp", "<Plug>(YankyGPutAfter)", mode = { "n", "x" }, desc = "Put Yanked Text After Selection" },
{ "gP", "<Plug>(YankyGPutBefore)", mode = { "n", "x" }, desc = "Put Yanked Text Before Selection" },
{ "[y", "<Plug>(YankyCycleForward)", desc = "Cycle Forward Through Yank History" },
{ "]y", "<Plug>(YankyCycleBackward)", desc = "Cycle Backward Through Yank History" },
{ "]p", "<Plug>(YankyPutIndentAfterLinewise)", desc = "Put Indented After Cursor (Linewise)" },
{ "[p", "<Plug>(YankyPutIndentBeforeLinewise)", desc = "Put Indented Before Cursor (Linewise)" },
{ "]P", "<Plug>(YankyPutIndentAfterLinewise)", desc = "Put Indented After Cursor (Linewise)" },
{ "[P", "<Plug>(YankyPutIndentBeforeLinewise)", desc = "Put Indented Before Cursor (Linewise)" },
{ ">p", "<Plug>(YankyPutIndentAfterShiftRight)", desc = "Put and Indent Right" },
{ "<p", "<Plug>(YankyPutIndentAfterShiftLeft)", desc = "Put and Indent Left" },
{ ">P", "<Plug>(YankyPutIndentBeforeShiftRight)", desc = "Put Before and Indent Right" },
{ "<P", "<Plug>(YankyPutIndentBeforeShiftLeft)", desc = "Put Before and Indent Left" },
{ "=p", "<Plug>(YankyPutAfterFilter)", desc = "Put After Applying a Filter" },
{ "=P", "<Plug>(YankyPutBeforeFilter)", desc = "Put Before Applying a Filter" },
},
},
}

View File

@@ -90,7 +90,7 @@ return {
{ "<leader>dc", function() require("dap").continue() end, desc = "Continue" },
{ "<leader>da", function() require("dap").continue({ before = get_args }) end, desc = "Run with Args" },
{ "<leader>dC", function() require("dap").run_to_cursor() end, desc = "Run to Cursor" },
{ "<leader>dg", function() require("dap").goto_() end, desc = "Go to line (no execute)" },
{ "<leader>dg", function() require("dap").goto_() end, desc = "Go to Line (No Execute)" },
{ "<leader>di", function() require("dap").step_into() end, desc = "Step Into" },
{ "<leader>dj", function() require("dap").down() end, desc = "Down" },
{ "<leader>dk", function() require("dap").up() end, desc = "Up" },

View File

@@ -0,0 +1,171 @@
local M = {}
---@type table<string, table<string, string[]>>
M.dials_by_ft = {}
---@param increment boolean
---@param g? boolean
function M.dial(increment, g)
local is_visual = vim.fn.mode(true):sub(1, 1) == "v"
local func = (increment and "inc" or "dec") .. (g and "_g" or "_") .. (is_visual and "visual" or "normal")
local group = M.dials_by_ft[vim.bo.filetype] or "default"
return require("dial.map")[func](group)
end
return {
"monaqa/dial.nvim",
-- stylua: ignore
keys = {
{ "<C-a>", function() return M.dial(true) end, expr = true, desc = "Increment", mode = {"n", "v"} },
{ "<C-x>", function() return M.dial(false) end, expr = true, desc = "Decrement", mode = {"n", "v"} },
{ "g<C-a>", function() return M.dial(true, true) end, expr = true, desc = "Increment", mode = {"n", "v"} },
{ "g<C-x>", function() return M.dial(false, true) end, expr = true, desc = "Decrement", mode = {"n", "v"} },
},
opts = function()
local augend = require("dial.augend")
local logical_alias = augend.constant.new({
elements = { "&&", "||" },
word = false,
cyclic = true,
})
local ordinal_numbers = augend.constant.new({
-- elements through which we cycle. When we increment, we go down
-- On decrement we go up
elements = {
"first",
"second",
"third",
"fourth",
"fifth",
"sixth",
"seventh",
"eighth",
"ninth",
"tenth",
},
-- if true, it only matches strings with word boundary. firstDate wouldn't work for example
word = false,
-- do we cycle back and forth (tenth to first on increment, first to tenth on decrement).
-- Otherwise nothing will happen when there are no further values
cyclic = true,
})
local weekdays = augend.constant.new({
elements = {
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday",
"Sunday",
},
word = true,
cyclic = true,
})
local months = augend.constant.new({
elements = {
"January",
"February",
"March",
"April",
"May",
"June",
"July",
"August",
"September",
"October",
"November",
"December",
},
word = true,
cyclic = true,
})
local capitalized_boolean = augend.constant.new({
elements = {
"True",
"False",
},
word = true,
cyclic = true,
})
return {
dials_by_ft = {
css = "css",
javascript = "typescript",
javascriptreact = "typescript",
json = "json",
lua = "lua",
markdown = "markdown",
python = "python",
sass = "css",
scss = "css",
typescript = "typescript",
typescriptreact = "typescript",
},
groups = {
default = {
augend.integer.alias.decimal, -- nonnegative decimal number (0, 1, 2, 3, ...)
augend.integer.alias.hex, -- nonnegative hex number (0x01, 0x1a1f, etc.)
augend.date.alias["%Y/%m/%d"], -- date (2022/02/19, etc.)
},
typescript = {
augend.integer.alias.decimal, -- nonnegative and negative decimal number
augend.constant.alias.bool, -- boolean value (true <-> false)
logical_alias,
augend.constant.new({ elements = { "let", "const" } }),
ordinal_numbers,
weekdays,
months,
},
css = {
augend.integer.alias.decimal, -- nonnegative and negative decimal number
augend.hexcolor.new({
case = "lower",
}),
augend.hexcolor.new({
case = "upper",
}),
},
markdown = {
augend.misc.alias.markdown_header,
ordinal_numbers,
weekdays,
months,
},
json = {
augend.integer.alias.decimal, -- nonnegative and negative decimal number
augend.semver.alias.semver, -- versioning (v1.1.2)
},
lua = {
augend.integer.alias.decimal, -- nonnegative and negative decimal number
augend.constant.alias.bool, -- boolean value (true <-> false)
augend.constant.new({
elements = { "and", "or" },
word = true, -- if false, "sand" is incremented into "sor", "doctor" into "doctand", etc.
cyclic = true, -- "or" is incremented into "and".
}),
ordinal_numbers,
weekdays,
months,
},
python = {
augend.integer.alias.decimal, -- nonnegative and negative decimal number
capitalized_boolean,
logical_alias,
ordinal_numbers,
weekdays,
months,
},
},
}
end,
config = function(_, opts)
require("dial.config").augends:register_group(opts.groups)
M.dials_by_ft = opts.dials_by_ft
end,
}

View File

@@ -6,56 +6,34 @@ return {
width = vim.api.nvim_win_get_width(0) - 4,
},
},
keys = {
{
"<leader>H",
function()
require("harpoon"):list():append()
end,
desc = "Harpoon file",
},
{
"<leader>h",
function()
local harpoon = require("harpoon")
harpoon.ui:toggle_quick_menu(harpoon:list())
end,
desc = "Harpoon quick menu",
},
{
"<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",
},
},
keys = function()
local keys = {
{
"<leader>H",
function()
require("harpoon"):list():append()
end,
desc = "Harpoon File",
},
{
"<leader>h",
function()
local harpoon = require("harpoon")
harpoon.ui:toggle_quick_menu(harpoon:list())
end,
desc = "Harpoon Quick Menu",
}
}
for i = 1, 5 do
table.insert(keys, {
"<leader>" .. i,
function()
require("harpoon"):list():select(i)
end,
desc = "Harpoon to File " .. i,
})
end
return keys
end
}

View File

@@ -20,9 +20,9 @@ return {
"ggandor/leap.nvim",
enabled = true,
keys = {
{ "s", mode = { "n", "x", "o" }, desc = "Leap forward to" },
{ "S", mode = { "n", "x", "o" }, desc = "Leap backward to" },
{ "gs", mode = { "n", "x", "o" }, desc = "Leap from windows" },
{ "s", mode = { "n", "x", "o" }, desc = "Leap Forward to" },
{ "S", mode = { "n", "x", "o" }, desc = "Leap Backward to" },
{ "gs", mode = { "n", "x", "o" }, desc = "Leap from Windows" },
},
config = function(_, opts)
local leap = require("leap")

View File

@@ -0,0 +1,54 @@
return {
-- disable gitsigns.nvim
{
"lewis6991/gitsigns.nvim",
enabled = false,
},
-- setup mini.diff
{
"echasnovski/mini.diff",
event = "VeryLazy",
keys = {
{
"<leader>go",
function()
require("mini.diff").toggle_overlay(0)
end,
desc = "Toggle mini.diff overlay",
},
},
opts = {
view = {
style = "sign",
signs = {
add = "",
change = "",
delete = "",
},
},
},
},
-- lualine integration
{
"nvim-lualine/lualine.nvim",
opts = function(_, opts)
local x = opts.sections.lualine_x
for _, comp in ipairs(x) do
if comp[1] == "diff" then
comp.source = function()
local summary = vim.b.minidiff_summary
return summary
and {
added = summary.add,
modified = summary.change,
removed = summary.delete,
}
end
break
end
end
end,
},
}

View File

@@ -18,7 +18,7 @@ return {
function()
require("mini.files").open(vim.api.nvim_buf_get_name(0), true)
end,
desc = "Open mini.files (directory of current file)",
desc = "Open mini.files (Directory of Current File)",
},
{
"<leader>fM",
@@ -50,7 +50,7 @@ return {
callback = function(args)
local buf_id = args.data.buf_id
-- Tweak left-hand side of mapping to your liking
vim.keymap.set("n", "g.", toggle_dotfiles, { buffer = buf_id, desc = "Toggle hidden files" })
vim.keymap.set("n", "g.", toggle_dotfiles, { buffer = buf_id, desc = "Toggle Hidden Files" })
end,
})

View File

@@ -0,0 +1,7 @@
return {
{
"echasnovski/mini.move",
event = "VeryLazy",
opts = {},
},
}

View File

@@ -0,0 +1,77 @@
local Config = require("lazyvim.config")
for _, other in ipairs({ "aerial", "outline" }) do
local extra = "lazyvim.plugins.extras.editor." .. other
if vim.tbl_contains(Config.json.data.extras, extra) then
other = other:gsub("^%l", string.upper)
LazyVim.error({
"**Trouble v3** includes support for document symbols.",
("You currently have the **%s** extra enabled."):format(other),
"Please disable it in your config.",
})
end
end
return {
{
"folke/trouble.nvim",
branch = "dev",
keys = {
{ "<leader>xx", "<cmd>Trouble diagnostics toggle<cr>", desc = "Diagnostics (Trouble)" },
{ "<leader>xX", "<cmd>Trouble diagnostics toggle filter.buf=0<cr>", desc = "Buffer Diagnostics (Trouble)" },
{ "<leader>cs", "<cmd>Trouble symbols toggle focus=false<cr>", desc = "Symbols (Trouble)" },
{
"<leader>cS",
"<cmd>Trouble lsp toggle focus=false win.position=right<cr>",
desc = "LSP references/definitions/... (Trouble)",
},
{ "<leader>xL", "<cmd>Trouble loclist toggle<cr>", desc = "Location List (Trouble)" },
{ "<leader>xQ", "<cmd>Trouble qflist toggle<cr>", desc = "Quickfix List (Trouble)" },
},
},
-- lualine integration
{
"nvim-lualine/lualine.nvim",
optional = true,
opts = function(_, opts)
local trouble = require("trouble")
if not trouble.statusline then
LazyVim.error("You have enabled the **trouble-v3** extra,\nbut still need to update it with `:Lazy`")
return
end
local symbols = trouble.statusline({
mode = "symbols",
groups = {},
title = false,
filter = { range = true },
format = "{kind_icon}{symbol.name:Normal}",
})
table.insert(opts.sections.lualine_c, {
symbols.get,
cond = symbols.has,
})
end,
},
{
"folke/edgy.nvim",
optional = true,
opts = function(_, opts)
for _, pos in ipairs({ "top", "bottom", "left", "right" }) do
opts[pos] = opts[pos] or {}
table.insert(opts[pos], {
ft = "trouble",
filter = function(_buf, win)
return vim.w[win].trouble
and vim.w[win].trouble.position == pos
and vim.w[win].trouble.type == "split"
and vim.w[win].trouble.relative == "editor"
and not vim.w[win].trouble_preview
end,
})
end
end,
},
}

View File

@@ -16,15 +16,16 @@ return {
callback = function()
-- Only add style, inherit or link to the LSP's colors
vim.cmd([[
highlight! semshiGlobal gui=italic
highlight! link semshiGlobal @none
highlight! link semshiImported @none
highlight! link semshiParameter @lsp.type.parameter
highlight! link semshiParameterUnused DiagnosticUnnecessary
highlight! link semshiBuiltin @function.builtin
highlight! link semshiAttribute @field
highlight! link semshiSelf @lsp.type.selfKeyword
highlight! link semshiUnresolved @lsp.type.unresolvedReference
highlight! link semshiUnresolved @none
highlight! link semshiFree @none
highlight! link semshiAttribute @none
highlight! link semshiParameterUnused @none
]])
end,
})

View File

@@ -4,6 +4,8 @@ if lazyvim_docs then
vim.g.lazyvim_python_lsp = "pyright"
end
local lsp = vim.g.lazyvim_python_lsp or "pyright"
return {
{
"nvim-treesitter/nvim-treesitter",
@@ -18,10 +20,13 @@ return {
opts = {
servers = {
pyright = {
enabled = vim.g.lazyvim_python_lsp ~= "basedpyright",
enabled = lsp == "pyright",
},
basedpyright = {
enabled = vim.g.lazyvim_python_lsp == "basedpyright",
enabled = lsp == "basedpyright",
},
[lsp] = {
enabled = true,
},
ruff_lsp = {
keys = {
@@ -103,4 +108,11 @@ return {
end,
keys = { { "<leader>cv", "<cmd>:VenvSelect<cr>", desc = "Select VirtualEnv" } },
},
{
"hrsh7th/nvim-cmp",
opts = function(_, opts)
opts.auto_brackets = opts.auto_brackets or {}
table.insert(opts.auto_brackets, "python")
end,
},
}

View File

@@ -52,7 +52,7 @@ return {
end, { desc = "Code Action", buffer = bufnr })
vim.keymap.set("n", "<leader>dr", function()
vim.cmd.RustLsp("debuggables")
end, { desc = "Rust debuggables", buffer = bufnr })
end, { desc = "Rust Debuggables", buffer = bufnr })
end,
default_settings = {
-- rust-analyzer language server configuration

View File

@@ -28,14 +28,6 @@ return {
"lervag/vimtex",
lazy = false, -- lazy-loading will disable inverse search
config = function()
vim.api.nvim_create_autocmd({ "FileType" }, {
group = vim.api.nvim_create_augroup("lazyvim_vimtex_conceal", { clear = true }),
pattern = { "bib", "tex" },
callback = function()
vim.wo.conceallevel = 2
end,
})
vim.g.vimtex_mappings_disable = { ["n"] = { "K" } } -- disable `K` as it conflicts with LSP hover
vim.g.vimtex_quickfix_method = vim.fn.executable("pplatex") == 1 and "pplatex" or "latexlog"
end,

View File

@@ -40,12 +40,6 @@ return {
end,
},
"Trouble",
{
ft = "trouble",
filter = function(buf, win)
return vim.api.nvim_win_get_config(win).relative == ""
end,
},
{ ft = "qf", title = "QuickFix" },
{
ft = "help",

View File

@@ -7,6 +7,23 @@ local function have(path)
end
return {
{
"neovim/nvim-lspconfig",
opts = {
servers = {
bashls = {},
},
},
},
{
"williamboman/mason.nvim",
opts = function(_, opts)
vim.list_extend(opts.ensure_installed or {}, {
"shfmt",
"shellcheck",
})
end,
},
-- add some stuff to treesitter
{
"nvim-treesitter/nvim-treesitter",

View File

@@ -8,12 +8,12 @@ return {
function()
LazyVim.terminal.open({ "gitui" }, { esc_esc = false, ctrl_hjkl = false })
end,
desc = "gitui (cwd)" },
desc = "GitUi (cwd)" },
{ "<leader>gg",
function()
LazyVim.terminal.open({ "gitui" }, { cwd = LazyVim.root.get(), esc_esc = false, ctrl_hjkl = false })
end,
desc = "gitui (root dir)" }
desc = "GitUi (Root Dir)" }
},
opts = function(_, opts)
opts.ensure_installed = opts.ensure_installed or {}

View File

@@ -11,6 +11,7 @@ return {
-- ['*'] = { 'global linter' },
-- Use the "_" filetype to run linters on filetypes that don't have other linters configured.
-- ['_'] = { 'fallback linter' },
-- ["*"] = { "typos" },
},
-- LazyVim extension to easily override linter options
-- or add custom linters.
@@ -57,6 +58,9 @@ return {
-- * this differs from conform.nvim which only uses the first filetype that has a formatter
local names = lint._resolve_linter_by_ft(vim.bo.filetype)
-- Create a copy of the names table to avoid modifying the original.
names = vim.list_extend({}, names)
-- Add fallback linters.
if #names == 0 then
vim.list_extend(names, lint.linters_by_ft["_"] or {})

View File

@@ -12,6 +12,7 @@ return {
---@class PluginLspOpts
opts = {
-- options for vim.diagnostic.config()
---@type vim.diagnostic.Opts
diagnostics = {
underline = true,
update_in_insert = false,
@@ -26,10 +27,10 @@ return {
severity_sort = true,
signs = {
text = {
[vim.diagnostic.severity.ERROR] = require("lazyvim.config").icons.diagnostics.Error,
[vim.diagnostic.severity.WARN] = require("lazyvim.config").icons.diagnostics.Warn,
[vim.diagnostic.severity.HINT] = require("lazyvim.config").icons.diagnostics.Hint,
[vim.diagnostic.severity.INFO] = require("lazyvim.config").icons.diagnostics.Info,
[vim.diagnostic.severity.ERROR] = LazyVim.config.icons.diagnostics.Error,
[vim.diagnostic.severity.WARN] = LazyVim.config.icons.diagnostics.Warn,
[vim.diagnostic.severity.HINT] = LazyVim.config.icons.diagnostics.Hint,
[vim.diagnostic.severity.INFO] = LazyVim.config.icons.diagnostics.Info,
},
},
},
@@ -101,12 +102,6 @@ return {
-- setup autoformat
LazyVim.format.register(LazyVim.lsp.formatter())
-- deprecated options
if opts.autoformat ~= nil then
vim.g.autoformat = opts.autoformat
LazyVim.deprecate("nvim-lspconfig.opts.autoformat", "vim.g.autoformat")
end
-- setup keymaps
LazyVim.lsp.on_attach(function(client, buffer)
require("lazyvim.plugins.lsp.keymaps").on_attach(client, buffer)
@@ -115,19 +110,21 @@ return {
local register_capability = vim.lsp.handlers["client/registerCapability"]
vim.lsp.handlers["client/registerCapability"] = function(err, res, ctx)
---@diagnostic disable-next-line: no-unknown
local ret = register_capability(err, res, ctx)
local client_id = ctx.client_id
---@type lsp.Client
local client = vim.lsp.get_client_by_id(client_id)
local client = vim.lsp.get_client_by_id(ctx.client_id)
local buffer = vim.api.nvim_get_current_buf()
require("lazyvim.plugins.lsp.keymaps").on_attach(client, buffer)
return ret
end
-- diagnostics
for name, icon in pairs(require("lazyvim.config").icons.diagnostics) do
name = "DiagnosticSign" .. name
vim.fn.sign_define(name, { text = icon, texthl = name, numhl = "" })
-- diagnostics signs
if vim.fn.has("nvim-0.10.0") == 0 then
for severity, icon in pairs(opts.diagnostics.signs.text) do
local name = vim.diagnostic.severity[severity]:lower():gsub("^%l", string.upper)
name = "DiagnosticSign" .. name
vim.fn.sign_define(name, { text = icon, texthl = name, numhl = "" })
end
end
-- inlay hints

View File

@@ -45,8 +45,8 @@ return {
},
cmd = { "TSUpdateSync", "TSUpdate", "TSInstall" },
keys = {
{ "<c-space>", desc = "Increment selection" },
{ "<bs>", desc = "Decrement selection", mode = "x" },
{ "<c-space>", desc = "Increment Selection" },
{ "<bs>", desc = "Decrement Selection", mode = "x" },
},
---@type TSConfig
---@diagnostic disable-next-line: missing-fields

View File

@@ -8,10 +8,11 @@ return {
function()
require("notify").dismiss({ silent = true, pending = true })
end,
desc = "Dismiss all Notifications",
desc = "Dismiss All Notifications",
},
},
opts = {
stages = "static",
timeout = 3000,
max_height = function()
return math.floor(vim.o.lines * 0.75)
@@ -57,15 +58,15 @@ return {
"akinsho/bufferline.nvim",
event = "VeryLazy",
keys = {
{ "<leader>bp", "<Cmd>BufferLineTogglePin<CR>", desc = "Toggle pin" },
{ "<leader>bP", "<Cmd>BufferLineGroupClose ungrouped<CR>", desc = "Delete non-pinned buffers" },
{ "<leader>bo", "<Cmd>BufferLineCloseOthers<CR>", desc = "Delete other buffers" },
{ "<leader>br", "<Cmd>BufferLineCloseRight<CR>", desc = "Delete buffers to the right" },
{ "<leader>bl", "<Cmd>BufferLineCloseLeft<CR>", desc = "Delete buffers to the left" },
{ "<S-h>", "<cmd>BufferLineCyclePrev<cr>", desc = "Prev buffer" },
{ "<S-l>", "<cmd>BufferLineCycleNext<cr>", desc = "Next buffer" },
{ "[b", "<cmd>BufferLineCyclePrev<cr>", desc = "Prev buffer" },
{ "]b", "<cmd>BufferLineCycleNext<cr>", desc = "Next buffer" },
{ "<leader>bp", "<Cmd>BufferLineTogglePin<CR>", desc = "Toggle Pin" },
{ "<leader>bP", "<Cmd>BufferLineGroupClose ungrouped<CR>", desc = "Delete Non-Pinned Buffers" },
{ "<leader>bo", "<Cmd>BufferLineCloseOthers<CR>", desc = "Delete Other Buffers" },
{ "<leader>br", "<Cmd>BufferLineCloseRight<CR>", desc = "Delete Buffers to the Right" },
{ "<leader>bl", "<Cmd>BufferLineCloseLeft<CR>", desc = "Delete Buffers to the Left" },
{ "<S-h>", "<cmd>BufferLineCyclePrev<cr>", desc = "Prev Buffer" },
{ "<S-l>", "<cmd>BufferLineCycleNext<cr>", desc = "Next Buffer" },
{ "[b", "<cmd>BufferLineCyclePrev<cr>", desc = "Prev Buffer" },
{ "]b", "<cmd>BufferLineCycleNext<cr>", desc = "Next Buffer" },
},
opts = {
options = {
@@ -321,8 +322,8 @@ return {
{ "<leader>snh", function() require("noice").cmd("history") end, desc = "Noice History" },
{ "<leader>sna", function() require("noice").cmd("all") end, desc = "Noice All" },
{ "<leader>snd", function() require("noice").cmd("dismiss") end, desc = "Dismiss All" },
{ "<c-f>", function() if not require("noice.lsp").scroll(4) then return "<c-f>" end end, silent = true, expr = true, desc = "Scroll forward", mode = {"i", "n", "s"} },
{ "<c-b>", function() if not require("noice.lsp").scroll(-4) then return "<c-b>" end end, silent = true, expr = true, desc = "Scroll backward", mode = {"i", "n", "s"}},
{ "<c-f>", function() if not require("noice.lsp").scroll(4) then return "<c-f>" end end, silent = true, expr = true, desc = "Scroll Forward", mode = {"i", "n", "s"} },
{ "<c-b>", function() if not require("noice.lsp").scroll(-4) then return "<c-b>" end end, silent = true, expr = true, desc = "Scroll Backward", mode = {"i", "n", "s"}},
},
},
@@ -371,10 +372,10 @@ return {
header = vim.split(logo, "\n"),
-- stylua: ignore
center = {
{ action = LazyVim.telescope("files"), desc = " Find file", icon = "", key = "f" },
{ action = "ene | startinsert", desc = " New file", icon = "", key = "n" },
{ action = "Telescope oldfiles", desc = " Recent files", icon = "", key = "r" },
{ action = "Telescope live_grep", desc = " Find text", icon = "", key = "g" },
{ action = LazyVim.telescope("files"), desc = " Find File", icon = "", key = "f" },
{ action = "ene | startinsert", desc = " New File", icon = "", key = "n" },
{ action = "Telescope oldfiles", desc = " Recent Files", icon = "", key = "r" },
{ action = "Telescope live_grep", desc = " Find Text", icon = "", key = "g" },
{ action = [[lua LazyVim.telescope.config_files()()]], desc = " Config", icon = "", key = "c" },
{ action = 'lua require("persistence").load()', desc = " Restore Session", icon = "", key = "s" },
{ action = "LazyExtras", desc = " Lazy Extras", icon = "", key = "x" },

Some files were not shown because too many files have changed in this diff Show More