Commit Graph
57 Commits
Author SHA1 Message Date
Folke Lemaitre 303980d267 feat(snacks): added leader-ua to toggle global animations 2024-12-12 13:47:29 +01:00
Folke Lemaitre 2cbfb9b6b7 feat(cmp)!: moved nvim-cmp to extras and prefer blink.cmp on Neovim >= 0.10 as default completion engine 2024-12-12 13:47:29 +01:00
Folke Lemaitre fbf881f80b feat(ai): better completion/suggestions of AI engines (#4752)
## Description

The whole completion / snippets / AI is very tricky:
- multiple snippet engines
- native snippets on > 0.11 set their own keymaps, but not on 0.10
- multiple completion engines, like `nvim-cmp` and `blink.cmp`
- multiple ai completion engines that have a different API
- user's preference of showing ai suggestions as completion or not
- none of the ai completion engines currently set undo points, which is
bad

Solution:
- [x] added `LazyVim.cmp.actions`, where snippet engines and ai engines
can register their action.
- [x] an action returns `true` if it succeeded, or `false|nil` otherwise
- [x] in a completion engine, we then try running multiple actions and
use the fallback if needed
- [x] so `<tab>` runs `{"snippet_forward", "ai_accept", "fallback"}`
- [x] added `vim.g.ai_cmp`. When `true` we try to integrate the AI
source in the completion engine.
- [x] when `false`, `<tab>` should be used to insert the AI suggestion
- [x] when `false`, the completion engine's ghost text is disabled
- [x] luasnip support for blink (only works with blink `main`)
- [x] create undo points when accepting AI suggestions 

## Test Matrix

| completion   | snippets     | ai          | ai_cmp | tested? |
|--------------|--------------|-------------|--------|---------|
| nvim-cmp     | native       | copilot     | true   |       |
| nvim-cmp     | native       | copilot     | false  |       |
| nvim-cmp     | native       | codeium     | true   |       |
| nvim-cmp     | native       | codeium     | false  |       |
| nvim-cmp     | luasnip      | copilot     | true   |       |
| nvim-cmp     | luasnip      | copilot     | false  |       |
| nvim-cmp     | luasnip      | codeium     | true   |       |
| nvim-cmp     | luasnip      | codeium     | false  |       |
| blink.cmp    | native       | copilot     | true   |       |
| blink.cmp    | native       | copilot     | false  |       |
| blink.cmp    | native       | codeium     | true   |       |
| blink.cmp    | native       | codeium     | false  |       |
| blink.cmp    | luasnip      | copilot     | true   |       |
| blink.cmp    | luasnip      | copilot     | false  |       |
| blink.cmp    | luasnip      | codeium     | true   |       |
| blink.cmp    | luasnip      | codeium     | false  |       |


## Related Issue(s)

- [ ] Closes #4702

## 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-11 10:50:57 +01:00
Folke Lemaitre 17a1b846f0 fix(snacks): allow overriding statuscolumn through options.lua 2024-11-11 09:37:47 +01:00
Folke Lemaitre 548fddd1d5 fix(options): make sure spelling works in regular text files 2024-11-08 21:05:30 +01:00
Alexey Svirshchevskiy 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
Folke Lemaitre 1e975be7a5 fix(options): removed deprecated options 2024-11-07 16:19:18 +01:00
Folke Lemaitre 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
Iordanis Petkakis 90a92312ae feat(root): provide vim.g.root_lsp_ignore to ignore LSP servers (#4332)
## Description
This provides `vim.g.root_lsp_ignore` for users to customize which LSP
servers should be taken into account when evaluating the LSP `root_dir`.
<!-- Describe the big picture of your changes to communicate to the
maintainers
  why we should accept this pull request. -->

## Related Issue(s)
Closes #4330
<!--
  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-10-03 15:55:25 +02:00
Iordanis Petkakis 41a8f3a5fb feat(lazygit): allow user to override LazyVim config with custom file (#4367)
## Description
This takes into consideration an additional file, if it exists, to
extend `LG_CONFIG_FILE` environment variable, so that users can
overwrite easier default LazyVim options set for lazygit in
`lazygit-theme.yml`. It's not desirable to directly change
`lazygit-theme.yml` as the values are hardcoded and regenerated upon
colorscheme change.
<!-- Describe the big picture of your changes to communicate to the
maintainers
  why we should accept this pull request. -->

## Related Issue(s)
Fixes #4364. Ideally, the problem about `nvim-remote` on Windows should
be fixed on lazygit's side, so this is just kind of a hotfix in the
meantime. Feel free to disregard this if not desirable.
<!--
  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-08-31 09:18:20 +02:00
Folke Lemaitre f9fdb356f2 fix(ui): trouble lualine component 2024-07-18 15:45:53 +02:00
Folke Lemaitre fe3d0da508 feat(options): jumpoptions=view 2024-07-03 17:12:26 +02:00
Folke Lemaitre 938a6718c6 feat(autocmds): added proper bigfile support 2024-06-25 20:30:57 +02:00
Folke Lemaitre 304e7439aa fix(pick): allow configuring pickers without LazyExtras. Fixes #3626 2024-06-14 17:55:43 +02:00
Folke Lemaitre 276b8032be feat(options): when available use treesitter spell regions for spell checking 2024-06-06 22:37:47 +02:00
Folke Lemaitre 1f4c1964fd feat(options): added linebreak=true to default options 2024-06-06 16:05:23 +02:00
Phúc H. Lê KhắcandFolke Lemaitre fa706b320b feat(statuscol): statuscolumn options for open fold indicator and fold hl (#2923)
* feat(statuscol): fold open indicator

* fix: make it configurable

---------

Co-authored-by: Folke Lemaitre <folke.lemaitre@gmail.com>
2024-06-05 11:23:19 +02:00
SpedonandFolke Lemaitre d02b73d72a fix(ui): allow to disable the trouble lualine component with vim.g.trouble_lualine = false (#3391)
* fix(ui): do not add trouble to lualine when aerial is enabled

* refactor: make trouble lualine an option

---------

Co-authored-by: Folke Lemaitre <folke.lemaitre@gmail.com>
2024-05-31 14:07:55 +02:00
Folke Lemaitre f8de965d3e feat(options): new option to disable deprecation warnings. warnings will be hidden bydefault 2024-05-17 09:19:28 +02:00
Folke Lemaitre 2391ac0420 refactor(options): refactored options 2024-05-16 16:37:26 +02:00
Rubin Bhandari 44d51e5a65 refactor(options): prefer opt in place of vim.opt (#3167) 2024-05-16 07:59:19 +02:00
Folke Lemaitre 426cd3ed91 feat(lazygit): configure lazygit nvim-remote as editor and enable nerdfont icons
can be disabled with `vim.g.lazygit_config = false`
2024-03-26 19:55:14 +01:00
Folke Lemaitre 7d0dbc6ded feat(lazygit): lazygit now automatically uses colors from your Neovim colorscheme
Disable by setting `vim.g.lazygit_theme = false` in your `options.lua`
2024-03-26 12:43:07 +01:00
Sergey Kochetkov 7ab6285011 feat(options): Disable foldtext for nightly (#2447)
* chores(format.lua): Fix typo

* Change gitsigns.nvim hunk preview shortcut

Change `preview_hunk` to recently added `preview_hunk_inline` command

* feat(options): remove redundant commented line

* feat(options): use native folding

see https://github.com/neovim/neovim/pull/20750
2024-03-22 10:38:10 +01:00
Folke Lemaitre 3d4ab4eb26 feat(lazyterm): optional shell setup, mainly for pwsh. Fixes #2151 2024-03-22 09:49:07 +01:00
Folke Lemaitre 1c9f4160a2 fix(options): dont set clipboard in an SSH session, so that OSC52 can be enabled (when supported) 2024-03-11 23:13:51 +01:00
mbhutton 29ed06e000 fix(options): don't lower timeoutlen when in VS Code (#2568)
Avoid lowering timeoutlen when running in VS Code, to avoid
unwanted timeouts from key mappings.

The lower value of 300ms (down from Neovim's default of 1000ms)
works great outside of VS Code, where it helps trigger the which-key UI
quickly, and where which-key prevents timeouts from occuring.

But in VS Code (where which-key isn't applicable), the lower value
makes it difficult to perform some key mappings in time,
such as `]p`, which requires shifting hand position.
2024-03-07 11:39:57 +01:00
Adrian Wilkins a43d8cf358 fix(options): change default conceal level to 2 (#2053)
3 hides all concealed text, even if there are replacement chars defined

e.g. : for Markdown, 3 hides list item markers, dots for asterisk lists
and em-dashes for dash lists

If replacements are defined as defaults in a plugin, the "Laziest™"
config would seem to be displaying them.

Level 1 only seems useful when alignment really matters.
2024-01-21 20:34:07 +01:00
Folke Lemaitre e01ad513aa fix(sessions): added folds to sessions 2023-10-27 18:34:33 +02:00
Folke Lemaitre 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
Folke Lemaitre ff64cc5399 fix(format): set formatexpr in options so users can override it. Fixes #1759 2023-10-16 23:01:18 +02:00
Folke Lemaitre c33e7489ec feat(root): allow custom functions as part of vim.g.root_spec 2023-10-12 11:48:02 +02:00
Folke Lemaitre a2d604928b feat(root): customizable root detection and :LazyRoot command 2023-10-12 11:48:02 +02:00
Folke Lemaitre f1a8f24a36 feat(format): new LazyVim formatter with integrations for lsp/none-ls/conform/eslint/... 2023-10-12 11:48:02 +02:00
Folke Lemaitre c8c929c9fd perf(util): split lazyvim.util in smaller separate modules 2023-10-12 11:48:02 +02:00
Folke Lemaitre 6b857f1de6 feat(options): set virtualedit=block by default 2023-10-09 17:49:00 +02:00
Folke Lemaitre 502d32490b fix(options): set sessionoptions the same as persistence 2023-10-08 20:24:45 +02:00
Folke Lemaitre 1eb019274b fix(options): set default laststatus=3 and set it to 0 before loading dashboard to prevent flickering 2023-10-05 10:43:21 +02:00
Folke Lemaitre d989ecc943 fix(options): only enable treesitter foldexpr on nightly. Fixes #1581 2023-10-04 18:07:21 +02:00
Folke Lemaitre e105c9daf6 perf(options): better detection for foldtext,statuscolumn,folexpr support 2023-10-03 18:19:32 +02:00
Folke Lemaitre f1ce07510d feat(ui): fancy fold text 2023-10-03 14:57:59 +02:00
Folke Lemaitre 364bcf325d feat(ui): fancy status column 2023-10-03 14:56:55 +02:00
Folke Lemaitre 19926d2848 feat(options): enabled treesitter folding and foldtext when available 2023-10-03 08:02:15 +02:00
Folke Lemaitre 450e0c6beb feat(options): enable smoothscroll on nightly 2023-10-03 08:02:15 +02:00
Folke Lemaitre 9935dc3944 fix: cleanup all Neovim < 0.9.0 code 2023-10-01 14:18:25 +02:00
Folke Lemaitre 258f339bcf feat(options)!: set default localleader to \ 2023-07-20 09:20:24 +02:00
Jonáš Dujava 69bf9e7e01 style(options): update comment (#960) 2023-06-22 12:51:25 +02:00
Folke Lemaitre 02c5e8d953 fix(config): options cant be disabled with lazyvim config. Fixes #566 2023-04-16 11:34:35 +02:00
adrian5 8650f2c99a fix(config): don't set options to their defaults (#120) 2023-01-24 13:40:18 +01:00
Folke Lemaitre 1b3b18d53b fix(options): don't set GUI font. Fixes #113 2023-01-23 23:42:01 +01:00