Commit Graph

18 Commits

Author SHA1 Message Date
XTY
0dc41dfe9a refactor(vscode): reimplement terminal integration and unify calls to extension API (#6076)
## Description

This PR proposes the following changes to the VS Code extra:
- Re-implement the VS Code terminal integration (broken since
[`2f46974`](2f4697443c (diff-f878104b5415a79ed4bb9036974722cad911327fdd46994e04f5065ff90e9a55)),
see comment referenced below)
- Unify calls to the [extension
API](https://github.com/vscode-neovim/vscode-neovim/tree/v1.18.21?tab=readme-ov-file#%EF%B8%8F-api)
- Fully adopt the Lua API in favour of the deprecated Vim script
functions (see [deprecation
notice](https://github.com/vscode-neovim/vscode-neovim/tree/v1.18.21?tab=readme-ov-file#vimscript))
  - Centralise `require("vscode")` calls

## Related Issue(s)

- Fixes
https://github.com/LazyVim/LazyVim/pull/4392#issuecomment-2881395017

## 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>
2025-10-20 07:36:15 +02:00
Theo Lemay
706ec4443a fix(vscode): don't sync undo/redo with vscode (#5957)
## Description

Vscode-neovim maintainer here,
https://github.com/LazyVim/LazyVim/pull/4983 should not have been
merged, it creates more problems than it
solves. For the longest time I was trying to figure out why undo is
broken on my machine, didn't notice this slipped in.

The fundamental issue is that vscode's undo points are based on a
time-based heuristic, wheras neovim's undo points are based on atomic
actions (delete, insert, etc). Vscode doesn't understand the context of
what the user is doing, it just receives a stream of edits from neovim.

Ultimately this results in multiple unrelated edits being undone with a
single press of the u key, resulting in very confusing behavior.

## Related Issue(s)

https://github.com/LazyVim/LazyVim/pull/4983

## Screenshots

Current


https://github.com/user-attachments/assets/5ca33b0d-fe2e-49f9-aa17-66f3c42c0966

Expected


https://github.com/user-attachments/assets/d577a1f3-efb2-4725-be50-bd0cf691252d



## Checklist

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

Co-authored-by: Theo Lemay <tlemay@tesla.com>
2025-10-19 12:31:48 +02:00
Folke Lemaitre
c7a7ab5112 fix(vscode): diabled some snacks plugins. Fixes #5364 2025-01-20 20:30:39 +01:00
Folke Lemaitre
301135b274 fix(vscode): disable some snacks plugins in vscode. Closes #5124 2024-12-16 17:45:50 +01:00
deniz gökçin
9ad1c49b67 feat(vscode): add vscode-specific keymaps and sync undo/redo with vscode (#4983)
## Summary
This pull request introduces several new keymaps specifically for VSCode
when using LazyVim. These changes aim to enhance the integration between
VSCode and LazyVim by adding keymaps for, tab navigation, and syncing
nvim undo/redo actions with vscode undo/redo.

## Changes
- Synced undo/redo lists with VSCode using `VSCodeNotify`: (check
https://github.com/vscode-neovim/vscode-neovim/issues/1139 for more
details)
  - `u` for undo
  - `<C-r>` for redo
- Enabled navigation of VSCode tabs similar to LazyVim buffers:
  - `<S-h>` to go to the previous editor
  - `<S-l>` to go to the next editor

## Additional Notes
These changes are intended to improve the user experience for those who
use LazyVim within VSCode by providing more intuitive and consistent
keybindings. Please test these keymaps to ensure they work as expected
in your VSCode setup.

Co-authored-by: Deniz Gökçin <deniz.gokcin@treatwell.com>
2024-12-10 12:13:01 +01:00
Folke Lemaitre
06071dd452 fix(vscode): added snacks.nvim to allowed plugins for vscode. Fixes #4757 2024-11-11 09:41:45 +01:00
moetayuko
ead5955bef feat(vscode): make use of vscode builtin terminal (#4392)
## Description

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

**I don't know how to properly handle cwd so it's implemented as a
simple toggle**

## Related Issue(s)

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

## Checklist

- [X] I've read the
[CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md)
guidelines.
2024-09-18 08:16:29 +02:00
Folke Lemaitre
67650528e4 fix(vscode): allow overriding default vscode keymaps. Fixes #3950 2024-07-08 07:52:18 +02:00
Folke Lemaitre
0975eeb9ad feat(vscode): added ts-comments to allow list for vscode 2024-05-29 18:22:54 +02:00
Theo Lemay
5726f3966d feat(vscode): enable more compatible plugins (#3250) 2024-05-20 19:56:14 +02:00
Folke Lemaitre
3833a7d1ce style: removed dead code 2023-10-04 13:19:12 +02:00
Folke Lemaitre
ae054ec13c feat(vscode): easier way to enable/disable plugins 2023-07-06 15:36:03 +02:00
Folke Lemaitre
5bf45e3139 feat(vscode): better vscode support 2023-05-24 08:45:20 +02:00
Folke Lemaitre
eba510ec69 fix(vscode): properly cleanup disabled deps 2023-05-23 14:33:13 +02:00
Folke Lemaitre
39fa63646d feat(vscode): add vscode=true to any plugin spec you want to activate in vscode 2023-05-23 14:33:00 +02:00
Folke Lemaitre
e975f021ea fix(vscode): added ts-context-commentstring 2023-05-23 14:32:32 +02:00
Folke Lemaitre
3dcc074693 fix(vscode): support older Neovim versions. Fixes #798 2023-05-23 08:44:51 +02:00
Folke Lemaitre
c12835ab86 feat(vscode): added vscode extra with minimal functionality. Will only do something when vim.g.vscode is set 2023-05-22 20:57:33 +02:00