Compare commits

..

166 Commits

Author SHA1 Message Date
6ac331b588 chore(main): release 10.8.1 (#2095)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-11-30 20:20:39 +01:00
e229988a98 fix(lsp): inlay hints on stable. See #2007 2023-11-30 20:17:07 +01:00
11a8a6bea7 fix(ui): signcolumn signs on nightly. Fixes #2039 2023-11-30 20:17:07 +01:00
4ebda08d49 chore(build): auto-generate vimdoc 2023-11-30 18:54:19 +00:00
6853b785d9 fix(lsp): detect if using nvim-0.10 and use new inlay_hint.enable method (#2007)
* Detect if using nvim 0.10 and use new inlay_hint.enable method

* Add lsp util for inlay-hints and update keymap

* Remove the need to check vim version

* Support older nightly builds

* Move inlay_hint toggle in Util.toggle

---------

Co-authored-by: Gary Murray <gamurray@fanatics.com>
2023-11-30 19:53:40 +01:00
68ff818a5b chore(main): release 10.8.0 (#1874)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-11-04 11:12:37 +01:00
4312e5e283 feat(catppuccin): enable more integrations (#1922) 2023-11-04 11:09:01 +01:00
db31b4073b chore(build): auto-generate vimdoc 2023-11-04 09:15:11 +00:00
3986169823 fix(spectre): don't build nvim-spectre 2023-11-04 10:14:36 +01:00
e5babf289c chore(build): auto-generate vimdoc 2023-10-28 14:39:26 +00:00
b32b4fd581 fix(extras): dont show extras that give errors (user's extras). Fixes #1895 2023-10-28 16:38:43 +02:00
4b758c40c0 chore(build): auto-generate vimdoc 2023-10-27 16:35:14 +00:00
e01ad513aa fix(sessions): added folds to sessions 2023-10-27 18:34:33 +02:00
7831fc94ca chore(build): auto-generate vimdoc 2023-10-26 05:39:38 +00:00
4558407574 fix(plugin): LazyFile now properly deals with deleted buffers. Fixes #1877 2023-10-26 07:38:53 +02:00
09eafc60ef fix(mini.indentscope): remove duplicated filetype (#1871) 2023-10-25 20:00:01 +02:00
9a6b0f8928 chore(main): release 10.7.1 (#1870)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-10-25 17:52:35 +02:00
f589154268 fix(catppuccin): trouble integration. Fixes #1872 2023-10-25 17:23:37 +02:00
60e5707013 fix(util): pcall deletion of lazy_file augroup. See #1863 2023-10-25 15:54:35 +02:00
028f69c03c chore(main): release 10.7.0 (#1869)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-10-25 15:51:56 +02:00
58ddf405e0 fix(lang): add cmakelint to ensure installed list (#1826)
1. mason/cmakelang install bin/cmake-lint
2. nvim-lint only recognize bin/cmakelint
3. mason/cmakelint install bin/cmakelint
so we need mason/cmakelint installed to using nvim-lint to perform formatting
2023-10-25 15:50:02 +02:00
9e1f835223 feat(nvim): extend j/k enhancements to up/down arrows (#1833) 2023-10-25 15:48:45 +02:00
37953585bb fix(extras.python-semshi): improve highlights (#1845) 2023-10-25 15:47:07 +02:00
61fae7d23f fix: fix jdtls not spwaning in windows (#1864) 2023-10-25 15:46:39 +02:00
6dfeeb8322 chore(main): release 10.6.0 (#1842)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-10-25 15:44:48 +02:00
b651560ad0 perf(markdown): prevent headlines.nvim slowing down initial rendering with nvim README.md 2023-10-25 15:40:57 +02:00
1e1b68d633 fix(treesitter): make treesitter queries available at startup. See #1816 Fixes #1858 2023-10-25 15:40:25 +02:00
eab464d52d fix(markdown): create default numbered Headline groups for colorschemes that dont support them. Fixes #1822 2023-10-25 14:23:44 +02:00
c400cf0014 chore(build): auto-generate vimdoc 2023-10-25 12:06:15 +00:00
a5c9708736 perf(ui): wrap treesitter.foldexpr and cache get_parser during a event loop tick. Fixes #1846 2023-10-25 14:05:32 +02:00
99598ef7c7 feat(telescope): sort buffers with lastused and mru 2023-10-25 14:05:32 +02:00
ef5ec9a3bf style: added trouble ft for the next gen trouble 2023-10-25 14:05:32 +02:00
e7130c8250 chore(build): auto-generate vimdoc 2023-10-22 12:44:41 +00:00
e55ab411b4 fix(mini.hipatterns): use extmark_opts instead of soft deprecated priority (#1841) 2023-10-22 14:44:08 +02:00
fa3170d422 chore(build): auto-generate vimdoc 2023-10-20 11:27:50 +00:00
786a061eaa style(dashboard): remove unnecessary brackets from keys, including extras (#1809)
* style(dashboard): remove unnecessary brackets from keys, including the p key from the project extras

* review Folke

---------

Co-authored-by: abeldekat <abel@nomail.com>
2023-10-20 13:27:10 +02:00
0bb628053b chore(main): release 10.5.0 (#1808)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-10-19 20:16:16 +02:00
e996eed750 chore(main): release 10.5.0 (#1800)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-10-19 20:14:17 +02:00
8df44b3bb5 feat(typescript): added remove unused imports (#1794) 2023-10-19 20:12:48 +02:00
82da2440e4 fix(nvim-ts-autotag): make it actually work :) 2023-10-19 19:54:36 +02:00
fad3777296 fix(tabnine): run :CmpTabnineHub automatically on build (#1788) 2023-10-19 07:54:19 +02:00
ea3155aef6 fix(conform): allow overriding all conform format options. Fixes #1790 2023-10-19 07:52:47 +02:00
98b51a608c style(dashboard): make layout exactly the same as before 2023-10-19 07:52:47 +02:00
0ac8f6fb3b fix(treesitter-context): set default max_lines=3 2023-10-19 07:52:47 +02:00
b8c7e70c80 chore(build): auto-generate vimdoc 2023-10-19 05:45:44 +00:00
d73aee4a93 feat(dashboard): remove unnecessary brackets from keys (#1791) 2023-10-19 07:45:03 +02:00
ae77bfda89 chore(main): release 10.4.4 (#1786)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-10-18 13:11:54 +02:00
5c8cefaf40 chore(build): auto-generate vimdoc 2023-10-18 09:39:39 +00:00
7d8b3e8ef9 fix(project): don't let project.nvim change the cwd. Leads to too much confusion 2023-10-18 11:38:57 +02:00
0e12b00743 chore(main): release 10.4.3 (#1771)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-10-18 00:06:46 +02:00
2e308d5440 fix(neotest): better integration with trouble: no longer steals focus and hides when all ok 2023-10-18 00:04:28 +02:00
5c1656729a fix(dashboard): config shortcut when opening dashboard again. Fixes #1768 2023-10-17 18:28:06 +02:00
ian
1d4fbd3b2e fix(keymaps): let keymap n and N opens folds (#1298)
It's strange that mappings to n and N do not open folds like its original behavior, so I append `zv` to manually open folds.
2023-10-17 18:03:34 +02:00
b0ded5c015 fix(dot): treesitter langs in dot extra were not added 2023-10-17 16:33:55 +02:00
c711309a67 chore(main): release 10.4.2 (#1765)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-10-17 10:04:24 +02:00
af3ca06472 docs: fixed conform examples 2023-10-17 08:42:20 +02:00
4da4583b4a chore(build): auto-generate vimdoc 2023-10-17 06:29:04 +00:00
315df373f2 fix(statuscolumn): correct line numbers & respect more options 2023-10-17 08:28:23 +02:00
42ba1af40f chore(main): release 10.4.1 (#1757)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-10-16 23:09:17 +02:00
ff64cc5399 fix(format): set formatexpr in options so users can override it. Fixes #1759 2023-10-16 23:01:18 +02:00
fef0b3f756 fix(ui): fix BufferLineClose commands (#1756)
BufferLine has capital letter l
2023-10-16 17:19:52 +02:00
5926cda069 chore(main): release 10.4.0 (#1747)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-10-16 15:37:38 +02:00
3dbeda9d96 fix(markdown): add marksman to mason install 2023-10-16 12:44:41 +02:00
98db7ec0d2 perf(root): cache root detection. Fixes #1753 2023-10-16 12:42:54 +02:00
db175ef3f6 chore(build): auto-generate vimdoc 2023-10-16 08:42:32 +00:00
f513e1cede ci: LazyVim now requires Neovim >= 0.9.0 (#1751) 2023-10-16 10:41:54 +02:00
9517e64009 fix(root): root dir for windows. Fixes #1749 2023-10-16 08:35:35 +02:00
152e1c6692 feat(markdown): added headlines.nvim to markdown extra 2023-10-16 08:36:27 +02:00
982c8e301b fix(conform): remove LazyVim's conform config changes since that's now merged in conform 2023-10-16 08:11:15 +02:00
5c4f881158 style(keymaps): no need to check for trouble to set [q, ]q 2023-10-16 07:44:20 +02:00
8c726cd166 feat(lualine): use gitsigns for diff source (#1744)
Co-authored-by: edshamis <pc>
2023-10-16 07:44:10 +02:00
c3daced11c feat(ui): add keymap to close other buffers (#1743)
* feat(ui): add keymap to close other buffers

* refactor

---------

Co-authored-by: Folke Lemaitre <folke.lemaitre@gmail.com>
2023-10-16 07:35:57 +02:00
66482927cb chore(build): auto-generate vimdoc 2023-10-16 05:30:47 +00:00
be5eea476c feat(keymaps): added toggle for treesitter highlights 2023-10-16 07:30:06 +02:00
e26a127185 chore(main): release 10.3.0 (#1733)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-10-15 22:51:01 +02:00
c8e5501ee5 feat(tabnine): add build cmd for Windows (#1737)
* feat(tabnine): add build cmd for Windows

* fix(prettier): use prettier instead of prettierd. Too many people get truncated files. Fixes #712. See #1735

* feat: disable kind_filter for markdown and help

* feat(lualine): pretty_path now highlights file basename when modified

* fix(root): dont use single-file lsps for root detection. use workspaces only

* feat(lualine): new root dir component that only shows when cwd != root_dir

* refactor

---------

Co-authored-by: edshamis <pc>
Co-authored-by: Folke Lemaitre <folke.lemaitre@gmail.com>
2023-10-15 22:42:38 +02:00
dfdfcad1aa feat(lualine): new root dir component that only shows when cwd != root_dir 2023-10-15 22:38:44 +02:00
6f88b8b36f fix(root): dont use single-file lsps for root detection. use workspaces only 2023-10-15 22:38:15 +02:00
8af7309c7e feat(lualine): pretty_path now highlights file basename when modified 2023-10-15 22:37:49 +02:00
782fe0bef0 feat: disable kind_filter for markdown and help 2023-10-15 22:34:42 +02:00
57b504b9e8 fix(prettier): use prettier instead of prettierd. Too many people get truncated files. Fixes #712. See #1735 2023-10-15 22:28:56 +02:00
53e1637a86 feat(dashboard): c on dahboard now opens telescope for config dir instead of useless init.lua 2023-10-15 09:16:52 +02:00
7c60431c58 fix(python): add ft to Python keymaps, and fix "Markdown Preview" toggle description (#1729)
* feat(python): add `ft` to keymaps

* fix(markdown): fix toggle keymap description
2023-10-15 07:21:17 +02:00
5ea0dd716a chore(build): auto-generate vimdoc 2023-10-15 05:18:51 +00:00
6e0e352fea feat(linting): ability to configure global and fallback linters (#1727)
* feat(linting): ability to configure global and fallback linters

* fix: use nvim-lint's logic to get linters

---------

Co-authored-by: Folke Lemaitre <folke.lemaitre@gmail.com>
2023-10-15 07:18:00 +02:00
f29543f2c9 chore(main): release 10.2.0 (#1696)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-10-14 18:30:55 +02:00
95ff5aaa62 feat(extras): added TabNine (#1651)
* feat: add Tabnine

Add TabNine plugin for hrsh7th/nvim-cmp

* fix: limit to top 3 sources for TabNine

* feat: show Tabnine icon on suggestion list

* fix: migrate to LazyVim v10

* refactor: tabnine

* refactor

---------

Co-authored-by: Folke Lemaitre <folke.lemaitre@gmail.com>
2023-10-14 18:25:06 +02:00
1a4342abae refactor: move cmp status lualine component to util 2023-10-14 18:02:47 +02:00
8f42733ce5 feat(python): add key binding for organize imports (#1670) 2023-10-14 17:49:23 +02:00
b3d46bc014 feat(lang): add markdown support (#1718)
* feat(lang): add markdown support

* feat: use peek.nvim instead of markdown-preview. Disable and show warning when deno is not installed

* feat: add markdown-preview back

---------

Co-authored-by: Folke Lemaitre <folke.lemaitre@gmail.com>
2023-10-14 17:42:02 +02:00
121df70604 Revert "fix: dont lazy-load on ft. Load on cmd or keys only"
This reverts commit 3a93757bb1ee28c3e1b59c6c47ea5c4e74d8f1b2.
2023-10-14 17:35:13 +02:00
3a93757bb1 fix: dont lazy-load on ft. Load on cmd or keys only 2023-10-14 17:32:06 +02:00
6b9ee963e2 fix(news): dont show news when it has never been viewed (new install) 2023-10-14 16:56:48 +02:00
5b89bc8cbf fix(lsp): trigger FileType commands after installing LSP servers 2023-10-14 16:56:18 +02:00
5e1a86d3b2 feat(toggle): add keymap to toggle treesitter context (#1711)
* feat: add keymap to toggle treesitter context

* fix: get correct enabled state

---------

Co-authored-by: Folke Lemaitre <folke.lemaitre@gmail.com>
2023-10-14 14:40:25 +02:00
f724eae2e3 chore(build): auto-generate vimdoc 2023-10-14 11:22:06 +00:00
ff9bf005b6 fix(dashboard-nvim): repository has moved to nvimdev/dashboard-nvim (#1715)
* fix(dashboard-nvim) repository has moved to nvimdev/dashboard-nvim

* fix(dashboard): automatically rename dashboard.nvim

---------

Co-authored-by: Folke Lemaitre <folke.lemaitre@gmail.com>
2023-10-14 13:21:30 +02:00
7fe68d9f05 fix(spectre): add title to Spectre panel in edgy (#1703) 2023-10-13 19:17:50 +02:00
b6e68fa2bf feat(conform): show error when user overwrites conform config function 2023-10-13 18:20:41 +02:00
3eb91c64b5 feat(conform): make it easier to add extra_args 2023-10-13 18:03:40 +02:00
873ff89284 fix(keymaps): no diagnostic keymaps w/o lsp attached (#1698) 2023-10-13 16:53:55 +02:00
385c99dbb7 feat(go): add gofumpt formatter with conform/none-ls (#1683)
* feat(go): only install required packages

* fix: add gofumpt formatter using conform/none-ls

* fix: add mason.nvim as dependency of none-ls
2023-10-13 12:43:51 +02:00
c7244d9d47 style(dot): make enabled a function for doc gen 2023-10-13 12:31:32 +02:00
6fd66f486e feat(conform): use conform.nvim opts.format options for formatting with conform 2023-10-13 12:21:38 +02:00
3f1bf70b14 refactor(util.lsp): easier lsp client filters 2023-10-13 12:20:55 +02:00
4584410e76 feat(format): use conform as lsp formatter since it has better format diffs 2023-10-13 09:45:35 +02:00
ea4174d460 chore(main): release 10.1.1 (#1694)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-10-13 07:39:24 +02:00
1b1d9a16ee docs: typos fixed in CHANGELOG.md (#1693) 2023-10-13 07:37:07 +02:00
66f0d55beb chore(build): auto-generate vimdoc 2023-10-13 05:36:45 +00:00
01dbd07073 fix(json): always write version to prevent spurious migrations. Fixes #1692 2023-10-13 07:36:02 +02:00
bd1928ba59 fix(aerial): use new sep_icon option for aerial lualine component 2023-10-13 07:36:02 +02:00
1e79248786 chore(main): release 10.1.0 (#1686)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-10-12 21:56:56 +02:00
b31d71da9d feat(neot-ree): add keymaps to toggle git & buffer (#1339) 2023-10-12 21:52:19 +02:00
1bcf6b9a28 feat(extras): LazyExtras can now manage user extras lua/plugins/extras. Fixes #1681 2023-10-12 21:47:31 +02:00
c9892652d2 feat(config): lazyvim.json is now versioned and migrates to a newer version when needed 2023-10-12 21:45:32 +02:00
8e71968c2b fix(nvim-lint): make sure to set custom linters. Fixes #1687 2023-10-12 20:43:11 +02:00
cdae38ddd4 fix(nvim-lint): check on linter name instead of linter. Fixes #1685 2023-10-12 20:28:58 +02:00
666a69e6e0 chore(main): release 10.0.1 (#1680)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-10-12 18:07:04 +02:00
7c7b4be8db fix(toggle): dont show incorrect deprecation warning for toggle. Fixes #1679 2023-10-12 17:59:48 +02:00
2a0b7a88ba fix(config): make lazyvim.json idempotent, pretty-printed and remove full paths 2023-10-12 17:48:52 +02:00
7d9a395565 style(format): Fix typo (#1675) 2023-10-12 15:10:26 +02:00
763c0fd9f2 chore(main): release 10.0.0 (#1673)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-10-12 14:49:38 +02:00
73acab1675 feat: added NEWS.md and option to automatically show when changed (enabled by default) 2023-10-12 14:38:25 +02:00
442077fca3 chore(build): auto-generate vimdoc 2023-10-12 09:48:46 +00:00
ce74e28464 feat(starter): added Lazy Extras to mini.starter 2023-10-12 11:48:02 +02:00
b4ba5d881d feat(extras): added extra for symbols-outline.nvim 2023-10-12 11:48:02 +02:00
f64039f546 feat(config): better kind filter default for lua to deal with luals weirdness 2023-10-12 11:48:02 +02:00
a4e393154f fix(extras): make sure we use priorities to import extras in correct order 2023-10-12 11:48:02 +02:00
3256abda65 fix(plugin): show warning of removed core plugin when trying to load them without having the extra 2023-10-12 11:48:02 +02:00
db5d28b039 fix(plugin): add nvim-treesitter-context rename warning 2023-10-12 11:48:02 +02:00
72f3cc684b fix(dap): copy config before overriding args 2023-10-12 11:48:02 +02:00
ba4b8dfecb refactor(nlua): cleanup 2023-10-12 11:48:02 +02:00
14f3f036e9 feat(inject): util method to get upvalue 2023-10-12 11:48:02 +02:00
85215f396b fix(nlua): make nlua dap work with regular continue. Fixes #1666 2023-10-12 11:48:02 +02:00
c7720275c3 fix(aerial): keymap 2023-10-12 11:48:02 +02:00
1c34af7f01 feat(mini.starter): adding mini.starter to lualine disabled files (#1667) 2023-10-12 11:48:02 +02:00
eedb4a3405 feat(ui): show optional plugins in a different color 2023-10-12 11:48:02 +02:00
b43c57d943 feat: added aerial extra with integrations for edgy, telescope and lualine 2023-10-12 11:48:02 +02:00
7b2c317407 feat(treesitter): add nvim-treesitter-context by default 2023-10-12 11:48:02 +02:00
13dbe4ad55 perf(lualine): get rid of lualine's weird lualine_require 2023-10-12 11:48:02 +02:00
eb7a7d7a8e feat(config): make kind filter configurable for telescope/aerial/... 2023-10-12 11:48:02 +02:00
cb7f5aca7a feat(treesitter): install nvim-ts-autotag by default 2023-10-12 11:48:02 +02:00
d8250910bd style(config): mini.align icons 2023-10-12 11:48:02 +02:00
e239235cd3 feat(util): inject module 2023-10-12 11:48:02 +02:00
8d7361c460 feat(root): cached pretty path function for statuslines 2023-10-12 11:48:02 +02:00
305e82f2ca feat(navic): moved navic to extras 2023-10-12 11:48:02 +02:00
592f3b03bb fix(root): only use workspace folders that contain the buffer 2023-10-12 11:48:02 +02:00
5bb74205a0 feat(dashboard): added LazyExtras shortcut to dashboard/alpha 2023-10-12 11:48:02 +02:00
c4e55e4d67 feat(ui): added :LazyExtras to manage enabled extras in LazyVim 2023-10-12 11:48:02 +02:00
11d66e7134 feat(config): load/save some data in lazyvim.json 2023-10-12 11:48:02 +02:00
7fb79486ed fix(notify): set default zindex=100 2023-10-12 11:48:02 +02:00
54fa9ce584 ci: let release-please manage the version in the config file 2023-10-12 11:48:02 +02:00
8fbde2c366 fix(neo-tree): during init check global argslist instead of window-local 2023-10-12 11:48:02 +02:00
4ea1c6865e feat(config): use lazy's new custom events (Event.mappings) for a better LazyFile 2023-10-12 11:48:02 +02:00
83734675b0 fix(lualine): when opening nvim with a file, show an empty statusline till lualine loads 2023-10-12 11:48:02 +02:00
a4abbdc89b fix(format): always show formatter status even when no sources available 2023-10-12 11:48:02 +02:00
c33e7489ec feat(root): allow custom functions as part of vim.g.root_spec 2023-10-12 11:48:02 +02:00
f59cdff4d9 fix(plugin): enable lazy_file 2023-10-12 11:48:02 +02:00
a2d604928b feat(root): customizable root detection and :LazyRoot command 2023-10-12 11:48:02 +02:00
e6d294df6f fix(ui): dont show left signs on virtual line numbers (wrap). Fixes #1654 2023-10-12 11:48:02 +02:00
4cbe42cd24 feat(starter)!: dashboard.nvim is now the default starter. To keep using alpha.nvim, enable the extra. 2023-10-12 11:48:02 +02:00
14c091b1fc feat!: make conform.nvim and nvim-lint the default formatters/linters 2023-10-12 11:48:02 +02:00
70f91956e7 perf(plugin): move all lazy.nvim related code to lazyvim.util.plugin 2023-10-12 11:48:02 +02:00
f1a8f24a36 feat(format): new LazyVim formatter with integrations for lsp/none-ls/conform/eslint/... 2023-10-12 11:48:02 +02:00
c8c929c9fd perf(util): split lazyvim.util in smaller separate modules 2023-10-12 11:48:02 +02:00
5f5acb5b88 Revert "fix(config): disable LazyFile till v10.0"
This reverts commit ee7a401388f2933729afcd7090fb8e69631b912f.
2023-10-12 11:48:02 +02:00
67 changed files with 3250 additions and 1107 deletions

View File

@ -36,7 +36,7 @@ jobs:
uses: kdheepak/panvimdoc@main
with:
vimdoc: LazyVim
version: "Neovim >= 0.8.0"
version: "Neovim >= 0.9.0"
demojify: true
treesitter: true
- name: Push changes
@ -59,6 +59,8 @@ jobs:
with:
release-type: simple
package-name: LazyVim
extra-files: |
lua/lazyvim/config/init.lua
- uses: actions/checkout@v3
- name: tag stable versions
if: ${{ steps.release.outputs.release_created }}

File diff suppressed because it is too large Load Diff

68
NEWS.md Normal file
View File

@ -0,0 +1,68 @@
# What's new?
## 10.x
- User extras under `lua/plugins/extras` can now also be managed
with **LazyExtras**
- `nvim-ts-autotag` is now included by default
- `nvim-treesitter-context` is now included by default
- Added extra for `symbols-outline.nvim`
- Added extra for `aerial.nvim`
- `nvim-navic` has been removed. If you want to keep using `nvim-navic`,
you can enable the **editor.navic** extra
- New `:LazyExtras` command for managing **LazyVim** extras
- Improved **formatting**:
- **LazyVim** can now work with multiple formatters. Types:
- **primary**: only one primary formatter can be active at a time.
_(conform, none-ls, LSP)_
- **secondary**: multiple secondary formatters can be active _(eslint, ...)_
- **LazyVim** automatically selects the primary formatter based on the
current available sources and priorities.
- New `:LazyFormat` command for formatting the current selection or buffer
- New `:LazyFormatInfo` command for displaying the active formatters
for the current buffer
- Auto-formatting can be disabled with:
```lua
vim.g.autoformat = false -- globally
vim.b.autoformat = false -- buffer-local
```
- `none-ls.nvim` is no longer installed by default
- `conform.nvim` is now the default formatter
- `nvim-lint` is now the default linter
- If you want to keep using `none-ls.nvim`,
you can enable the **lsp.none-ls** extra
- `dashboard.nvim` is the new default dashboard plugin
- If you want to keep using `alpha.nvim`, you can enable the **ui.alpha** extra
- Improved **root detection**:
- New `:LazyRoot` command that shows info about the root dir detection
- Configurable with `vim.g.root_spec`
```lua
-- LazyVim root dir detection
-- Each entry can be:
-- * the name of a detector function like `lsp` or `cwd`
-- * a pattern or array of patterns like `.git` or `lua`.
-- * a function with signature `function(buf) -> string|string[]`
vim.g.root_spec = { "lsp", { ".git", "lua" }, "cwd" }
-- To disable root detection set to just "cwd"
vim.g.root_spec = { "cwd" }
```

View File

@ -1,4 +1,4 @@
*LazyVim.txt* For Neovim >= 0.8.0 Last change: 2023 October 11
*LazyVim.txt* For Neovim >= 0.9.0 Last change: 2023 November 30
==============================================================================
Table of Contents *LazyVim-table-of-contents*

File diff suppressed because it is too large Load Diff

View File

@ -7,7 +7,9 @@ local map = Util.safe_keymap_set
-- better up/down
map({ "n", "x" }, "j", "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true })
map({ "n", "x" }, "<Down>", "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true })
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 })
@ -30,17 +32,10 @@ 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
if Util.has("bufferline.nvim") then
map("n", "<S-h>", "<cmd>BufferLineCyclePrev<cr>", { desc = "Prev buffer" })
map("n", "<S-l>", "<cmd>BufferLineCycleNext<cr>", { desc = "Next buffer" })
map("n", "[b", "<cmd>BufferLineCyclePrev<cr>", { desc = "Prev buffer" })
map("n", "]b", "<cmd>BufferLineCycleNext<cr>", { desc = "Next buffer" })
else
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" })
end
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" })
@ -57,10 +52,10 @@ map(
)
-- https://github.com/mhinz/vim-galore#saner-behavior-of-n-and-n
map("n", "n", "'Nn'[v:searchforward]", { expr = true, desc = "Next 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]", { expr = true, desc = "Prev 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" })
@ -88,34 +83,50 @@ 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" })
if not Util.has("trouble.nvim") then
map("n", "[q", vim.cmd.cprev, { desc = "Previous quickfix" })
map("n", "]q", vim.cmd.cnext, { desc = "Next quickfix" })
end
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()
require("lazyvim.plugins.lsp.format").format({ force = true })
Util.format({ force = true })
end, { desc = "Format" })
-- diagnostic
local diagnostic_goto = function(next, severity)
local go = next and vim.diagnostic.goto_next or vim.diagnostic.goto_prev
severity = severity and vim.diagnostic.severity[severity] or nil
return function()
go({ severity = severity })
end
end
map("n", "<leader>cd", vim.diagnostic.open_float, { desc = "Line Diagnostics" })
map("n", "]d", diagnostic_goto(true), { desc = "Next Diagnostic" })
map("n", "[d", diagnostic_goto(false), { desc = "Prev Diagnostic" })
map("n", "]e", diagnostic_goto(true, "ERROR"), { desc = "Next Error" })
map("n", "[e", diagnostic_goto(false, "ERROR"), { desc = "Prev Error" })
map("n", "]w", diagnostic_goto(true, "WARN"), { desc = "Next Warning" })
map("n", "[w", diagnostic_goto(false, "WARN"), { desc = "Prev Warning" })
-- stylua: ignore start
-- toggle options
map("n", "<leader>uf", require("lazyvim.plugins.lsp.format").toggle, { desc = "Toggle format on Save" })
map("n", "<leader>uf", function() Util.format.toggle() end, { desc = "Toggle auto format (global)" })
map("n", "<leader>uF", function() Util.format.toggle(true) end, { desc = "Toggle auto format (buffer)" })
map("n", "<leader>us", function() Util.toggle("spell") end, { desc = "Toggle Spelling" })
map("n", "<leader>uw", function() Util.toggle("wrap") end, { desc = "Toggle Word Wrap" })
map("n", "<leader>uL", function() Util.toggle("relativenumber") end, { desc = "Toggle Relative Line Numbers" })
map("n", "<leader>ul", function() Util.toggle_number() end, { desc = "Toggle Line Numbers" })
map("n", "<leader>ud", Util.toggle_diagnostics, { desc = "Toggle Diagnostics" })
map("n", "<leader>ul", function() Util.toggle.number() end, { desc = "Toggle Line Numbers" })
map("n", "<leader>ud", function() Util.toggle.diagnostics() end, { desc = "Toggle Diagnostics" })
local conceallevel = vim.o.conceallevel > 0 and vim.o.conceallevel or 3
map("n", "<leader>uc", function() Util.toggle("conceallevel", false, {0, conceallevel}) end, { desc = "Toggle Conceal" })
if vim.lsp.inlay_hint then
map("n", "<leader>uh", function() vim.lsp.inlay_hint(0, nil) end, { desc = "Toggle Inlay Hints" })
if vim.lsp.buf.inlay_hint or vim.lsp.inlay_hint then
map( "n", "<leader>uh", function() Util.toggle.inlay_hints() end, { desc = "Toggle Inlay Hints" })
end
map("n", "<leader>uT", function() if vim.b.ts_highlight then vim.treesitter.stop() else vim.treesitter.start() end end, { desc = "Toggle Treesitter Highlight" })
-- lazygit
map("n", "<leader>gg", function() Util.float_term({ "lazygit" }, { cwd = Util.get_root(), esc_esc = false, ctrl_hjkl = false }) end, { desc = "Lazygit (root dir)" })
map("n", "<leader>gG", function() Util.float_term({ "lazygit" }, {esc_esc = false, ctrl_hjkl = false}) end, { desc = "Lazygit (cwd)" })
map("n", "<leader>gg", function() Util.terminal({ "lazygit" }, { cwd = Util.root(), esc_esc = false, ctrl_hjkl = false }) end, { desc = "Lazygit (root dir)" })
map("n", "<leader>gG", function() Util.terminal({ "lazygit" }, {esc_esc = false, ctrl_hjkl = false}) end, { desc = "Lazygit (cwd)" })
-- quit
map("n", "<leader>qq", "<cmd>qa<cr>", { desc = "Quit all" })
@ -124,12 +135,12 @@ map("n", "<leader>qq", "<cmd>qa<cr>", { desc = "Quit all" })
map("n", "<leader>ui", vim.show_pos, { desc = "Inspect Pos" })
-- LazyVim Changelog
map("n", "<leader>L", Util.changelog, {desc = "LazyVim Changelog"})
map("n", "<leader>L", function() Util.news.changelog() end, { desc = "LazyVim Changelog" })
-- floating terminal
local lazyterm = function() Util.float_term(nil, { cwd = Util.get_root() }) end
local lazyterm = function() Util.terminal(nil, { cwd = Util.root() }) end
map("n", "<leader>ft", lazyterm, { desc = "Terminal (root dir)" })
map("n", "<leader>fT", function() Util.float_term() end, { desc = "Terminal (cwd)" })
map("n", "<leader>fT", function() Util.terminal() end, { desc = "Terminal (cwd)" })
map("n", "<c-/>", lazyterm, { desc = "Terminal (root dir)" })
map("n", "<c-_>", lazyterm, { desc = "which_key_ignore" })

View File

@ -2,6 +2,16 @@
vim.g.mapleader = " "
vim.g.maplocalleader = "\\"
-- Enable LazyVim auto format
vim.g.autoformat = true
-- LazyVim root dir detection
-- Each entry can be:
-- * the name of a detector function like `lsp` or `cwd`
-- * a pattern or array of patterns like `.git` or `lua`.
-- * a function with signature `function(buf) -> string|string[]`
vim.g.root_spec = { "lsp", { ".git", "lua" }, "cwd" }
local opt = vim.opt
opt.autowrite = true -- Enable auto write
@ -24,7 +34,7 @@ opt.pumblend = 10 -- Popup blend
opt.pumheight = 10 -- Maximum number of entries in a popup
opt.relativenumber = true -- Relative line numbers
opt.scrolloff = 4 -- Lines of context
opt.sessionoptions = { "buffers", "curdir", "tabpages", "winsize", "help", "globals", "skiprtp" }
opt.sessionoptions = { "buffers", "curdir", "tabpages", "winsize", "help", "globals", "skiprtp", "folds" }
opt.shiftround = true -- Round indent
opt.shiftwidth = 2 -- Size of an indent
opt.shortmess:append({ W = true, I = true, c = true, C = true })
@ -63,19 +73,21 @@ end
-- Folding
vim.opt.foldlevel = 99
vim.opt.foldtext = "v:lua.require'lazyvim.util.ui'.foldtext()"
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.statuscolumn = [[%!v:lua.require'lazyvim.util'.ui.statuscolumn()]]
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.vim.treesitter.foldexpr()"
vim.opt.foldexpr = "v:lua.require'lazyvim.util'.ui.foldexpr()"
else
vim.opt.foldmethod = "indent"
end
vim.o.formatexpr = "v:lua.require'lazyvim.util'.format.formatexpr()"
-- Fix markdown indentation settings
vim.g.markdown_recommended_style = 0

View File

@ -14,14 +14,19 @@ return {
name = "catppuccin",
opts = {
integrations = {
aerial = true,
alpha = true,
cmp = true,
dashboard = true,
flash = true,
gitsigns = true,
headlines = true,
illuminate = true,
indent_blankline = { enabled = true },
leap = true,
lsp_trouble = true,
mason = true,
markdown = true,
mini = true,
native_lsp = {
enabled = true,
@ -34,12 +39,13 @@ return {
},
navic = { enabled = true, custom_bg = "lualine" },
neotest = true,
neotree = true,
noice = true,
notify = true,
neotree = true,
semantic_tokens = true,
telescope = true,
treesitter = true,
treesitter_context = true,
which_key = true,
},
},

View File

@ -11,7 +11,7 @@ return {
{
"<leader>fe",
function()
require("neo-tree.command").execute({ toggle = true, dir = require("lazyvim.util").get_root() })
require("neo-tree.command").execute({ toggle = true, dir = Util.root() })
end,
desc = "Explorer NeoTree (root dir)",
},
@ -24,12 +24,26 @@ return {
},
{ "<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",
},
{
"<leader>be",
function()
require("neo-tree.command").execute({ source = "buffers", toggle = true })
end,
desc = "Buffer explorer",
},
},
deactivate = function()
vim.cmd([[Neotree close]])
end,
init = function()
if vim.fn.argc() == 1 then
if vim.fn.argc(-1) == 1 then
local stat = vim.loop.fs_stat(vim.fn.argv(0))
if stat and stat.type == "directory" then
require("neo-tree")
@ -38,7 +52,7 @@ return {
end,
opts = {
sources = { "filesystem", "buffers", "git_status", "document_symbols" },
open_files_do_not_replace_types = { "terminal", "Trouble", "qf", "Outline" },
open_files_do_not_replace_types = { "terminal", "Trouble", "trouble", "qf", "Outline" },
filesystem = {
bind_to_cwd = false,
follow_current_file = { enabled = true },
@ -60,7 +74,7 @@ return {
},
config = function(_, opts)
local function on_move(data)
Util.on_rename(data.source, data.destination)
Util.lsp.on_rename(data.source, data.destination)
end
local events = require("neo-tree.events")
@ -84,6 +98,7 @@ return {
-- search/replace in multiple files
{
"nvim-pack/nvim-spectre",
build = false,
cmd = "Spectre",
opts = { open_cmd = "noswapfile vnew" },
-- stylua: ignore
@ -113,12 +128,17 @@ return {
},
},
keys = {
{ "<leader>,", "<cmd>Telescope buffers show_all_buffers=true<cr>", desc = "Switch Buffer" },
{
"<leader>,",
"<cmd>Telescope buffers sort_mru=true sort_lastused=true<cr>",
desc = "Switch Buffer",
},
{ "<leader>/", Util.telescope("live_grep"), desc = "Grep (root dir)" },
{ "<leader>:", "<cmd>Telescope command_history<cr>", desc = "Command History" },
{ "<leader><space>", Util.telescope("files"), desc = "Find Files (root dir)" },
-- find
{ "<leader>fb", "<cmd>Telescope buffers<cr>", desc = "Buffers" },
{ "<leader>fb", "<cmd>Telescope buffers sort_mru=true sort_lastused=true<cr>", desc = "Buffers" },
{ "<leader>fc", Util.telescope.config_files(), desc = "Find Config File" },
{ "<leader>ff", Util.telescope("files"), desc = "Find Files (root dir)" },
{ "<leader>fF", Util.telescope("files", { cwd = false }), desc = "Find Files (cwd)" },
{ "<leader>fr", "<cmd>Telescope oldfiles<cr>", desc = "Recent" },
@ -150,42 +170,20 @@ return {
{ "<leader>uC", Util.telescope("colorscheme", { enable_preview = true }), desc = "Colorscheme with preview" },
{
"<leader>ss",
Util.telescope("lsp_document_symbols", {
symbols = {
"Class",
"Function",
"Method",
"Constructor",
"Interface",
"Module",
"Struct",
"Trait",
"Field",
"Property",
"Enum",
"Constant",
},
}),
function()
require("telescope.builtin").lsp_document_symbols({
symbols = require("lazyvim.config").get_kind_filter(),
})
end,
desc = "Goto Symbol",
},
{
"<leader>sS",
Util.telescope("lsp_dynamic_workspace_symbols", {
symbols = {
"Class",
"Function",
"Method",
"Constructor",
"Interface",
"Module",
"Struct",
"Trait",
"Field",
"Property",
"Enum",
"Constant",
},
}),
function()
require("telescope.builtin").lsp_dynamic_workspace_symbols({
symbols = require("lazyvim.config").get_kind_filter(),
})
end,
desc = "Goto Symbol (Workspace)",
},
},
@ -270,7 +268,7 @@ return {
"nvim-telescope/telescope.nvim",
optional = true,
opts = function(_, opts)
if not require("lazyvim.util").has("flash.nvim") then
if not Util.has("flash.nvim") then
return
end
local function flash(prompt_bufnr)

View File

@ -27,43 +27,7 @@ return {
optional = true,
event = "VeryLazy",
opts = function(_, opts)
local started = false
local function status()
if not package.loaded["cmp"] then
return
end
for _, s in ipairs(require("cmp").core.sources) do
if s.name == "codeium" then
if s.source:is_available() then
started = true
else
return started and "error" or nil
end
if s.status == s.SourceStatus.FETCHING then
return "pending"
end
return "ok"
end
end
end
local Util = require("lazyvim.util")
local colors = {
ok = Util.fg("Special"),
error = Util.fg("DiagnosticError"),
pending = Util.fg("DiagnosticWarn"),
}
table.insert(opts.sections.lualine_x, 2, {
function()
return require("lazyvim.config").icons.kinds.Codeium
end,
cond = function()
return status() ~= nil
end,
color = function()
return colors[status()] or colors.ok
end,
})
table.insert(opts.sections.lualine_x, 2, require("lazyvim.util").lualine.cmp_source("codeium"))
end,
},
}

View File

@ -21,10 +21,10 @@ return {
opts = function(_, opts)
local Util = require("lazyvim.util")
local colors = {
[""] = Util.fg("Special"),
["Normal"] = Util.fg("Special"),
["Warning"] = Util.fg("DiagnosticError"),
["InProgress"] = Util.fg("DiagnosticWarn"),
[""] = Util.ui.fg("Special"),
["Normal"] = Util.ui.fg("Special"),
["Warning"] = Util.ui.fg("DiagnosticError"),
["InProgress"] = Util.ui.fg("DiagnosticWarn"),
}
table.insert(opts.sections.lualine_x, 2, {
function()
@ -36,7 +36,7 @@ return {
if not package.loaded["copilot"] then
return
end
local ok, clients = pcall(require("lazyvim.util").get_clients, { name = "copilot", bufnr = 0 })
local ok, clients = pcall(require("lazyvim.util").lsp.get_clients, { name = "copilot", bufnr = 0 })
if not ok then
return false
end
@ -66,7 +66,7 @@ return {
copilot_cmp.setup(opts)
-- attach cmp source whenever copilot attaches
-- fixes lazy-loading issues with the copilot cmp source
require("lazyvim.util").on_attach(function(client)
require("lazyvim.util").lsp.on_attach(function(client)
if client.name == "copilot" then
copilot_cmp._on_insert_enter({})
end

View File

@ -0,0 +1,51 @@
local Util = require("lazyvim.util")
return {
-- Tabnine cmp source
{
"nvim-cmp",
dependencies = {
{
"tzachar/cmp-tabnine",
build = {
Util.is_win() and "pwsh -noni .\\install.ps1" or "./install.sh",
":CmpTabnineHub",
},
dependencies = "hrsh7th/nvim-cmp",
opts = {
max_lines = 1000,
max_num_results = 3,
sort = true,
},
config = function(_, opts)
require("cmp_tabnine.config"):setup(opts)
end,
},
},
---@param opts cmp.ConfigSchema
opts = function(_, opts)
table.insert(opts.sources, 1, {
name = "cmp_tabnine",
group_index = 1,
priority = 100,
})
opts.formatting.format = Util.inject.args(opts.formatting.format, function(entry, item)
-- Hide percentage in the menu
if entry.source.name == "cmp_tabnine" then
item.menu = ""
end
end)
end,
},
-- Show TabNine status in lualine
{
"nvim-lualine/lualine.nvim",
optional = true,
event = "VeryLazy",
opts = function(_, opts)
local icon = require("lazyvim.config").icons.kinds.TabNine
table.insert(opts.sections.lualine_x, 2, require("lazyvim.util").lualine.cmp_source("cmp_tabnine", icon))
end,
},
}

View File

@ -1,6 +1,7 @@
---@param config {args?:string[]|fun():string[]?}
local function get_args(config)
local args = type(config.args) == "function" and (config.args() or {}) or config.args or {}
config = vim.deepcopy(config)
---@cast args string[]
config.args = function()
local new_args = vim.fn.input("Run with args: ", table.concat(args, " ")) --[[@as string]]
@ -54,7 +55,6 @@ return {
opts = {
defaults = {
["<leader>d"] = { name = "+debug" },
["<leader>da"] = { name = "+adapters" },
},
},
},

View File

@ -1,24 +1,40 @@
return {
"mfussenegger/nvim-dap",
dependencies = {
{
"jbyuki/one-small-step-for-vimkind",
-- stylua: ignore
keys = {
{ "<leader>daL", function() require("osv").launch({ port = 8086 }) end, desc = "Adapter Lua Server", ft = "lua" },
{ "<leader>dal", function() require("osv").run_this() end, desc = "Adapter Lua", ft = "lua" },
},
config = function()
local dap = require("dap")
dap.adapters.nlua = function(callback, config)
callback({ type = "server", host = config.host or "127.0.0.1", port = config.port or 8086 })
dap.adapters.nlua = function(callback, conf)
local adapter = {
type = "server",
host = conf.host or "127.0.0.1",
port = conf.port or 8086,
}
if conf.start_neovim then
local dap_run = dap.run
dap.run = function(c)
adapter.port = c.port
adapter.host = c.host
end
require("osv").run_this()
dap.run = dap_run
end
callback(adapter)
end
dap.configurations.lua = {
{
type = "nlua",
request = "attach",
name = "Attach to running Neovim instance",
name = "Run this file",
start_neovim = {},
},
{
type = "nlua",
request = "attach",
name = "Attach to running Neovim instance (port = 8086)",
port = 8086,
},
}
end,

View File

@ -0,0 +1,123 @@
local Config = require("lazyvim.config")
local Util = require("lazyvim.util")
return {
desc = "Aerial Symbol Browser",
{
"stevearc/aerial.nvim",
event = "LazyFile",
opts = function()
local icons = vim.deepcopy(Config.icons.kinds)
-- HACK: fix lua's weird choice for `Package` for control
-- structures like if/else/for/etc.
icons.lua = { Package = icons.Control }
---@type table<string, string[]>|false
local filter_kind = false
if Config.kind_filter then
filter_kind = assert(vim.deepcopy(Config.kind_filter))
filter_kind._ = filter_kind.default
filter_kind.default = nil
end
local opts = {
attach_mode = "global",
backends = { "lsp", "treesitter", "markdown", "man" },
show_guides = true,
layout = {
resize_to_content = false,
win_opts = {
winhl = "Normal:NormalFloat,FloatBorder:NormalFloat,SignColumn:SignColumnSB",
signcolumn = "yes",
statuscolumn = " ",
},
},
icons = icons,
filter_kind = filter_kind,
-- stylua: ignore
guides = {
mid_item = "├╴",
last_item = "└╴",
nested_top = "",
whitespace = " ",
},
}
return opts
end,
keys = {
{ "<leader>cs", "<cmd>AerialToggle<cr>", desc = "Aerial (Symbols)" },
},
},
-- Telescope integration
{
"nvim-telescope/telescope.nvim",
optional = true,
opts = function()
Util.on_load("telescope.nvim", function()
require("telescope").load_extension("aerial")
end)
end,
keys = {
{
"<leader>ss",
"<cmd>Telescope aerial<cr>",
desc = "Goto Symbol (Aerial)",
},
},
},
-- edgy integration
{
"folke/edgy.nvim",
optional = true,
opts = function(_, opts)
local edgy_idx = Util.plugin.extra_idx("ui.edgy")
local aerial_idx = Util.plugin.extra_idx("editor.aerial")
if edgy_idx and edgy_idx > aerial_idx then
Util.warn("The `edgy.nvim` extra must be **imported** before the `aerial.nvim` extra to work properly.", {
title = "LazyVim",
})
end
opts.right = opts.right or {}
table.insert(opts.right, {
title = "Aerial",
ft = "aerial",
pinned = true,
open = "AerialOpen",
})
end,
},
-- lualine integration
{
"nvim-lualine/lualine.nvim",
optional = true,
opts = function(_, opts)
table.insert(opts.sections.lualine_c, {
"aerial",
sep = " ", -- separator between symbols
sep_icon = "", -- separator between icon and symbol
-- The number of symbols to render top-down. In order to render only 'N' last
-- symbols, negative numbers may be supplied. For instance, 'depth = -1' can
-- be used in order to render only current symbol.
depth = 5,
-- When 'dense' mode is on, icons are not rendered near their symbols. Only
-- a single icon that represents the kind of current symbol is rendered at
-- the beginning of status line.
dense = false,
-- The separator to be used to separate symbols in dense mode.
dense_sep = ".",
-- Color the symbol icons.
colored = true,
})
end,
},
}

View File

@ -57,7 +57,7 @@ return {
vim.api.nvim_create_autocmd("User", {
pattern = "MiniFilesActionRename",
callback = function(event)
require("lazyvim.util").on_rename(event.data.from, event.data.to)
require("lazyvim.util").lsp.on_rename(event.data.from, event.data.to)
end,
})
end,

View File

@ -0,0 +1,42 @@
return {
-- lsp symbol navigation for lualine. This shows where
-- in the code structure you are - within functions, classes,
-- etc - in the statusline.
{
"SmiteshP/nvim-navic",
lazy = true,
init = function()
vim.g.navic_silence = true
require("lazyvim.util").lsp.on_attach(function(client, buffer)
if client.supports_method("textDocument/documentSymbol") then
require("nvim-navic").attach(client, buffer)
end
end)
end,
opts = function()
return {
separator = " ",
highlight = true,
depth_limit = 5,
icons = require("lazyvim.config").icons.kinds,
lazy_update_context = true,
}
end,
},
-- lualine integration
{
"nvim-lualine/lualine.nvim",
optional = true,
opts = function(_, opts)
table.insert(opts.sections.lualine_c, {
function()
return require("nvim-navic").get_location()
end,
cond = function()
return package.loaded["nvim-navic"] and require("nvim-navic").is_available()
end,
})
end,
},
}

View File

@ -0,0 +1,61 @@
local Util = require("lazyvim.util")
return {
{
"simrat39/symbols-outline.nvim",
keys = { { "<leader>cs", "<cmd>SymbolsOutline<cr>", desc = "Symbols Outline" } },
cmd = "SymbolsOutline",
opts = function()
local Config = require("lazyvim.config")
local defaults = require("symbols-outline.config").defaults
local opts = {
symbols = {},
symbol_blacklist = {},
}
local filter = Config.kind_filter
if type(filter) == "table" then
filter = filter.default
if type(filter) == "table" then
for kind, symbol in pairs(defaults.symbols) do
opts.symbols[kind] = {
icon = Config.icons.kinds[kind] or symbol.icon,
hl = symbol.hl,
}
if not vim.tbl_contains(filter, kind) then
table.insert(opts.symbol_blacklist, kind)
end
end
end
end
return opts
end,
},
-- edgy integration
{
"folke/edgy.nvim",
optional = true,
opts = function(_, opts)
local edgy_idx = Util.plugin.extra_idx("ui.edgy")
local symbols_idx = Util.plugin.extra_idx("editor.symbols-outline")
if edgy_idx and edgy_idx > symbols_idx then
Util.warn(
"The `edgy.nvim` extra must be **imported** before the `symbols-outline.nvim` extra to work properly.",
{
title = "LazyVim",
}
)
end
opts.right = opts.right or {}
table.insert(opts.right, {
title = "Symbols Outline",
ft = "Outline",
pinned = true,
open = "SymbolsOutline",
})
end,
},
}

View File

@ -10,6 +10,7 @@ return {
optional = true,
opts = function(_, opts)
local nls = require("null-ls")
opts.sources = opts.sources or {}
table.insert(opts.sources, nls.builtins.formatting.black)
end,
},

View File

@ -1,58 +0,0 @@
return {
{
"stevearc/conform.nvim",
dependencies = { "mason.nvim" },
lazy = true,
cmd = "ConformInfo",
keys = {
{
"<leader>cF",
function()
require("conform").format({ formatters = { "injected" } })
end,
mode = { "n", "v" },
desc = "Format Injected Langs",
},
},
init = function()
vim.o.formatexpr = "v:lua.require'conform'.formatexpr()"
-- Install the conform formatter on VeryLazy
require("lazyvim.util").on_very_lazy(function()
require("lazyvim.plugins.lsp.format").custom_format = function(buf)
return require("conform").format({ bufnr = buf })
end
end)
end,
opts = {
formatters_by_ft = {
lua = { "stylua" },
fish = { "fish_indent" },
sh = { "shfmt" },
},
-- LazyVim will merge the options you set here with builtin formatters.
-- You can also define any custom formatters here.
---@type table<string,table>
formatters = {
injected = { options = { ignore_errors = true } },
-- -- Example of using dprint only when a dprint.json file is present
-- dprint = {
-- condition = function(ctx)
-- return vim.fs.find({ "dprint.json" }, { path = ctx.filename, upward = true })[1]
-- end,
-- },
},
},
config = function(_, opts)
opts.formatters = opts.formatters or {}
for name, formatter in pairs(opts.formatters) do
if type(formatter) == "table" then
local ok, defaults = pcall(require, "conform.formatters." .. name)
if ok and type(defaults) == "table" then
opts.formatters[name] = vim.tbl_deep_extend("force", {}, defaults, formatter)
end
end
end
require("conform").setup(opts)
end,
},
}

View File

@ -2,7 +2,7 @@ return {
{
"williamboman/mason.nvim",
opts = function(_, opts)
table.insert(opts.ensure_installed, "prettierd")
table.insert(opts.ensure_installed, "prettier")
end,
},
{
@ -10,7 +10,8 @@ return {
optional = true,
opts = function(_, opts)
local nls = require("null-ls")
table.insert(opts.sources, nls.builtins.formatting.prettierd)
opts.sources = opts.sources or {}
table.insert(opts.sources, nls.builtins.formatting.prettier)
end,
},
{
@ -18,22 +19,22 @@ return {
optional = true,
opts = {
formatters_by_ft = {
["javascript"] = { { "prettierd", "prettier" } },
["javascriptreact"] = { { "prettierd", "prettier" } },
["typescript"] = { { "prettierd", "prettier" } },
["typescriptreact"] = { { "prettierd", "prettier" } },
["vue"] = { { "prettierd", "prettier" } },
["css"] = { { "prettierd", "prettier" } },
["scss"] = { { "prettierd", "prettier" } },
["less"] = { { "prettierd", "prettier" } },
["html"] = { { "prettierd", "prettier" } },
["json"] = { { "prettierd", "prettier" } },
["jsonc"] = { { "prettierd", "prettier" } },
["yaml"] = { { "prettierd", "prettier" } },
["markdown"] = { { "prettierd", "prettier" } },
["markdown.mdx"] = { { "prettierd", "prettier" } },
["graphql"] = { { "prettierd", "prettier" } },
["handlebars"] = { { "prettierd", "prettier" } },
["javascript"] = { "prettier" },
["javascriptreact"] = { "prettier" },
["typescript"] = { "prettier" },
["typescriptreact"] = { "prettier" },
["vue"] = { "prettier" },
["css"] = { "prettier" },
["scss"] = { "prettier" },
["less"] = { "prettier" },
["html"] = { "prettier" },
["json"] = { "prettier" },
["jsonc"] = { "prettier" },
["yaml"] = { "prettier" },
["markdown"] = { "prettier" },
["markdown.mdx"] = { "prettier" },
["graphql"] = { "prettier" },
["handlebars"] = { "prettier" },
},
},
},

View File

@ -12,8 +12,7 @@ return {
optional = true,
opts = function(_, opts)
local nls = require("null-ls")
opts.sources = opts.sources or {}
vim.list_extend(opts.sources, {
opts.sources = vim.list_extend(opts.sources or {}, {
nls.builtins.diagnostics.cmake_lint,
})
end,
@ -31,7 +30,7 @@ return {
"mason.nvim",
opts = function(_, opts)
opts.ensure_installed = opts.ensure_installed or {}
vim.list_extend(opts.ensure_installed, { "cmakelang" })
vim.list_extend(opts.ensure_installed, { "cmakelang", "cmakelint" })
end,
},
{

View File

@ -19,8 +19,7 @@ return {
optional = true,
opts = function(_, opts)
local nls = require("null-ls")
opts.sources = opts.sources or {}
vim.list_extend(opts.sources, {
opts.sources = vim.list_extend(opts.sources or {}, {
nls.builtins.diagnostics.hadolint,
})
end,

View File

@ -37,8 +37,7 @@ return {
return
end
local nls = require("null-ls")
opts.sources = opts.sources or {}
vim.list_extend(opts.sources, {
opts.sources = vim.list_extend(opts.sources or {}, {
nls.builtins.diagnostics.credo,
})
end,

View File

@ -61,7 +61,7 @@ return {
gopls = function(_, opts)
-- workaround for gopls not supporting semanticTokensProvider
-- https://github.com/golang/go/issues/54531#issuecomment-1464982242
require("lazyvim.util").on_attach(function(client, _)
require("lazyvim.util").lsp.on_attach(function(client, _)
if client.name == "gopls" then
if not client.server_capabilities.semanticTokensProvider then
local semantic = client.config.capabilities.textDocument.semanticTokens
@ -82,18 +82,33 @@ return {
},
},
-- Ensure Go tools are installed
{
"williamboman/mason.nvim",
opts = function(_, opts)
opts.ensure_installed = opts.ensure_installed or {}
vim.list_extend(opts.ensure_installed, { "goimports", "gofumpt" })
end,
},
{
"nvimtools/none-ls.nvim",
optional = true,
dependencies = {
{
"williamboman/mason.nvim",
opts = function(_, opts)
opts.ensure_installed = opts.ensure_installed or {}
vim.list_extend(opts.ensure_installed, { "gomodifytags", "impl" })
end,
},
},
opts = function(_, opts)
if type(opts.sources) == "table" then
local nls = require("null-ls")
vim.list_extend(opts.sources, {
nls.builtins.code_actions.gomodifytags,
nls.builtins.code_actions.impl,
nls.builtins.formatting.goimports,
})
end
local nls = require("null-ls")
opts.sources = vim.list_extend(opts.sources or {}, {
nls.builtins.code_actions.gomodifytags,
nls.builtins.code_actions.impl,
nls.builtins.formatting.goimports,
nls.builtins.formatting.gofumpt,
})
end,
},
{
@ -101,7 +116,7 @@ return {
optional = true,
opts = {
formatters_by_ft = {
go = { "goimports" },
go = { "goimports", "gofumpt" },
},
},
},
@ -110,10 +125,10 @@ return {
optional = true,
dependencies = {
{
"mason.nvim",
"williamboman/mason.nvim",
opts = function(_, opts)
opts.ensure_installed = opts.ensure_installed or {}
vim.list_extend(opts.ensure_installed, { "gomodifytags", "impl", "goimports", "delve" })
vim.list_extend(opts.ensure_installed, { "delve" })
end,
},
{

View File

@ -85,7 +85,7 @@ return {
-- How to run jdtls. This can be overridden to a full java command-line
-- if the Python wrapper script doesn't suffice.
cmd = { "jdtls" },
cmd = { vim.fn.exepath("jdtls") },
full_cmd = function(opts)
local fname = vim.api.nvim_buf_get_name(0)
local root_dir = opts.root_dir(fname)

View File

@ -0,0 +1,90 @@
return {
{
"nvim-treesitter/nvim-treesitter",
opts = function(_, opts)
if type(opts.ensure_installed) == "table" then
vim.list_extend(opts.ensure_installed, { "markdown", "markdown_inline" })
end
end,
},
{
"williamboman/mason.nvim",
opts = function(_, opts)
opts.ensure_installed = opts.ensure_installed or {}
vim.list_extend(opts.ensure_installed, { "markdownlint", "marksman" })
end,
},
{
"nvimtools/none-ls.nvim",
optional = true,
opts = function(_, opts)
local nls = require("null-ls")
opts.sources = vim.list_extend(opts.sources or {}, {
nls.builtins.diagnostics.markdownlint,
})
end,
},
{
"mfussenegger/nvim-lint",
optional = true,
opts = {
linters_by_ft = {
markdown = { "markdownlint" },
},
},
},
{
"neovim/nvim-lspconfig",
opts = {
servers = {
marksman = {},
},
},
},
-- Markdown preview
{
"iamcco/markdown-preview.nvim",
cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" },
build = function()
vim.fn["mkdp#util#install"]()
end,
keys = {
{
"<leader>cp",
ft = "markdown",
"<cmd>MarkdownPreviewToggle<cr>",
desc = "Markdown Preview",
},
},
config = function()
vim.cmd([[do FileType]])
end,
},
{
"lukas-reineke/headlines.nvim",
opts = function()
local opts = {}
for _, ft in ipairs({ "markdown", "norg", "rmd", "org" }) do
opts[ft] = {
headline_highlights = {},
}
for i = 1, 6 do
local hl = "Headline" .. i
vim.api.nvim_set_hl(0, hl, { link = "Headline", default = true })
table.insert(opts[ft].headline_highlights, hl)
end
end
return opts
end,
ft = { "markdown", "norg", "rmd", "org" },
config = function(_, opts)
-- PERF: schedule to prevent headlines slowing down opening a file
vim.schedule(function()
require("headlines").setup(opts)
require("headlines").refresh()
end)
end,
},
}

View File

@ -13,6 +13,7 @@ return {
optional = true,
opts = function(_, opts)
local nls = require("null-ls")
opts.sources = opts.sources or {}
table.insert(opts.sources, nls.builtins.formatting.csharpier)
end,
},

View File

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

View File

@ -12,11 +12,27 @@ return {
opts = {
servers = {
pyright = {},
ruff_lsp = {},
ruff_lsp = {
keys = {
{
"<leader>co",
function()
vim.lsp.buf.code_action({
apply = true,
context = {
only = { "source.organizeImports" },
diagnostics = {},
},
})
end,
desc = "Organize Imports",
},
},
},
},
setup = {
ruff_lsp = function()
require("lazyvim.util").on_attach(function(client, _)
require("lazyvim.util").lsp.on_attach(function(client, _)
if client.name == "ruff_lsp" then
-- Disable hover in favor of Pyright
client.server_capabilities.hoverProvider = false
@ -49,8 +65,8 @@ return {
"mfussenegger/nvim-dap-python",
-- stylua: ignore
keys = {
{ "<leader>dPt", function() require('dap-python').test_method() end, desc = "Debug Method" },
{ "<leader>dPc", function() require('dap-python').test_class() end, desc = "Debug Class" },
{ "<leader>dPt", function() require('dap-python').test_method() end, desc = "Debug Method", ft = "python" },
{ "<leader>dPc", function() require('dap-python').test_class() end, desc = "Debug Class", ft = "python" },
},
config = function()
local path = require("mason-registry").get_package("debugpy"):get_install_path()

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