Commit Graph

65 Commits

Author SHA1 Message Date
narutozxp
5098a69870 fix(clipboard): connecting via vscpde's remote-ssh extension causes severe lag during yank and copy operations. (#6664)
## Description

When connecting to a remote server via VSCode's Remote-SSH extension,
the `SSH_TTY` environment variable is not set. Consequently, both the
`vscode-neovim` extension (when using the remote Neovim instance) and
Neovim launched from VSCode's integrated terminal use the system
clipboard, resulting in severe lag.

Additionally, the `yanky.nvim` plugin synchronizes with the system
clipboard by default, regardless of whether the `clipboard` option is
set to an empty string (`""`). This causes similar performance issues as
described above.

Using the `SSH_CONNECTION` environment variable instead of `SSH_TTY` can
effectively resolve this issue.



## Checklist

- [x] I've read the
[CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md)
guidelines.
2025-10-23 12:04:47 +02:00
Folke Lemaitre
b93303d233 feat(treesitter): refactored setting up treesitter indent/highlight/folds 2025-09-18 09:49:54 +02:00
Folke Lemaitre
5bf237820d fix(snacks): safe wrapper around snacks statuscolumn to prevent errors when LazyVim is still installing 2025-09-18 09:49:54 +02:00
Folke Lemaitre
a6b38de763 fix(treesitter): indentexpr/foldexpr now work as intended and override ftplugin settings. Fixes #6447 2025-09-17 22:46:14 +02:00
Folke Lemaitre
72e1ee5b0d refactor(treesitter): cleanup 2025-09-17 15:33:37 +02:00
Folke Lemaitre
5eac460c09 feat(treesitter)!: migrate to nvim-treesitter **main** branch 2025-09-17 09:52:44 +02:00
Folke Lemaitre
64ee23f38f style: remove references to Neovim 0.10 2025-09-17 07:14:37 +02:00
Folke Lemaitre
a7a94c50ac refactor: remove all <0.11 compat code 2025-09-15 11:16:53 +02:00
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ắc
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
Spedon
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