Compare commits

..

56 Commits

Author SHA1 Message Date
f57944f926 chore(main): release 13.1.0 (#4733)
🤖 I have created a release *beep* *boop*
---


##
[13.1.0](https://github.com/LazyVim/LazyVim/compare/v13.0.0...v13.1.0)
(2024-11-09)


### Features

* **terraform:** add formatter for packer files
([#4591](https://github.com/LazyVim/LazyVim/issues/4591))
([4876d11](4876d1137d))


### Bug Fixes

* **extras:** lazy-load telescope-terraform plugins
([#4667](https://github.com/LazyVim/LazyVim/issues/4667))
([94b4219](94b4219327))
* **options:** make sure spelling works in regular text files
([548fddd](548fddd1d5))
* **snacks:** noice now honors `Snacks.config.notifier.enabled = false`
([220148f](220148f47f))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-11-09 15:51:45 +01:00
5b66db294f chore(build): auto-generate docs 2024-11-09 14:50:33 +00:00
220148f47f fix(snacks): noice now honors Snacks.config.notifier.enabled = false 2024-11-09 15:49:40 +01:00
4876d1137d feat(terraform): add formatter for packer files (#4591)
## Description

Adds a formatter for Packer configuration files (`ft=hcl`), a file type
already partially supported by the `lang.terraform` extra.

## Checklist

- [x] I've read the
[CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md)
guidelines.
2024-11-08 21:14:22 +01:00
EJ
94b4219327 fix(extras): lazy-load telescope-terraform plugins (#4667)
## Description

In the current terraform extra, both
`cappyzawa/telescope-terraform.nvim` and
`ANGkeith/telescope-terraform-doc.nvim` are dependencies of
`telescope.nvim`.
This should be reversed so that the telescope extensions only load when
needed
(I added a `ft` trigger which I think makes the most sense), and not as
a
dependency of `telescope.nvim`.

## Related Issue(s)

No related issues, just fixed this when the loading time of
`telescope-terraform-doc.nvim` in-particular was annoying (+~30ms
startup).

## Checklist

- [x] I've read the
[CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md)
guidelines.
2024-11-08 21:08:21 +01:00
548fddd1d5 fix(options): make sure spelling works in regular text files 2024-11-08 21:05:30 +01:00
5efb88f44a chore(main): release 13.0.0 (#4723)
🤖 I have created a release *beep* *boop*
---


##
[13.0.0](https://github.com/LazyVim/LazyVim/compare/v12.44.1...v13.0.0)
(2024-11-08)


### ⚠ BREAKING CHANGES

* **core:** move a bunch of LazyVim features to snacks.nvim
([#4706](https://github.com/LazyVim/LazyVim/issues/4706))

### Features

* **core:** move a bunch of LazyVim features to snacks.nvim
([#4706](https://github.com/LazyVim/LazyVim/issues/4706))
([2f46974](2f4697443c))
* **elixir:** add support for livebook files (`*.livemd`)
([#4184](https://github.com/LazyVim/LazyVim/issues/4184))
([2fcd4cd](2fcd4cdc5f))
* **eslint:** add option to disable eslint auto format
([#4225](https://github.com/LazyVim/LazyVim/issues/4225))
([2d2e425](2d2e425d25))
* **extras.nushell:** update to upstream treesitter
([#4715](https://github.com/LazyVim/LazyVim/issues/4715))
([37cc039](37cc03948d))
* **extras:** lang/zig
([#4437](https://github.com/LazyVim/LazyVim/issues/4437))
([4379faf](4379fafc7b))
* **extras:** rego language support
([#4297](https://github.com/LazyVim/LazyVim/issues/4297))
([cf86484](cf86484797))
* **keymaps:** only add lazygit keymaps when available. Closes
[#4643](https://github.com/LazyVim/LazyVim/issues/4643). Closes
[#4247](https://github.com/LazyVim/LazyVim/issues/4247)
([aa53cd4](aa53cd47c4))
* **lang.angular:** configure `prettier` as formatter for `angular`
templates ([#4345](https://github.com/LazyVim/LazyVim/issues/4345))
([2d6687c](2d6687c646))
* **scala:** add key for worksheet hover
([#3853](https://github.com/LazyVim/LazyVim/issues/3853))
([859646f](859646f628))
* **toggle:** add illuminate toggle for which-key
([#4708](https://github.com/LazyVim/LazyVim/issues/4708))
([67ba582](67ba58215b))


### Bug Fixes

* **blink:** remove `draw="reversed"` for now till new release
([b841a1d](b841a1dfc3))
* **copilot-chat:** setup cmp conditionally
([#4716](https://github.com/LazyVim/LazyVim/issues/4716))
([a86c252](a86c25286b))
* **dap:** use dap's splitstr when running with args. Closes
[#4387](https://github.com/LazyVim/LazyVim/issues/4387)
([776994a](776994a207))
* **dial:** follow comment explanation for integers
([#4658](https://github.com/LazyVim/LazyVim/issues/4658))
([c879b39](c879b397c7))
* **extras:** make kulala keys only for http files
([#4574](https://github.com/LazyVim/LazyVim/issues/4574))
([b0ced33](b0ced339a8))
* **extras:** use the correct naming when setting up eruby formatter
([#4625](https://github.com/LazyVim/LazyVim/issues/4625))
([8534af4](8534af4a79))
* **lang/r:** make keymaps in which-key menu available in visual mode
([#4565](https://github.com/LazyVim/LazyVim/issues/4565))
([ee2ec7e](ee2ec7e474))
* **lang/ruby:** do not enable Rubocop as LSP if Solargraph is used
([#4566](https://github.com/LazyVim/LazyVim/issues/4566))
([fd361d0](fd361d07a2))
* **lsp:** wrap hover and signature_help
([7616816](76168166e5))
* **lualine:** apply highlight groups correctly to truncated
pretty_paths ([#4379](https://github.com/LazyVim/LazyVim/issues/4379))
([1d4157e](1d4157e681))
* **lualine:** make sure path is in root before substituting
([67b216c](67b216c973))
* **navic:** use the same background color as lualine section_c
([#4231](https://github.com/LazyVim/LazyVim/issues/4231))
([64b0f0b](64b0f0b71d))
* **neotest:** disambiguous key map descriptions
([#4374](https://github.com/LazyVim/LazyVim/issues/4374))
([dfde914](dfde9148ef))
* **options:** disable default ruler
([#4731](https://github.com/LazyVim/LazyVim/issues/4731))
([da3058a](da3058a72d))
* **options:** removed deprecated options
([1e975be](1e975be7a5))
* **prettier:** keep existing formatters_by_ft
([#4719](https://github.com/LazyVim/LazyVim/issues/4719))
([4ff3606](4ff36062dd))
* **project.nvim:** correctly delete projects
([#4314](https://github.com/LazyVim/LazyVim/issues/4314))
([c097355](c09735594a))
* **snacks:** dont add `snacks_notif` to close_with_q
([e6f612f](e6f612f1cc))
* **snippet:** don't set navigation mappings in nightly
([#4375](https://github.com/LazyVim/LazyVim/issues/4375))
([1552791](15527910c3))
* **telescope:** buffers to start at final item
([#4189](https://github.com/LazyVim/LazyVim/issues/4189))
([f78bc3b](f78bc3b858))
* **telescope:** check for gmake if needed
([0bc09d8](0bc09d8206))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-11-08 17:18:00 +01:00
da3058a72d fix(options): disable default ruler (#4731)
## Description

The ruler option causes numbers to be briefly shown on the dashboard
while LazyVim is loading. This MR disables the ruler.


## Screenshots
<img width="1086" alt="image"
src="https://github.com/user-attachments/assets/debd9e9b-bfd2-485e-be51-d1b7a59c3729">


<!-- Add screenshots of the changes if applicable. -->

## Checklist

- [x] I've read the
[CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md)
guidelines.
2024-11-08 17:10:53 +01:00
76168166e5 fix(lsp): wrap hover and signature_help 2024-11-08 16:55:40 +01:00
2fcd4cdc5f feat(elixir): add support for livebook files (*.livemd) (#4184)
Livebook is a subset of Markdown, so we can safely use markdown's
treesitter for it.

Co-authored-by: Iordanis Petkakis <dpetka2001@users.noreply.github.com>
2024-11-08 14:10:11 +01:00
859646f628 feat(scala): add key for worksheet hover (#3853)
## What is this PR for?

Worksheet hovering is a useful feature provided by `metals` to see not
just the end result, but also the entire output of a function call, as
can be seen here for example:
https://youtu.be/Jv9B1crzpWM?t=16m20s

Having a default key assigned not only makes it more convenient, but
also increases discoverability.

(I was also contemplating `<leader>mK` as the mapping to be in line with
`K` for regular hover, but I wasn't convinced that the consistency is
worth the extra keypress.)

## Checklist

- [x] I've read the
[CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md)
guidelines.
2024-11-08 14:09:17 +01:00
64b0f0b71d fix(navic): use the same background color as lualine section_c (#4231)
## Description

Prior to this, when using the navic Extra, the symbol breadcrumbs shown
in lualine section_c had a background color different from the
background of lualine_c, causing it to standout and not blend in with
some colorschemes.

There were ways around this problem, but hose involved overriding a lot
of highlights. See https://github.com/LazyVim/LazyVim/issues/328

This change uses the new (as of April 2023) lualine component built in
to SmiteshP/nvim-navic, which has a `color_correction` option to fix the
problem described above. This built-in component replaces the manual
method of calling `require("nvim-navic").is_available()` and
`require("nvim-navic").get_location()`.

*
711e9f117a
*
bf587250f8

With `color_correction` set to "static" or "dynamic", navic uses the
lualine section's background color when building the breadcrumbs text.

*
bf587250f8/doc/navic.txt (L83-L88)

I chose to set color_correction to "dynamic" to provide the best user
experience as that will update the background any time the lualine
section's background changes (e.g. when switching modes).

## Related Issue(s)

* Fixes #328

## Screenshots

Before this fix, the breadcrumb's background did not match lualine
section_c's:

![before](https://github.com/user-attachments/assets/b30e9844-5aac-4ec8-96fd-a5243de8cded)

After this fix, the breadcrumb's background does match:

![after](https://github.com/user-attachments/assets/63945c48-2edc-4aea-8144-ae0bff1ed952)

## Checklist

- [x] I've read the
[CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md)
guidelines.
2024-11-08 14:08:43 +01:00
f78bc3b858 fix(telescope): buffers to start at final item (#4189)
## Description

Currently hitting `<leader>fb` triggers the telescope buffers command
but because we're passing the `sort_lastused=true` flag the index starts
at the second item.

This happens because of this line of code in telescope.nvim:


https://github.com/nvim-telescope/telescope.nvim/blob/master/lua/telescope/builtin/__internal.lua#L941-L943

This makes it annoying to actually use the tool to find buffers because
you have to first type your query then exit insert mode, then scroll one
item down, and then hitting enter:



https://github.com/user-attachments/assets/4126d017-df4b-48dc-b6d4-f7d9b8f491ff

When removing that flag it makes the function much more usable in terms
of UX since now you can just write your query and hit enter to go
straight to it.

## Related Issue(s)

<!--
  If this PR fixes any issues, please link to the issue here.
  - Fixes #<issue_number>
-->

## Screenshots

<!-- Add screenshots of the changes if applicable. -->

## Checklist

- [x] I've read the
[CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md)
guidelines.
2024-11-08 14:06:39 +01:00
2d2e425d25 feat(eslint): add option to disable eslint auto format (#4225)
## Description

This adds an option to disable eslint's autoformatting. The reasons for
not wanting an auto format by eslint are:
1. It is generally not recommended to use a linter as a formatter as
highlighted by
https://typescript-eslint.io/users/what-about-formatting/#:~:text=We%20recommend%20against%20using%20ESLint,dprint%2C%20or%20an%20equivalent%20instead
2. A personal preference not to have a linter change my code which I'm
sure other people share.
3. As highlighted in the link above, eslint auto format can be quite
slow.

I would even argue that this should be the default, but I've left it as
is in order not to break anyone's config or ruffle anyone's feathers.

## Checklist

- [x] I've read the
[CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md)
guidelines.
2024-11-08 14:05:00 +01:00
fd361d07a2 fix(lang/ruby): do not enable Rubocop as LSP if Solargraph is used (#4566)
## Description

Solargraph already delegates some diagnostics to Rubocop by itself if it
is installed on your system. However, if Rubocop is also enabled as an
LSP while you're using Solargraph, then all Rubocop diagnostics are
going to be duplicated and shown twice. Once from Solargraph after it
calls Rubocop, and again by Rubocop separately running as an LSP.

## Checklist

- [x] I've read the
[CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md)
guidelines.
2024-11-08 13:56:44 +01:00
8534af4a79 fix(extras): use the correct naming when setting up eruby formatter (#4625)
## Description

Eruby files (.*.erb) are not formatted because the formatter name is
incorrect. This PR fixes it.

## Checklist

- [x] I've read the
[CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md)
guidelines.
2024-11-08 13:56:05 +01:00
2d6687c646 feat(lang.angular): configure prettier as formatter for angular templates (#4345)
## Description

Angular templates didn't have a configured formatter.
This PR configures prettier as a default formatter for angular
templates.

## Checklist

- [x] I've read the
[CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md)
guidelines.
2024-11-08 13:45:53 +01:00
cf86484797 feat(extras): rego language support (#4297)
It took a while, but finally we can work with
[OPA](https://www.openpolicyagent.org/) like a BOSS in neovim.

Linking some PR-s that had to land in the past couple of months to make
this config as
simple as it is now:

- treesitter commentstring support in
<https://github.com/JoosepAlviste/nvim-ts-context-commentstring/pull/108>
- regols support in nvim-lspconfig:
<https://github.com/neovim/nvim-lspconfig/pull/2721>
- regols support in mason-registry:
<https://github.com/mason-org/mason-registry/pull/4896>
- regols support in mason-lspconfig:
<https://github.com/williamboman/mason-lspconfig.nvim/pull/403>
- regal support in nvim-lspconfig:
<https://github.com/neovim/nvim-lspconfig/pull/3071>
- regal support in mason-registry:
<https://github.com/mason-org/mason-registry/pull/5717>
- regal support in mason-lspconfig:
<https://github.com/williamboman/mason-lspconfig.nvim/pull/426>

## Description

<!-- Describe the big picture of your changes to communicate to the
maintainers
  why we should accept this pull request. -->

## Related Issue(s)

<!--
  If this PR fixes any issues, please link to the issue here.
  - Fixes #<issue_number>
-->

## Screenshots

<!-- Add screenshots of the changes if applicable. -->

## Checklist

- [x] I've read the
[CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md)
guidelines.

Signed-off-by: Zoltán Reegn <zoltan.reegn@gmail.com>
2024-11-08 13:44:59 +01:00
c09735594a fix(project.nvim): correctly delete projects (#4314)
## Description
Unfortunately, the upstream Github repo hasn't been active for over a
year. This overwrites the `history.delete_project` function to correctly
be able to delete projects. Because of `ipairs` being used, when you
delete the first key from the table the `for` loop iteration will just
stop, since there will be a gap between the available indices.
> will iterate over the pairs (`1,t[1]`), (`2,t[2]`), ..., up to the
first integer key absent from the table.

There's also a
[PR](https://github.com/ahmedkhalf/project.nvim/pull/106/files) for this
upstream, but like I mentioned the Github repo hasn't been active for
over a year.

Feel free to disregard, since this is obviously something that should be
rather fixed upstream under normal circumstances. I just created this
PR, since it's such a basic functionality with little change in
LazyVim's codebase, that I thought it might be acceptable.
<!-- Describe the big picture of your changes to communicate to the
maintainers
  why we should accept this pull request. -->

## Related Issue(s)
No, rather a discussion #4310
<!--
  If this PR fixes any issues, please link to the issue here.
  - Fixes #<issue_number>
-->

## Screenshots

<!-- Add screenshots of the changes if applicable. -->

## Checklist

- [x] I've read the
[CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md)
guidelines.
2024-11-08 13:43:11 +01:00
15527910c3 fix(snippet): don't set navigation mappings in nightly (#4375)
## Description

Since [this commit in
Neovim](https://github.com/neovim/neovim/pull/27339), snippet navigation
mappings are set by default to `<tab>` and `<s-tab>`, and hence don't
need to be redefined here. Moreover, the core implementation makes sure
that those snippet navigation mappings are active only when snippet
expansion is happening, and if other user bindings are using those keys,
they're restored when snippet navigation ends.

## Checklist

- [x] I've read the
[CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md)
guidelines.
2024-11-08 13:40:25 +01:00
dfde9148ef fix(neotest): disambiguous key map descriptions (#4374)
## Description

Neotest key map descriptions were too ambiguous. This change simply adds
the plugin name to the key map descriptions, following the pattern of
other plugin related key map descriptions.

## Screenshots


![240830_09h47m20s_screenshot](https://github.com/user-attachments/assets/9c63b9f5-139d-4f9d-a6aa-4f9744c62a57)

## Checklist

- [x] I've read the
[CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md)
guidelines.
2024-11-08 13:37:09 +01:00
776994a207 fix(dap): use dap's splitstr when running with args. Closes #4387 2024-11-08 13:31:19 +01:00
ee2ec7e474 fix(lang/r): make keymaps in which-key menu available in visual mode (#4565)
## Description
`r.nvim` keymaps don't show group names in visual mode.
<!-- Describe the big picture of your changes to communicate to the
maintainers
  why we should accept this pull request. -->

## Related Issue(s)
No, rather discussion #4564
<!--
  If this PR fixes any issues, please link to the issue here.
  - Fixes #<issue_number>
-->

## Screenshots

<!-- Add screenshots of the changes if applicable. -->

## Checklist

- [x] I've read the
[CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md)
guidelines.
2024-11-08 13:26:31 +01:00
4e1fd66078 docs(dap): document continue to be used also for run (#4603)
The `dap.continue` is meant to be used also to start the program if no
debugging session is active.

The documentation states:

> `continue()` is the main entry-point for users to start debugging an
application.

With this change, it should be clearer to the user that `continue` is
the way to start a program. Otherwise, one could think to use `Run with
args` (which is misleading). At least for me, it was, until I read the
dap documentation.

## Checklist

- [x] I've read the
[CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md)
guidelines.
2024-11-08 13:25:56 +01:00
b0ced339a8 fix(extras): make kulala keys only for http files (#4574)
## Description

[Kulala's](https://github.com/mistweaverco/kulala.nvim) keys are
currently globally active. This PR makes them available in .http files
only.

## Checklist

- [x] I've read the
[CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md)
guidelines.
2024-11-08 13:25:09 +01:00
b5b3122843 chore(build): auto-generate docs 2024-11-08 08:01:42 +00:00
67ba58215b feat(toggle): add illuminate toggle for which-key (#4708)
## Description
Adds a Toggle-Shortcut to enable/disable
[Illuminate](https://github.com/RRethy/vim-illuminate)

I dont think 'leader ux' is the right shortcut here. I just took the
next free one.


![image](https://github.com/user-attachments/assets/65990e1b-f527-4691-8d2e-eee103695bff)
2024-11-08 09:00:36 +01:00
b841a1dfc3 fix(blink): remove draw="reversed" for now till new release 2024-11-07 22:52:38 +01:00
e6f612f1cc fix(snacks): dont add snacks_notif to close_with_q 2024-11-07 22:52:11 +01:00
67b216c973 fix(lualine): make sure path is in root before substituting 2024-11-07 17:01:08 +01:00
d017bb861e chore(build): auto-generate docs 2024-11-07 15:46:41 +00:00
db052ed9c0 docs(Readme): reflect that LazyVim For Ambitious Developers is complete (#4407)
## Description

LazyVim for Ambitious Developers is completely released online, with
ebooks available and print edition coming shortly. This just updates the
links to remove the "is working on" wording.

## Checklist

- [x] I've read the
[CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md)
guidelines.
2024-11-07 16:45:39 +01:00
4379fafc7b feat(extras): lang/zig (#4437)
## Description

A fresh and minimalist take on #1750.
It only adds what is maintainable (has activity in the past year at
least).

## Related Issue(s)

Closes #1750.


## Checklist

- [x] I've read the
[CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md)
guidelines.
2024-11-07 16:40:06 +01:00
1d4157e681 fix(lualine): apply highlight groups correctly to truncated pretty_paths (#4379)
## Description

This is a small fix to the path truncating in
`LazyVim.lualine.pretty_path()` to make the filename highlighting
actually apply to only the filename, rather than the filename and all
path elements after the inserted ellipsis (`…`).

This keeps it consistent with the behaviour exhibited when the path
isn't truncated, and is what I think most users would expect the
behaviour to be.

## Screenshots

Before this fix:

<img width="320" alt="image"
src="https://github.com/user-attachments/assets/d708a140-2b23-457a-a296-dd411d29d268">

```
   nvim/…/nvim/lua/plugins/lazyvim/ui.lua
   └──┬──┘└──────────────┬──────────────┘
directory_hl        filename_hl
```

After this fix:

<img width="319" alt="image"
src="https://github.com/user-attachments/assets/e9d13fdd-79a8-4e3d-942a-58d0e2bb8bca">

```
nvim/…/nvim/lua/plugins/lazyvim/ui.lua
└──────────────┬───────────────┘└─┬──┘
         directory_hl        filename_hl
```

## Checklist

- [x] I've read the
[CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md)
guidelines.
2024-11-07 16:26:17 +01:00
aa53cd47c4 feat(keymaps): only add lazygit keymaps when available. Closes #4643. Closes #4247 2024-11-07 16:21:48 +01:00
1e975be7a5 fix(options): removed deprecated options 2024-11-07 16:19:18 +01:00
c879b397c7 fix(dial): follow comment explanation for integers (#4658)
relevant doc page:
https://github.com/monaqa/dial.nvim?tab=readme-ov-file#augend-alias

## Description

The specific augend for integers in several languages is a different one
than what the comment explaining it suggests.

Changed the augend to the one that includes negative integers like the
comment suggests.


## Checklist

- [x] I've read the
[CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md)
guidelines.
2024-11-07 16:16:41 +01:00
37cc03948d feat(extras.nushell): update to upstream treesitter (#4715)
## Description

Since the nushell treesitter parser is now upstream, as seen in [this
pr](https://github.com/nvim-treesitter/nvim-treesitter/pull/7267), it
updates the treesitter config of this extra

## Checklist

- [x] I've read the
[CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md)
guidelines.

Co-authored-by: Conarius <Conarius+34580743@users.noreply.github.com>
2024-11-07 16:11:59 +01:00
4ff36062dd fix(prettier): keep existing formatters_by_ft (#4719)
## Description

<!-- Describe the big picture of your changes to communicate to the
maintainers
  why we should accept this pull request. -->

This change makes it possible to configure other formatters for
filetypes supported by the prettier extra, for instance

```js
return {
  {
    "stevearc/conform.nvim",
    opts = {
      formatters_by_ft = {
        css = { "stylelint" },
      },
    },
  },
}
```

Currently the prettier extra overwrites any existing `formatters_by_ft`
for the filetypes it supports. I've changed it to use `table.insert`
[like the sql extra
does](75750be1c0/lua/lazyvim/plugins/extras/lang/sql.lua (L148-L149)).

## Related Issue(s)

<!--
  If this PR fixes any issues, please link to the issue here.
  - Fixes #<issue_number>
-->

None that I know of

## Screenshots

<!-- Add screenshots of the changes if applicable. -->

N/A

## Checklist

- [x] I've read the
[CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md)
guidelines.
2024-11-07 16:11:36 +01:00
0bc09d8206 fix(telescope): check for gmake if needed 2024-11-07 16:10:45 +01:00
a86c25286b fix(copilot-chat): setup cmp conditionally (#4716)
## Description

Check for cmp before setting up copilot chat.

## Related Issue(s)

For https://github.com/LazyVim/LazyVim/issues/4702

I would like to set up the cmp compatability later if possible, but this
is a quick patch to allow copilot chat to work without cmp (for now).

## Checklist

- [x] I've read the
[CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md)
guidelines.

---------

Co-authored-by: Folke Lemaitre <folke.lemaitre@gmail.com>
2024-11-07 16:05:32 +01:00
81a4f3f690 chore(build): auto-generate docs 2024-11-07 14:55:42 +00:00
2f4697443c feat(core)!: move a bunch of LazyVim features to snacks.nvim (#4706)
## Description

LazyVim comes with a bunch of smaller QoL plugin like features, but it's
not easy for non LazyVim users to use them.

That's why I started working on
[snacks.nvim](https://github.com/folke/snacks.nvim), a collection of
small QoL plugins for Neovim.

Snacks also includes a bunch of new improvements to these features.

This PR fully integrates with snacks.

## Todo

- [ ] add proper deprecations where needed
- [ ] create snacks docs
- [ ] document all the new improvements relevant to LazyVim users

## Closes

- [ ] #4492 
- [ ] #4333
- [ ] #4687

## Screenshots

<!-- Add screenshots of the changes if applicable. -->

## Checklist

- [ ] I've read the
[CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md)
guidelines.
2024-11-07 15:54:47 +01:00
75750be1c0 chore(build): auto-generate docs 2024-11-04 11:56:40 +00:00
73f14943ba chore(main): release 12.44.1 (#4694)
🤖 I have created a release *beep* *boop*
---


##
[12.44.1](https://github.com/LazyVim/LazyVim/compare/v12.44.0...v12.44.1)
(2024-11-03)


### Bug Fixes

* **blink:** use release version
([7ebed53](7ebed5349d))
* **copilot:** properly process tab with copilot and blink. Fixes
[#4692](https://github.com/LazyVim/LazyVim/issues/4692)
([fa37396](fa3739678a))
* **java:** jdtls run with args
([#4689](https://github.com/LazyVim/LazyVim/issues/4689))
([0403e80](0403e80a8e))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-11-04 12:55:25 +01:00
7ebed5349d fix(blink): use release version 2024-11-03 15:26:45 +01:00
fa3739678a fix(copilot): properly process tab with copilot and blink. Fixes #4692 2024-11-03 12:53:10 +01:00
f4d78ac0de chore(build): auto-generate docs 2024-11-03 11:49:08 +00:00
0403e80a8e fix(java): jdtls run with args (#4689)
## Description

Makes run with args work for jdtls

## Related Issue(s)
- Closes #4686
- Closes #4673
2024-11-03 12:48:11 +01:00
29dab35619 chore(main): release 12.44.0 (#4635)
🤖 I have created a release *beep* *boop*
---


##
[12.44.0](https://github.com/LazyVim/LazyVim/compare/v12.43.0...v12.44.0)
(2024-11-02)


### Features

* **blink:** use vim.o.pumblend as winblend option for autocomplete menu
in blink
([28da1eb](28da1eb073))
* **extras:** blink
([#4680](https://github.com/LazyVim/LazyVim/issues/4680))
([ad52bf9](ad52bf91bc))
* **extras:** enable crates.nvim in-process lsp server
([#4684](https://github.com/LazyVim/LazyVim/issues/4684))
([db8895b](db8895b518))


### Bug Fixes

* **autocmds:** `vim.highlight` is deprecated
([a7b4c43](a7b4c4391b))
* **autocmds:** change mapping for `lazyvim_close_with_q`
([#4638](https://github.com/LazyVim/LazyVim/issues/4638))
([5f432d9](5f432d997e))
* **autocmds:** close window and force delete buf on q. See
[#4638](https://github.com/LazyVim/LazyVim/issues/4638)
([cb40a09](cb40a09538))
* **autocmds:** force close buffers with q. See
[#4638](https://github.com/LazyVim/LazyVim/issues/4638)
([0eb4009](0eb400908d))
* **blink:** explicetely set version=false for now
([ec616a3](ec616a3cec))
* **catppuccin:** fix bufferline integration when no colorscheme is set.
Closes [#4641](https://github.com/LazyVim/LazyVim/issues/4641)
([6570a14](6570a141c0))
* **copilot:** create undo point before accepting copilot suggestion
when using blink
([6e1d099](6e1d0994d9))
* **dap:** remove explicit `load_launchjs` call
([#4634](https://github.com/LazyVim/LazyVim/issues/4634))
([2f6c1f6](2f6c1f6083))
* **lazygit:** file history when cwd is outside the repo
([#4666](https://github.com/LazyVim/LazyVim/issues/4666))
([4ee6be4](4ee6be4499))
* **rust:** disable rust_analyzer in the rust extra. Fixes
[#4685](https://github.com/LazyVim/LazyVim/issues/4685)
([1d3d64f](1d3d64fd1a))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-11-03 00:15:26 +01:00
a7b4c4391b fix(autocmds): vim.highlight is deprecated 2024-11-02 18:51:04 +01:00
ec616a3cec fix(blink): explicetely set version=false for now 2024-11-02 18:12:31 +01:00
28da1eb073 feat(blink): use vim.o.pumblend as winblend option for autocomplete menu in blink 2024-11-02 17:43:11 +01:00
6e1d0994d9 fix(copilot): create undo point before accepting copilot suggestion when using blink 2024-11-02 17:41:38 +01:00
db8895b518 feat(extras): enable crates.nvim in-process lsp server (#4684)
## Description

Rather than manually handling hover and completions through nvim-cmp and
nvim-lspconfig, enable the crates.nvim in-process lsp server. This also
allows crates.nvim to provide code actions.

<!-- Describe the big picture of your changes to communicate to the
maintainers
  why we should accept this pull request. -->

## Related Issue(s)

This change also removes the direct dependency on nvim-cmp, which should
help with #4680

<!--
  If this PR fixes any issues, please link to the issue here.
  - Fixes #<issue_number>
-->

## Screenshots

<!-- Add screenshots of the changes if applicable. -->

## Checklist

- [x] I've read the
[CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md)
guidelines.

Co-authored-by: Folke Lemaitre <folke.lemaitre@gmail.com>
2024-11-02 10:02:23 +01:00
ad52bf91bc feat(extras): blink (#4680)
## Description

Extra to use [blink.cmp](https://github.com/Saghen/blink.cmp) instead of
**nvim-cmp**.

## Todo

- [x] tokyonight suport
- [x] basic integration
- [ ] check / update all cmp sources
- [ ] copilot and others integration 
- [x] native lazydev source

## Limitations

There's no copilot source, so instead when enabling both blink and
copilot:
- blink ghost text is disabled
- copilot suggestions are enabled
- use `<tab>` to navigate snippets and accept copilot completions 

## Related Issue(s)

- https://github.com/LazyVim/LazyVim/discussions/4679
2024-11-02 09:54:55 +01:00
58 changed files with 589 additions and 1221 deletions

View File

@ -1,3 +1,3 @@
{
".": "12.43.0"
".": "13.1.0"
}

View File

@ -1,5 +1,96 @@
# Changelog
## [13.1.0](https://github.com/LazyVim/LazyVim/compare/v13.0.0...v13.1.0) (2024-11-09)
### Features
* **terraform:** add formatter for packer files ([#4591](https://github.com/LazyVim/LazyVim/issues/4591)) ([4876d11](https://github.com/LazyVim/LazyVim/commit/4876d1137d374af6f39661e402926220517ae4ab))
### Bug Fixes
* **extras:** lazy-load telescope-terraform plugins ([#4667](https://github.com/LazyVim/LazyVim/issues/4667)) ([94b4219](https://github.com/LazyVim/LazyVim/commit/94b42193272569f8005587069733f3ba0610bc9b))
* **options:** make sure spelling works in regular text files ([548fddd](https://github.com/LazyVim/LazyVim/commit/548fddd1d5db65a80b11500e32cfe86e69bc8777))
* **snacks:** noice now honors `Snacks.config.notifier.enabled = false` ([220148f](https://github.com/LazyVim/LazyVim/commit/220148f47f175229232eee31982577fbdd637663))
## [13.0.0](https://github.com/LazyVim/LazyVim/compare/v12.44.1...v13.0.0) (2024-11-08)
### ⚠ BREAKING CHANGES
* **core:** move a bunch of LazyVim features to snacks.nvim ([#4706](https://github.com/LazyVim/LazyVim/issues/4706))
### Features
* **core:** move a bunch of LazyVim features to snacks.nvim ([#4706](https://github.com/LazyVim/LazyVim/issues/4706)) ([2f46974](https://github.com/LazyVim/LazyVim/commit/2f4697443c0186663ba4421bd4b856e36c3bd7cc))
* **elixir:** add support for livebook files (`*.livemd`) ([#4184](https://github.com/LazyVim/LazyVim/issues/4184)) ([2fcd4cd](https://github.com/LazyVim/LazyVim/commit/2fcd4cdc5fdbed0d2ac097db31578acb0b86b8a2))
* **eslint:** add option to disable eslint auto format ([#4225](https://github.com/LazyVim/LazyVim/issues/4225)) ([2d2e425](https://github.com/LazyVim/LazyVim/commit/2d2e425d25b02b93ef3e4ce4cb0a3edc30903fa5))
* **extras.nushell:** update to upstream treesitter ([#4715](https://github.com/LazyVim/LazyVim/issues/4715)) ([37cc039](https://github.com/LazyVim/LazyVim/commit/37cc03948d8a2475c4889d788df17b293bb7d1e9))
* **extras:** lang/zig ([#4437](https://github.com/LazyVim/LazyVim/issues/4437)) ([4379faf](https://github.com/LazyVim/LazyVim/commit/4379fafc7bbfe69f4e4d0da8131089cb7601f7c4))
* **extras:** rego language support ([#4297](https://github.com/LazyVim/LazyVim/issues/4297)) ([cf86484](https://github.com/LazyVim/LazyVim/commit/cf86484797f70d1783166e8f572a4cfedd510ab5))
* **keymaps:** only add lazygit keymaps when available. Closes [#4643](https://github.com/LazyVim/LazyVim/issues/4643). Closes [#4247](https://github.com/LazyVim/LazyVim/issues/4247) ([aa53cd4](https://github.com/LazyVim/LazyVim/commit/aa53cd47c45ad4a087a35ab9150807d1dfef65ed))
* **lang.angular:** configure `prettier` as formatter for `angular` templates ([#4345](https://github.com/LazyVim/LazyVim/issues/4345)) ([2d6687c](https://github.com/LazyVim/LazyVim/commit/2d6687c6460e8e4ab639bc0a655d7c3f2b90d002))
* **scala:** add key for worksheet hover ([#3853](https://github.com/LazyVim/LazyVim/issues/3853)) ([859646f](https://github.com/LazyVim/LazyVim/commit/859646f628ff0d99e6afe835ba0a48faed2972af))
* **toggle:** add illuminate toggle for which-key ([#4708](https://github.com/LazyVim/LazyVim/issues/4708)) ([67ba582](https://github.com/LazyVim/LazyVim/commit/67ba58215b9122f4c422801c4af74412a8aa21d4))
### Bug Fixes
* **blink:** remove `draw="reversed"` for now till new release ([b841a1d](https://github.com/LazyVim/LazyVim/commit/b841a1dfc36f68033ed02866b57a0a03112b06c3))
* **copilot-chat:** setup cmp conditionally ([#4716](https://github.com/LazyVim/LazyVim/issues/4716)) ([a86c252](https://github.com/LazyVim/LazyVim/commit/a86c25286b83d766af8935db31417c0ce417b865))
* **dap:** use dap's splitstr when running with args. Closes [#4387](https://github.com/LazyVim/LazyVim/issues/4387) ([776994a](https://github.com/LazyVim/LazyVim/commit/776994a20703d9f9cca380dbb0398ec2a6d79bd8))
* **dial:** follow comment explanation for integers ([#4658](https://github.com/LazyVim/LazyVim/issues/4658)) ([c879b39](https://github.com/LazyVim/LazyVim/commit/c879b397c7c4998c060247c0aa7ab68400967022))
* **extras:** make kulala keys only for http files ([#4574](https://github.com/LazyVim/LazyVim/issues/4574)) ([b0ced33](https://github.com/LazyVim/LazyVim/commit/b0ced339a8e19253b93c147e796e921c44735418))
* **extras:** use the correct naming when setting up eruby formatter ([#4625](https://github.com/LazyVim/LazyVim/issues/4625)) ([8534af4](https://github.com/LazyVim/LazyVim/commit/8534af4a7938d6fb8e7cfe5314ad13943414a42e))
* **lang/r:** make keymaps in which-key menu available in visual mode ([#4565](https://github.com/LazyVim/LazyVim/issues/4565)) ([ee2ec7e](https://github.com/LazyVim/LazyVim/commit/ee2ec7e4747f1be73f56f8a5f75047e5bc64cc93))
* **lang/ruby:** do not enable Rubocop as LSP if Solargraph is used ([#4566](https://github.com/LazyVim/LazyVim/issues/4566)) ([fd361d0](https://github.com/LazyVim/LazyVim/commit/fd361d07a295313273c64548784fdcdea59b8a69))
* **lsp:** wrap hover and signature_help ([7616816](https://github.com/LazyVim/LazyVim/commit/76168166e565a5aa135f2b5c5dabb2ffbb8a6075))
* **lualine:** apply highlight groups correctly to truncated pretty_paths ([#4379](https://github.com/LazyVim/LazyVim/issues/4379)) ([1d4157e](https://github.com/LazyVim/LazyVim/commit/1d4157e68128373609385452d594b3bdf77b0fc0))
* **lualine:** make sure path is in root before substituting ([67b216c](https://github.com/LazyVim/LazyVim/commit/67b216c973dd03fee84e362465266bab96402831))
* **navic:** use the same background color as lualine section_c ([#4231](https://github.com/LazyVim/LazyVim/issues/4231)) ([64b0f0b](https://github.com/LazyVim/LazyVim/commit/64b0f0b71d2678ca1342429c594eee61d8b9e0af))
* **neotest:** disambiguous key map descriptions ([#4374](https://github.com/LazyVim/LazyVim/issues/4374)) ([dfde914](https://github.com/LazyVim/LazyVim/commit/dfde9148ef128d8c81a836ff85eb9cd25a01ac1f))
* **options:** disable default ruler ([#4731](https://github.com/LazyVim/LazyVim/issues/4731)) ([da3058a](https://github.com/LazyVim/LazyVim/commit/da3058a72dbf086128b10ce19a0011000669b9ff))
* **options:** removed deprecated options ([1e975be](https://github.com/LazyVim/LazyVim/commit/1e975be7a547f9a2dea63edb21cbaefab40d0cfa))
* **prettier:** keep existing formatters_by_ft ([#4719](https://github.com/LazyVim/LazyVim/issues/4719)) ([4ff3606](https://github.com/LazyVim/LazyVim/commit/4ff36062dd33b852f9734d3731c55a5a8c50cf75))
* **project.nvim:** correctly delete projects ([#4314](https://github.com/LazyVim/LazyVim/issues/4314)) ([c097355](https://github.com/LazyVim/LazyVim/commit/c09735594a26a1749b775847c958e98f566fbac5))
* **snacks:** dont add `snacks_notif` to close_with_q ([e6f612f](https://github.com/LazyVim/LazyVim/commit/e6f612f1cc5dfe942a4b48878d8c356c32232fad))
* **snippet:** don't set navigation mappings in nightly ([#4375](https://github.com/LazyVim/LazyVim/issues/4375)) ([1552791](https://github.com/LazyVim/LazyVim/commit/15527910c321f3a6a01e1216442f8d21e5f19247))
* **telescope:** buffers to start at final item ([#4189](https://github.com/LazyVim/LazyVim/issues/4189)) ([f78bc3b](https://github.com/LazyVim/LazyVim/commit/f78bc3b85881b43fd082add4c80d9a75c573a882))
* **telescope:** check for gmake if needed ([0bc09d8](https://github.com/LazyVim/LazyVim/commit/0bc09d8206cfec1a4b3481acbc3e864a548c499a))
## [12.44.1](https://github.com/LazyVim/LazyVim/compare/v12.44.0...v12.44.1) (2024-11-03)
### Bug Fixes
* **blink:** use release version ([7ebed53](https://github.com/LazyVim/LazyVim/commit/7ebed5349d49dd9996d61155bc12605871058ec1))
* **copilot:** properly process tab with copilot and blink. Fixes [#4692](https://github.com/LazyVim/LazyVim/issues/4692) ([fa37396](https://github.com/LazyVim/LazyVim/commit/fa3739678af494b8657d68ddc44bcc598f9bd00a))
* **java:** jdtls run with args ([#4689](https://github.com/LazyVim/LazyVim/issues/4689)) ([0403e80](https://github.com/LazyVim/LazyVim/commit/0403e80a8e6250130fe94af1034a6f0760a24ca8))
## [12.44.0](https://github.com/LazyVim/LazyVim/compare/v12.43.0...v12.44.0) (2024-11-02)
### Features
* **blink:** use vim.o.pumblend as winblend option for autocomplete menu in blink ([28da1eb](https://github.com/LazyVim/LazyVim/commit/28da1eb073f99abda9ea9b2349e5d8b8087ffcce))
* **extras:** blink ([#4680](https://github.com/LazyVim/LazyVim/issues/4680)) ([ad52bf9](https://github.com/LazyVim/LazyVim/commit/ad52bf91bc8f1821bbb0b7218d03768eec9a9e42))
* **extras:** enable crates.nvim in-process lsp server ([#4684](https://github.com/LazyVim/LazyVim/issues/4684)) ([db8895b](https://github.com/LazyVim/LazyVim/commit/db8895b518278331fb73bbd81975cbe5012c8f71))
### Bug Fixes
* **autocmds:** `vim.highlight` is deprecated ([a7b4c43](https://github.com/LazyVim/LazyVim/commit/a7b4c4391bccc894f56847ead7abe4ae7a8e4fc0))
* **autocmds:** change mapping for `lazyvim_close_with_q` ([#4638](https://github.com/LazyVim/LazyVim/issues/4638)) ([5f432d9](https://github.com/LazyVim/LazyVim/commit/5f432d997e397790cea39d9bb8826c1d4ca14afb))
* **autocmds:** close window and force delete buf on q. See [#4638](https://github.com/LazyVim/LazyVim/issues/4638) ([cb40a09](https://github.com/LazyVim/LazyVim/commit/cb40a09538dc0c417a7ffbbacdbdec90be4a792c))
* **autocmds:** force close buffers with q. See [#4638](https://github.com/LazyVim/LazyVim/issues/4638) ([0eb4009](https://github.com/LazyVim/LazyVim/commit/0eb400908d17f4116f02c6464d7ef81456ca303c))
* **blink:** explicetely set version=false for now ([ec616a3](https://github.com/LazyVim/LazyVim/commit/ec616a3cecaf1e5de1687223575ff019ad688e55))
* **catppuccin:** fix bufferline integration when no colorscheme is set. Closes [#4641](https://github.com/LazyVim/LazyVim/issues/4641) ([6570a14](https://github.com/LazyVim/LazyVim/commit/6570a141c0de30fccee38e2b10dcd14830624e16))
* **copilot:** create undo point before accepting copilot suggestion when using blink ([6e1d099](https://github.com/LazyVim/LazyVim/commit/6e1d0994d99e63a46c3eff737c44ca47e3ecbe28))
* **dap:** remove explicit `load_launchjs` call ([#4634](https://github.com/LazyVim/LazyVim/issues/4634)) ([2f6c1f6](https://github.com/LazyVim/LazyVim/commit/2f6c1f60834108359b3404748453a65843909a03))
* **lazygit:** file history when cwd is outside the repo ([#4666](https://github.com/LazyVim/LazyVim/issues/4666)) ([4ee6be4](https://github.com/LazyVim/LazyVim/commit/4ee6be4499008db458089fb2573b13f6b5ec5d3b))
* **rust:** disable rust_analyzer in the rust extra. Fixes [#4685](https://github.com/LazyVim/LazyVim/issues/4685) ([1d3d64f](https://github.com/LazyVim/LazyVim/commit/1d3d64fd1ae26581b71f39091c816e568b7a3b39))
## [12.43.0](https://github.com/LazyVim/LazyVim/compare/v12.42.0...v12.43.0) (2024-10-23)

14
NEWS.md
View File

@ -1,5 +1,19 @@
# What's new?
## 13.x
- Big new release with a lot of changes and improvements!
- The biggest change is the move of a bunch of core features to
[snacks.nvim](https://github.com/folke/snacks.nvim) and fully
integrating it into **LazyVim**.
- I highly suggest having a look at the **snacks.nvim** documentation
to see all the new features and improvements. Most important changes:
- `Snacks.notifier` for notifications instead of `nvim-notify`
- `Snacks.terminal` is similar to `lazyterm`, but has more features
and creates bottom splits by default (similar to the `edgy` integrating)
## 12.x
- **Markdown Extra**: [headlines.nvim](https://github.com/lukas-reineke/headlines.nvim) has been removed in favor of [markdown.nvim](https://github.com/MeanderingProgrammer/markdown.nvim)

View File

@ -115,7 +115,7 @@ There's a great video created by [@elijahmanor](https://github.com/elijahmanor)
[![Watch the video](https://img.youtube.com/vi/N93cTbtLCIM/hqdefault.jpg)](https://www.youtube.com/watch?v=N93cTbtLCIM)
[@dusty-phillips](https://github.com/dusty-phillips) is working on a book called
[@dusty-phillips](https://github.com/dusty-phillips) wrote a comprehensive book called
[LazyVim for Ambitious Developers](https://lazyvim-ambitious-devs.phillips.codes)
available for free online.

View File

@ -1,4 +1,4 @@
*LazyVim.txt* For Neovim Last change: 2024 November 02
*LazyVim.txt* For Neovim Last change: 2024 November 09
==============================================================================
Table of Contents *LazyVim-table-of-contents*
@ -102,8 +102,8 @@ Theres a great video created by @elijahmanor
<https://www.youtube.com/watch?v=N93cTbtLCIM>
@dusty-phillips <https://github.com/dusty-phillips> is working on a book called
LazyVim for Ambitious Developers
@dusty-phillips <https://github.com/dusty-phillips> wrote a comprehensive book
called LazyVim for Ambitious Developers
<https://lazyvim-ambitious-devs.phillips.codes> available for free online.

View File

@ -18,7 +18,7 @@ vim.api.nvim_create_autocmd({ "FocusGained", "TermClose", "TermLeave" }, {
vim.api.nvim_create_autocmd("TextYankPost", {
group = augroup("highlight_yank"),
callback = function()
vim.highlight.on_yank()
(vim.hl or vim.highlight).on_yank()
end,
})
@ -55,20 +55,21 @@ vim.api.nvim_create_autocmd("FileType", {
group = augroup("close_with_q"),
pattern = {
"PlenaryTestPopup",
"checkhealth",
"dbout",
"gitsigns-blame",
"grug-far",
"help",
"lspinfo",
"neotest-output",
"neotest-output-panel",
"neotest-summary",
"notify",
"qf",
"snacks_win",
"spectre_panel",
"startuptime",
"tsplayground",
"neotest-output",
"checkhealth",
"neotest-summary",
"neotest-output-panel",
"dbout",
"gitsigns-blame",
},
callback = function(event)
vim.bo[event.buf].buflisted = false
@ -124,29 +125,3 @@ vim.api.nvim_create_autocmd({ "BufWritePre" }, {
vim.fn.mkdir(vim.fn.fnamemodify(file, ":p:h"), "p")
end,
})
vim.filetype.add({
pattern = {
[".*"] = {
function(path, buf)
return vim.bo[buf]
and vim.bo[buf].filetype ~= "bigfile"
and path
and vim.fn.getfsize(path) > vim.g.bigfile_size
and "bigfile"
or nil
end,
},
},
})
vim.api.nvim_create_autocmd({ "FileType" }, {
group = augroup("bigfile"),
pattern = "bigfile",
callback = function(ev)
vim.b.minianimate_disable = true
vim.schedule(function()
vim.bo[ev.buf].syntax = vim.filetype.match({ buf = ev.buf }) or ""
end)
end,
})

View File

@ -3,7 +3,7 @@ _G.LazyVim = require("lazyvim.util")
---@class LazyVimConfig: LazyVimOptions
local M = {}
M.version = "12.43.0" -- x-release-please-version
M.version = "13.1.0" -- x-release-please-version
LazyVim.config = M
---@class LazyVimOptions

View File

@ -37,7 +37,9 @@ 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" })
map("n", "<leader>bd", LazyVim.ui.bufremove, { desc = "Delete Buffer" })
map("n", "<leader>bd", function()
Snacks.bufdelete()
end, { desc = "Delete Buffer" })
map("n", "<leader>bD", "<cmd>:bd<cr>", { desc = "Delete Buffer and Window" })
-- Clear search with <esc>
@ -115,37 +117,30 @@ map("n", "[w", diagnostic_goto(false, "WARN"), { desc = "Prev Warning" })
-- stylua: ignore start
-- toggle options
LazyVim.toggle.map("<leader>uf", LazyVim.toggle.format())
LazyVim.toggle.map("<leader>uF", LazyVim.toggle.format(true))
LazyVim.toggle.map("<leader>us", LazyVim.toggle("spell", { name = "Spelling" }))
LazyVim.toggle.map("<leader>uw", LazyVim.toggle("wrap", { name = "Wrap" }))
LazyVim.toggle.map("<leader>uL", LazyVim.toggle("relativenumber", { name = "Relative Number" }))
LazyVim.toggle.map("<leader>ud", LazyVim.toggle.diagnostics)
LazyVim.toggle.map("<leader>ul", LazyVim.toggle.number)
LazyVim.toggle.map( "<leader>uc", LazyVim.toggle("conceallevel", { values = { 0, vim.o.conceallevel > 0 and vim.o.conceallevel or 2 } }))
LazyVim.toggle.map("<leader>uT", LazyVim.toggle.treesitter)
LazyVim.toggle.map("<leader>ub", LazyVim.toggle("background", { values = { "light", "dark" }, name = "Background" }))
LazyVim.format.snacks_toggle():map("<leader>uf")
LazyVim.format.snacks_toggle(true):map("<leader>uF")
Snacks.toggle.option("spell", { name = "Spelling"}):map("<leader>us")
Snacks.toggle.option("wrap", {name = "Wrap"}):map("<leader>uw")
Snacks.toggle.option("relativenumber", { name = "Relative Number"}):map("<leader>uL")
Snacks.toggle.diagnostics():map("<leader>ud")
Snacks.toggle.line_number():map("<leader>ul")
Snacks.toggle.option("conceallevel", {off = 0, on = vim.o.conceallevel > 0 and vim.o.conceallevel or 2}):map("<leader>uc")
Snacks.toggle.treesitter():map("<leader>uT")
Snacks.toggle.option("background", { off = "light", on = "dark" , name = "Dark Background"}):map("<leader>ub")
if vim.lsp.inlay_hint then
LazyVim.toggle.map("<leader>uh", LazyVim.toggle.inlay_hints)
Snacks.toggle.inlay_hints():map("<leader>uh")
end
-- lazygit
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>gB", LazyVim.lazygit.browse, { desc = "Git Browse" })
map("n", "<leader>gf", function()
local git_path = vim.api.nvim_buf_get_name(0)
LazyVim.lazygit({args = { "-f", vim.trim(git_path) }, cwd = LazyVim.root.git()})
end, { desc = "Lazygit Current File History" })
map("n", "<leader>gl", function()
LazyVim.lazygit({ args = { "log" }, cwd = LazyVim.root.git() })
end, { desc = "Lazygit Log" })
map("n", "<leader>gL", function()
LazyVim.lazygit({ args = { "log" } })
end, { desc = "Lazygit Log (cwd)" })
if vim.fn.executable("lazygit") == 1 then
map("n", "<leader>gg", function() Snacks.lazygit( { cwd = LazyVim.root.git() }) end, { desc = "Lazygit (Root Dir)" })
map("n", "<leader>gG", function() Snacks.lazygit() end, { desc = "Lazygit (cwd)" })
map("n", "<leader>gb", function() Snacks.git.blame_line() end, { desc = "Git Blame Line" })
map("n", "<leader>gB", function() Snacks.gitbrowse() end, { desc = "Git Browse" })
map("n", "<leader>gf", function() Snacks.lazygit.log_file() end, { desc = "Lazygit Current File History" })
map("n", "<leader>gl", function() Snacks.lazygit.log({ cwd = LazyVim.root.git() }) end, { desc = "Lazygit Log" })
map("n", "<leader>gL", function() Snacks.lazygit.log() end, { desc = "Lazygit Log (cwd)" })
end
-- quit
map("n", "<leader>qq", "<cmd>qa<cr>", { desc = "Quit All" })
@ -158,18 +153,12 @@ map("n", "<leader>uI", "<cmd>InspectTree<cr>", { desc = "Inspect Tree" })
map("n", "<leader>L", function() LazyVim.news.changelog() end, { desc = "LazyVim Changelog" })
-- 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", function() LazyVim.terminal() end, { desc = "Terminal (cwd)" })
map("n", "<c-/>", lazyterm, { desc = "Terminal (Root Dir)" })
map("n", "<c-_>", lazyterm, { desc = "which_key_ignore" })
map("n", "<leader>fT", function() Snacks.terminal() end, { desc = "Terminal (cwd)" })
map("n", "<leader>ft", function() Snacks.terminal(nil, { cwd = LazyVim.root() }) end, { desc = "Terminal (Root Dir)" })
map("n", "<c-/>", function() Snacks.terminal(nil, { cwd = LazyVim.root() }) end, { desc = "Terminal (Root Dir)" })
map("n", "<c-_>", function() Snacks.terminal(nil, { cwd = LazyVim.root() }) end, { 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-/>", "<cmd>close<cr>", { desc = "Hide Terminal" })
map("t", "<c-_>", "<cmd>close<cr>", { desc = "which_key_ignore" })
@ -178,7 +167,7 @@ map("n", "<leader>w", "<c-w>", { desc = "Windows", 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>wd", "<C-W>c", { desc = "Delete Window", remap = true })
LazyVim.toggle.map("<leader>wm", LazyVim.toggle.maximize)
LazyVim.ui.maximize():map("<leader>wm")
-- tabs
map("n", "<leader><tab>l", "<cmd>tablast<cr>", { desc = "Last Tab" })

View File

@ -18,22 +18,6 @@ vim.g.lazyvim_picker = "auto"
-- * 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.
-- * editPreset to nvim-remote
-- * enables nerd font icons
-- Set to false to disable.
-- Set the options you want to override in `~/.config/lazygit/custom.yml`
-- WARN: on Windows you might want to set `editPreset: "nvim"` due to
-- this issue https://github.com/jesseduffield/lazygit/issues/3467
vim.g.lazygit_config = true
-- Options for the LazyVim statuscolumn
vim.g.lazyvim_statuscolumn = {
folds_open = false, -- show fold sign when fold is open
folds_githl = false, -- highlight fold sign with git sign color
}
-- Optionally setup the terminal to use
-- This sets `vim.o.shell` and does some additional configuration for:
-- * pwsh
@ -47,12 +31,6 @@ vim.g.root_lsp_ignore = { "copilot" }
-- Hide deprecation warnings
vim.g.deprecation_warnings = false
-- Set filetype to `bigfile` for files larger than 1.5 MB
-- Only vim syntax will be enabled (with the correct filetype)
-- LSP, treesitter and other ft plugins will be disabled.
-- mini.animate will also be disabled.
vim.g.bigfile_size = 1024 * 1024 * 1.5 -- 1.5 MB
-- Show the current document symbols location from Trouble in lualine
-- You can disable this for a buffer by setting `vim.b.trouble_lualine = false`
vim.g.trouble_lualine = true
@ -92,6 +70,7 @@ opt.number = true -- Print line number
opt.pumblend = 10 -- Popup blend
opt.pumheight = 10 -- Maximum number of entries in a popup
opt.relativenumber = true -- Relative line numbers
opt.ruler = false -- Disable the default ruler
opt.scrolloff = 4 -- Lines of context
opt.sessionoptions = { "buffers", "curdir", "tabpages", "winsize", "help", "globals", "skiprtp", "folds" }
opt.shiftround = true -- Round indent
@ -103,11 +82,9 @@ opt.signcolumn = "yes" -- Always show the signcolumn, otherwise it would shift t
opt.smartcase = true -- Don't ignore case with capitals
opt.smartindent = true -- Insert indents automatically
opt.spelllang = { "en" }
opt.spelloptions:append("noplainbuffer")
opt.splitbelow = true -- Put new windows below current
opt.splitkeep = "screen"
opt.splitright = true -- Put new windows right of current
opt.statuscolumn = [[%!v:lua.require'lazyvim.util'.ui.statuscolumn()]]
opt.tabstop = 2 -- Number of spaces tabs count for
opt.termguicolors = true -- True color support
opt.timeoutlen = vim.g.vscode and 1000 or 300 -- Lower than default (1000) to quickly trigger which-key

View File

@ -105,26 +105,17 @@ return {
table.insert(opts.sources, { name = "snippets" })
end
end,
keys = {
{
"<Tab>",
function()
init = function()
-- Neovim enabled snippet navigation mappings by default in v0.11
if vim.fn.has("nvim-0.11") == 0 then
vim.keymap.set({ "i", "s" }, "<Tab>", function()
return vim.snippet.active({ direction = 1 }) and "<cmd>lua vim.snippet.jump(1)<cr>" or "<Tab>"
end,
expr = true,
silent = true,
mode = { "i", "s" },
},
{
"<S-Tab>",
function()
end, { expr = true, silent = true })
vim.keymap.set({ "i", "s" }, "<S-Tab>", function()
return vim.snippet.active({ direction = -1 }) and "<cmd>lua vim.snippet.jump(-1)<cr>" or "<S-Tab>"
end,
expr = true,
silent = true,
mode = { "i", "s" },
},
},
end, { expr = true, silent = true })
end
end,
},
-- auto pairs
@ -201,6 +192,7 @@ return {
library = {
{ path = "luvit-meta/library", words = { "vim%.uv" } },
{ path = "LazyVim", words = { "LazyVim" } },
{ path = "snacks.nvim", words = { "Snacks" } },
{ path = "lazy.nvim", words = { "LazyVim" } },
},
},

View File

@ -105,7 +105,7 @@ return {
},
config = function(_, opts)
local function on_move(data)
LazyVim.lsp.on_rename(data.source, data.destination)
Snacks.rename.on_rename_file(data.source, data.destination)
end
local events = require("neo-tree.events")

View File

@ -5,8 +5,7 @@ return {
},
{
"saghen/blink.cmp",
-- TODO: use release version
-- version = "*",
version = "*",
opts_extend = { "sources.completion.enabled_providers" },
dependencies = {
"rafamadriz/friendly-snippets",
@ -18,12 +17,6 @@ return {
---@module 'blink.cmp'
---@type blink.cmp.Config
opts = {
fuzzy = {
prebuilt_binaries = {
download = true,
force_version = "v0.5.0",
},
},
highlight = {
-- sets the fallback highlight groups to nvim-cmp's highlight groups
-- useful for when your theme doesn't support blink.cmp
@ -35,7 +28,8 @@ return {
nerd_font_variant = "mono",
windows = {
autocomplete = {
draw = "reversed",
-- draw = "reversed",
winblend = vim.o.pumblend,
},
documentation = {
auto_show = true,

View File

@ -73,7 +73,9 @@ return {
},
config = function(_, opts)
local chat = require("CopilotChat")
require("CopilotChat.integrations.cmp").setup()
if pcall(require, "cmp") then
require("CopilotChat.integrations.cmp").setup()
end
vim.api.nvim_create_autocmd("BufEnter", {
pattern = "copilot-chat",

View File

@ -109,7 +109,9 @@ return {
if cmp.is_in_snippet() then
return cmp.accept()
elseif require("copilot.suggestion").is_visible() then
LazyVim.create_undo()
require("copilot.suggestion").accept()
return true
else
return cmp.select_and_accept()
end

View File

@ -1,11 +1,17 @@
---@param config {args?:string[]|fun():string[]?}
---@param config {type?:string, args?:string[]|fun():string[]?}
local function get_args(config)
local args = type(config.args) == "function" and (config.args() or {}) or config.args or {}
local args = type(config.args) == "function" and (config.args() or {}) or config.args or {} --[[@as string[] | string ]]
local args_str = type(args) == "table" and table.concat(args, " ") or args --[[@as string]]
config = vim.deepcopy(config)
---@cast args string[]
config.args = function()
local new_args = vim.fn.input("Run with args: ", table.concat(args, " ")) --[[@as string]]
return vim.split(vim.fn.expand(new_args) --[[@as string]], " ")
local new_args = vim.fn.expand(vim.fn.input("Run with args: ", args_str)) --[[@as string]]
if config.type and config.type == "java" then
---@diagnostic disable-next-line: return-type-mismatch
return new_args
end
return require("dap.utils").splitstr(new_args)
end
return config
end
@ -30,7 +36,7 @@ return {
{ "<leader>d", "", desc = "+debug", mode = {"n", "v"} },
{ "<leader>dB", function() require("dap").set_breakpoint(vim.fn.input('Breakpoint condition: ')) end, desc = "Breakpoint Condition" },
{ "<leader>db", function() require("dap").toggle_breakpoint() end, desc = "Toggle Breakpoint" },
{ "<leader>dc", function() require("dap").continue() end, desc = "Continue" },
{ "<leader>dc", function() require("dap").continue() end, desc = "Run/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)" },

View File

@ -120,17 +120,17 @@ return {
months,
},
typescript = {
augend.integer.alias.decimal, -- nonnegative and negative decimal number
augend.integer.alias.decimal_int, -- nonnegative and negative decimal number
augend.constant.alias.bool, -- boolean value (true <-> false)
logical_alias,
augend.constant.new({ elements = { "let", "const" } }),
},
yaml = {
augend.integer.alias.decimal, -- nonnegative and negative decimal number
augend.integer.alias.decimal_int, -- nonnegative and negative decimal number
augend.constant.alias.bool, -- boolean value (true <-> false)
},
css = {
augend.integer.alias.decimal, -- nonnegative and negative decimal number
augend.integer.alias.decimal_int, -- nonnegative and negative decimal number
augend.hexcolor.new({
case = "lower",
}),
@ -142,11 +142,11 @@ return {
augend.misc.alias.markdown_header,
},
json = {
augend.integer.alias.decimal, -- nonnegative and negative decimal number
augend.integer.alias.decimal_int, -- nonnegative and negative decimal number
augend.semver.alias.semver, -- versioning (v1.1.2)
},
lua = {
augend.integer.alias.decimal, -- nonnegative and negative decimal number
augend.integer.alias.decimal_int, -- nonnegative and negative decimal number
augend.constant.alias.bool, -- boolean value (true <-> false)
augend.constant.new({
elements = { "and", "or" },
@ -155,7 +155,7 @@ return {
}),
},
python = {
augend.integer.alias.decimal, -- nonnegative and negative decimal number
augend.integer.alias.decimal_int, -- nonnegative and negative decimal number
capitalized_boolean,
logical_alias,
},

View File

@ -15,6 +15,21 @@ return {
config = function(_, opts)
require("illuminate").configure(opts)
Snacks.toggle({
name = "Illuminate",
get = function()
return not require("illuminate.engine").is_paused()
end,
set = function(enabled)
local m = require("illuminate")
if enabled then
m.resume()
else
m.pause()
end
end,
}):map("<leader>ux")
local function map(key, dir, buffer)
vim.keymap.set("n", key, function()
require("illuminate")["goto_" .. dir .. "_reference"](false)

View File

@ -104,7 +104,7 @@ return {
vim.api.nvim_create_autocmd("User", {
pattern = "MiniFilesActionRename",
callback = function(event)
LazyVim.lsp.on_rename(event.data.from, event.data.to)
Snacks.rename.on_rename_file(event.data.from, event.data.to)
end,
})
end,

View File

@ -30,14 +30,7 @@ return {
optional = true,
opts = function(_, opts)
if not vim.g.trouble_lualine then
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,
})
table.insert(opts.sections.lualine_c, { "navic", color_correction = "dynamic" })
end
end,
},

View File

@ -4,8 +4,13 @@ if lazyvim_docs then
vim.g.lazyvim_picker = "telescope"
end
local have_make = vim.fn.executable("make") == 1
local have_cmake = vim.fn.executable("cmake") == 1
local build_cmd ---@type string?
for _, cmd in ipairs({ "make", "cmake", "gmake" }) do
if vim.fn.executable(cmd) == 1 then
build_cmd = cmd
break
end
end
---@type LazyPicker
local picker = {
@ -63,9 +68,9 @@ return {
dependencies = {
{
"nvim-telescope/telescope-fzf-native.nvim",
build = have_make and "make"
build = (build_cmd ~= "cmake") and "make"
or "cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build",
enabled = have_make or have_cmake,
enabled = build_cmd ~= nil,
config = function(plugin)
LazyVim.on_load("telescope.nvim", function()
local ok, err = pcall(require("telescope").load_extension, "fzf")
@ -94,7 +99,11 @@ return {
{ "<leader>:", "<cmd>Telescope command_history<cr>", desc = "Command History" },
{ "<leader><space>", LazyVim.pick("files"), desc = "Find Files (Root Dir)" },
-- find
{ "<leader>fb", "<cmd>Telescope buffers sort_mru=true sort_lastused=true<cr>", desc = "Buffers" },
{
"<leader>fb",
"<cmd>Telescope buffers sort_mru=true sort_lastused=true ignore_current_buffer=true<cr>",
desc = "Buffers",
},
{ "<leader>fc", LazyVim.pick.config_files(), desc = "Find Config File" },
{ "<leader>ff", LazyVim.pick("files"), desc = "Find Files (Root Dir)" },
{ "<leader>fF", LazyVim.pick("files", { root = false }), desc = "Find Files (cwd)" },

View File

@ -70,7 +70,8 @@ return {
opts = function(_, opts)
opts.formatters_by_ft = opts.formatters_by_ft or {}
for _, ft in ipairs(supported) do
opts.formatters_by_ft[ft] = { "prettier" }
opts.formatters_by_ft[ft] = opts.formatters_by_ft[ft] or {}
table.insert(opts.formatters_by_ft[ft], "prettier")
end
opts.formatters = opts.formatters or {}

View File

@ -57,4 +57,15 @@ return {
})
end,
},
-- formatting
{
"conform.nvim",
opts = function(_, opts)
if LazyVim.has_extra("formatting.prettier") then
opts.formatters_by_ft = opts.formatters_by_ft or {}
opts.formatters_by_ft.htmlangular = { "prettier" }
end
end,
},
}

View File

@ -1,7 +1,7 @@
return {
recommended = function()
return LazyVim.extras.wants({
ft = { "elixir", "eelixir", "heex", "surface" },
ft = { "elixir", "eelixir", "heex", "surface", "livebook" },
root = "mix.exs",
})
end,
@ -40,7 +40,11 @@ return {
},
{
"nvim-treesitter/nvim-treesitter",
opts = { ensure_installed = { "elixir", "heex", "eex" } },
opts = function(_, opts)
opts.ensure_installed = opts.ensure_installed or {}
vim.list_extend(opts.ensure_installed, { "elixir", "heex", "eex" })
vim.treesitter.language.register("markdown", "livebook")
end,
},
{
"nvim-neotest/neotest",
@ -85,4 +89,11 @@ return {
}
end,
},
{
"MeanderingProgrammer/render-markdown.nvim",
optional = true,
ft = function(_, ft)
vim.list_extend(ft, { "livebook" })
end,
},
}

View File

@ -108,7 +108,7 @@ return {
ft = { "markdown", "norg", "rmd", "org" },
config = function(_, opts)
require("render-markdown").setup(opts)
LazyVim.toggle.map("<leader>um", {
Snacks.toggle({
name = "Render Markdown",
get = function()
return require("render-markdown.state").enabled
@ -121,7 +121,7 @@ return {
m.disable()
end
end,
})
}):map("<leader>um")
end,
},
}

View File

@ -12,23 +12,6 @@ return {
},
{
"nvim-treesitter/nvim-treesitter",
dependencies = {
{ "nushell/tree-sitter-nu" },
},
opts = function(_, opts)
---@diagnostic disable-next-line: inject-field
require("nvim-treesitter.parsers").get_parser_configs().nu = {
install_info = {
url = "https://github.com/nushell/tree-sitter-nu",
files = { "src/parser.c" },
branch = "main",
},
filetype = "nu",
}
if type(opts.ensure_installed) == "table" then
vim.list_extend(opts.ensure_installed, { "nu" })
end
end,
opts = { ensure_installed = { "nu" } },
},
}

View File

@ -22,6 +22,7 @@ return {
local wk = require("which-key")
wk.add({
buffer = true,
mode = { "n", "v" },
{ "<localleader>a", group = "all" },
{ "<localleader>b", group = "between marks" },
{ "<localleader>c", group = "chunks" },

View File

@ -0,0 +1,20 @@
return {
recommended = {
ft = "rego",
},
{
"neovim/nvim-lspconfig",
opts = {
servers = {
regols = {},
regal = {},
},
},
},
{
"nvim-treesitter/nvim-treesitter",
opts = {
ensure_installed = { "rego" },
},
},
}

View File

@ -36,7 +36,10 @@ return {
enabled = lsp == "solargraph",
},
rubocop = {
enabled = formatter == "rubocop",
-- If Solargraph and Rubocop are both enabled as an LSP,
-- diagnostics will be duplicated because Solargraph
-- already calls Rubocop if it is installed
enabled = formatter == "rubocop" and lsp ~= "solargraph",
},
standardrb = {
enabled = formatter == "standardrb",
@ -64,7 +67,7 @@ return {
opts = {
formatters_by_ft = {
ruby = { formatter },
eruby = { "erb-format" },
eruby = { "erb_format" },
},
},
},

View File

@ -6,26 +6,23 @@ return {
})
end,
-- Extend auto completion
-- LSP for Cargo.toml
{
"hrsh7th/nvim-cmp",
optional = true,
dependencies = {
{
"Saecki/crates.nvim",
event = { "BufRead Cargo.toml" },
opts = {
completion = {
cmp = { enabled = true },
},
"Saecki/crates.nvim",
event = { "BufRead Cargo.toml" },
opts = {
completion = {
crates = {
enabled = true,
},
},
lsp = {
enabled = true,
actions = true,
completion = true,
hover = true,
},
},
---@param opts cmp.ConfigSchema
opts = function(_, opts)
opts.sources = opts.sources or {}
table.insert(opts.sources, { name = "crates" })
end,
},
-- Add Rust & related to treesitter
@ -96,21 +93,6 @@ return {
opts = {
servers = {
rust_analyzer = { enabled = false },
taplo = {
keys = {
{
"K",
function()
if vim.fn.expand("%:t") == "Cargo.toml" and require("crates").popup_available() then
require("crates").show_popup()
else
vim.lsp.buf.hover()
end
end,
desc = "Show Crate Documentation",
},
},
},
},
},
},

View File

@ -34,6 +34,13 @@ return {
end,
desc = "Metals compile cascade",
},
{
"<leader>mh",
function()
require("metals").hover_worksheet()
end,
desc = "Metals hover worksheet",
},
},
init_options = {
statusBarProvider = "off",

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