Commit Graph

6357 Commits

Author SHA1 Message Date
Christian Clason
7121241e5c vim-patch:ea9964a36f94
Runtime(fortran): updates to indent, syntax and ftplugin (vim/vim#13752)

* runtime update fortran.vim

Add folding for newer features of Fortran

* Runtime Update fortran.vim

Add indent support for newer features of Fortran

* Runtime Update fortran.vim

Add newer features of Fortran to matchit patterns

ea9964a36f

Co-authored-by: Ajit-Thakkar <142174202+Ajit-Thakkar@users.noreply.github.com>
2023-12-23 12:41:10 +01:00
Christian Clason
373eb7b799 vim-patch:ec97edcbb9f6
runtime(debcontrol): Add loong64 arch (vim/vim#13754)

ec97edcbb9

Co-authored-by: James McCoy <jamessan@jamessan.com>
Co-authored-by: zhangjialing@loongson.cn <zhangjialing@loongson.cn>
2023-12-23 12:41:10 +01:00
Michal Liszcz
031088fc0a
fix(lsp): filetype matching to documentSelector in dynamic capabilities (#25425)
Use the get_language_id client option to resolve the filetype when
matching the document selector in a dynamic capability.


Co-authored-by: Mathias Fussenegger <f.mathias@zignar.net>
2023-12-22 15:03:13 +01:00
Steven Arcangeli
92204b06e7
refactor(lsp): move glob parsing to util (#26519)
refactor(lsp): move glob parsing to vim.glob

Moving the logic for using vim.lpeg to create a match pattern from a
glob into `vim.glob`. There are several places in the LSP spec that
use globs, and it's very useful to have glob matching as a
generally-available utility.
2023-12-22 11:40:01 +01:00
Mathias Fußenegger
db0ec84fb4
feat(lsp): add type annotations for lsp.util.locations_to_items (#26694)
Problem: luals reported many warnings
Solution: Add type annotations
2023-12-22 11:38:02 +01:00
Christian Clason
19aba5916a
docs(options): add codeblock annotations to options.lua (#26696)
Also consistently remove leading colons in examples

Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-12-22 10:55:39 +01:00
zeertzjq
6700127b30
vim-patch:9.0.2183: Maximum callback depth is not configurable (#26703)
Problem:  Maximum callback depth is not configurable.
Solution: Revert patch 9.0.2103.  Set 'maxfuncdepth' in test.

fixes: vim/vim#13732
closes: vim/vim#13736

fe583b1e59
2023-12-22 10:33:34 +08:00
zeertzjq
2b3d1e1854
vim-patch:0630080bbd3e (#26704)
runtime(doc): reformat and align :h ft-c-syntax (vim/vim#13738)

0630080bbd

Co-authored-by: Christian Brabandt <cb@256bit.org>
2023-12-22 08:58:51 +08:00
Christian Clason
2a173c0669 vim-patch:18ab6c3392ef
runtime(erlang): add support for matchit plugin (vim/vim#13713)

This commit updates the Erlang runtime files to be in sync with the
`vim-erlang-runtime` repository. In particular, it adds the following
commit (with some cleanup and simplification afterwards):
6ea8b85bc9

18ab6c3392

Co-authored-by: Csaba Hoch <csaba.hoch@gmail.com>
2023-12-22 01:07:50 +01:00
Christian Clason
a24d818840 vim-patch:37468879977a
runtime(masm): add variants of opcodes (vim/vim#13734)

that can actually be generated by compilers

3746887997

Co-authored-by: Wu Yongwei <wuyongwei@gmail.com>
2023-12-22 01:07:50 +01:00
Christian Clason
417148f7fd vim-patch:21064ebcd609
runtime(vim): Update syntax file (vim/vim#13739)

Match all ex commands after ":" and the "|" command separator.

Exceptions are not handled yet and :insert/:change/:append are still not
matched after the command separator bar.

21064ebcd6

Co-authored-by: dkearns <dougkearns@gmail.com>
2023-12-22 01:07:50 +01:00
Christian Clason
1a230d77fe vim-patch:cc944b145254
runtime(json5): Add TODO support to syntax script (vim/vim#13743)

cc944b1452

Co-authored-by: Danek Duvall <duvall@comfychair.org>
2023-12-22 01:07:50 +01:00
Lewis Russell
e8d3c4cccb feat: generate types and docs for v variables 2023-12-21 14:19:10 +00:00
Lewis Russell
a8935d97ac docs: move vim-variables to separate file 2023-12-21 14:19:10 +00:00
Evgeni Chasnovski
d431a4d410
fix(runtime): source old color scheme in bundled color schemes (#26641)
Problem:
Bundled color schemes use `:hi clear` and only define Vim's highlight
groups. This results into Nvim-specific highlight groups using
definitions from Nvim's default color scheme, which are not always
linked to a Vim's highlight group.

Solution:
Restore links to Vim's highlight groups which were present before Nvim's
default color scheme update.
2023-12-21 20:53:43 +08:00
Evgeni Chasnovski
720a3518e3 refactor(runtime): rewrite 'vim' color scheme in Lua
Problem: Bundled 'vim' color scheme is written in Vimscript which
  implicitly assumes that the file is ported from Vim.
  This is not the case, at it is currently the Neovim's way of providing
  backward compatibility for color schemes.

Solution: Rewrite it in Lua to indicate that this runtime file comes
  from Neovim.
2023-12-21 11:06:39 +01:00
zeertzjq
1045659097
fix(osc52): use nvim_chan_send() to stderr for copying (#26690)
The data to be written can be very long, so use nvim_chan_send() instead
of io.stdout:write() as the latter doesn't handle EAGAIN.

A difference of these two approaches is that nvim_chan_send() writes to
stderr, not stdout, so it won't work if client stderr is redirected.
2023-12-21 11:47:04 +08:00
Christian Clason
cc6a257c8c docs: apply current colorscheme to default highlight groups
Problem: Not all default highlight groups show their actual colors.
Solution: Refactor `vimhelp.lua` and apply it to all relevant lists (UI
groups, syntax groups, treesitter groups, LSP groups, diagnostic groups).
2023-12-20 18:58:40 +01:00
dundargoc
db4b0aeb92 docs: remove section on constants in style guide
It is needlessly restrictive and specific without good reason.
2023-12-20 18:49:54 +01:00
Lewis Russell
2498747add refactor(treesitter): cleanup highlighter
- Remove some unused fields
- Prefix classes with `vim.`
- Move around some functions so the query stuff is at the top.
- Improve type hints
- Rework how hl_cache is implemented
2023-12-20 11:55:25 +00:00
dundargoc
365e185606 docs: document header structure
Reference: https://github.com/neovim/neovim/issues/6371
2023-12-20 12:50:38 +01:00
zeertzjq
184f842349
vim-patch:955652f6df9c (#26667)
runtime(doc): Update change.txt (vim/vim#13725)

Fix-up and clarify commit  e06f2b498ccca921f34a1bec4464f042a5a2cabd

955652f6df

Co-authored-by: K.Takata <kentkt@csc.jp>
2023-12-20 07:02:48 +08:00
Christian Clason
2ed784f385 vim-patch:9.0.2179: no filetype detection for execline scripts
Problem:  no filetype detection for execline scripts
Solution: Add filetype detection for execline

as a prior to adding syntax support for execline (see
https://github.com/djpohly/vim-execline/issues/2), i went ahead and made
the filetype detection for execline scripts.

closes: vim/vim#13689

Signed-Off-By: Mazunki Hoksaas <rolferen@gmail.com>

63210c214a

Co-authored-by: Mazunki Hoksaas <rolferen@gmail.com>
2023-12-19 23:48:02 +01:00
Christian Clason
18933fc47f vim-patch:fbd72d2d4725
runtime(netrw): prevent E11 on FocusGained autocommand (vim/vim#13718)

fbd72d2d47

Co-authored-by: Christian Brabandt <cb@256bit.org>
2023-12-19 23:44:20 +01:00
Christian Clason
f7bc8bd4d1 vim-patch:379df7c1dbb2
runtime(8th): updated 8th syntax (vim/vim#13720)

* updated 8th.vim
* removed obsolete code

379df7c1db

Co-authored-by: ronaaron <ron@aaron-tech.com>
2023-12-19 23:44:20 +01:00
Jaehwang Jung
90a12d4a16 fix(treesitter): prepare highlight states for [s, ]s 2023-12-19 12:24:06 +01:00
dundargoc
693aea0e9e
docs: small fixes (#26448)
Co-authored-by: Gregory Anders <8965202+gpanders@users.noreply.github.com>
Co-authored-by: Jordan Mandel <jordan.mandel@live.com>
2023-12-19 13:29:13 +08:00
Amanda Graven
428edcde70
feat(api): add forward and back mouse buttons 2023-12-18 21:24:27 +01:00
Gregory Anders
3a4aa3fc58
refactor: soft-deprecate diagnostic signs configured with :sign-define (#26618)
Diagnostic signs should now be configured with vim.diagnostic.config(),
but "legacy" sign definitions should go through the standard deprecation
process to minimize the impact from breaking changes.
2023-12-18 11:04:44 -06:00
Jaehwang Jung
cd1b14f027
feat(termdebug): improve :Evaluate floating window (#26621)
Problem:
- The :Evaluate result window is not cleaned up when the cursor moves.
- This window is not focusable.

Solution:
Replace the old implementation from autozimu/LanguageClient-neovim with
vim.lsp.util.open_floating_preview and implement custom focusing logic.
Also remove g:termdebug_useFloatingHover option now that it's working
correctly.
2023-12-18 15:47:01 +00:00
dundargoc
6cb78e2d1c docs: add style rule regarding initialization
Specifically, specify that each initialization should be done on a
separate line.
2023-12-18 16:22:13 +01:00
Christian Clason
8c173cec29 vim-patch:b42703a662e8
runtime(tmux): Update tmux syntax rules (vim/vim#13708)

b42703a662

Co-authored-by: Eric Pruitt <eric.pruitt@gmail.com>
2023-12-18 10:25:08 +01:00
Christian Clason
8abae7c2e4 vim-patch:71cbe8e17a8c
runtime(fortan): update fortran syntax rules and doc notes

Update to the Fortran 2023 standard. Reorganize some code to reflect the
dropping of dialect support in the previous commit. Minor improvements.

closes: vim/vim#13712

71cbe8e17a

Co-authored-by: Ajit-Thakkar <142174202+Ajit-Thakkar@users.noreply.github.com>
2023-12-18 10:25:08 +01:00
Yi Ming
e164f4c271
docs(diagnostic): add return value of vim.diagnostic.config() (#26615) 2023-12-17 18:11:47 -06:00
Jaehwang Jung
c0cb1e8e94 perf(treesitter): filter out trees outside the visible range early
Problem:
Treesitter highlighter's on_line was iterating all the parsed trees,
which can be quite a lot when injection is used. This may slow down
scrolling and cursor movement in big files with many comment injections
(e.g., lsp/_meta/protocol.lua).

Solution:
In on_win, collect trees inside the visible range, and use them in
on_line.

NOTE:
This optimization depends on the correctness of on_win's botline_guess
parameter (i.e., it's always greater than or equal to the line numbers
passed to on_line). The documentation does not guarantee this, but I
have never noticed a problem so far.
2023-12-17 15:40:59 +00:00
Lewis Russell
5a2536de0c
refactor(lsp): move changetracking to separate file (#26577)
* refactor(lsp): move changetracking to separate file

- Prefixed changetracking types with `vim.lsp.`

* fixup!: make _reset_timer a local function

* fixup!: remove @private annotations

* fixup!: changetracking.lua -> _changetracking.lua

* fixup! types

* fixup! add send_changes_for_group
2023-12-17 09:54:38 +00:00
dundargoc
404fdb0f36 build: cmake fixes
- add EXTERNALPROJECT_OPTIONS variable to main build
- use `REQUIRED` keyword for IWYU.
- remove check_c_compiler_flag checks when `ENABLE_COMPILER_SUGGESTIONS`
  is `ON`. If we explicitly enable it then we probably want it to give
  an error if it doesn't exist, rather than silently skip it.
- Move dependency interface libraries to their find module and use them
  as a pseudo-imported target.
- Remove BUSTED_OUTPUT_TYPE. It's not used and we can reintroduce it
  again if something similar is needed.
- Use LINK_OPTIONS intead of LINK_FLAGS when generating the `--version`
  output.
2023-12-16 21:06:28 +01:00
Gregory Anders
8fb7419d7c
refactor: only reload colorscheme if &bg changed (#26598)
Currently, setting &bg at all re-initializes highlights and reloads
the active colorscheme, even if the actual value of &bg has not changed.
With https://github.com/neovim/neovim/pull/26595 this causes a
regression since &bg is set unconditionally based on the value detected
from the terminal.

Instead, only reload the colorscheme if the actual value of &bg has
changed.
2023-12-16 11:18:45 -06:00
dundargoc
7840760776 build: bump minimum cmake version to 3.13
The benefits are primarily being able to use FetchContent, which allows
for a more flexible dependency handling. Other various quality-of-life
features such as `-B` and `-S` flags are also included.

This also removes broken `--version` generation as it does not work for
version 3.10 and 3.11 due to the `JOIN` generator expression.

Reference: https://github.com/neovim/neovim/issues/24004
2023-12-16 17:17:24 +01:00
Christian Clason
69f5f0e20e vim-patch:82f19734bfcb
runtime(doc): remove deprecation warning for gdefault

Deprecated can be misunderstood as being slated for removal; slightly
change wording to be clearer.

82f19734bf

Co-authored-by: dundargoc <gocdundar@gmail.com>
2023-12-16 15:57:22 +01:00
Christian Clason
bf382df84f vim-patch:0f61943eb776
runtime(logtalk): Update Logtalk runtime files for the latest language spec (vim/vim#13697)

0f61943eb7

Co-authored-by: Paulo Moura <pmoura@logtalk.org>
2023-12-16 15:57:22 +01:00
Christian Clason
ba613d63c4 vim-patch:5eb9cb53d619
runtime(racket): update Racket runtime files (vim/vim#13693)

This brings the included Racket runtime files to commit 43bfc87 (update
headers, 2023-12-15) of https://github.com/benknoble/vim-racket. Note
that not all files from that repository are included. (In particular,
the ftdetect script is omitted for now.)

5eb9cb53d6

Co-authored-by: D. Ben Knoble <ben.knoble+github@gmail.com>
2023-12-16 15:57:22 +01:00
Christian Clason
6b8084a6be vim-patch:0378f07fbaee
runtime(colorschemes): Update colorschemes (vim/vim#13691)

Minor changes:

- Regenerated using colortemplate 2.2.3
- Removed reversed gui-cursor for some of the colorschemes (retrobox, wildcharm, lunaperche)
- Change MatchParen for some of colorschemes.

0378f07fba

Co-authored-by: Maxim Kim <habamax@gmail.com>
2023-12-16 15:43:26 +01:00
Evgeni Chasnovski
574519d9d6 feat(highlight): tweak default color scheme
Problem: Updating default color scheme produced some feedback.

Solution: Address the feedback.

Outline of the changes:

- Colors `Grey1` and `Grey2` are made a little bit more extreme (dark -
  darker, light - lighter) to increase overall contrast.

- `gui` colors are treated as base with `cterm` colors falling back to
  using 0-15 colors which come from terminal emulator.

- Update highlight group definition to not include attribute definition
  if it is intended to staty uncolored.

- Tweak some specific highlight groups.

- Add a list of Neovim specific highlight groups which are now defined
  differently in a breaking way.

- Minor tweaks in several other places related to default color scheme.
2023-12-16 14:43:03 +01:00
mathew
e38027ef69 feat(ui): completeopt support popup like vim 2023-12-16 18:59:59 +08:00
bfredl
7e7da962de
Merge pull request #26512 from famiu/refactor/options/type_flags
refactor(options): remove option type macros
2023-12-16 11:39:30 +01:00
dundargoc
7cae94e91e vim-patch:e06f2b498ccc
runtime(doc): fix typo in change.txt

e06f2b498c

Co-authored-by: Christian Brabandt <cb@256bit.org>
2023-12-16 10:29:50 +01:00
Gregory Anders
f4f7e29469
refactor(defaults): always set options, even if value hasn't changed (#26595)
Comparing against the old value before setting matched the original
C implementation, but there is no reason to use this restriction. In
particular, this inhibits using OptionSet to determine when the option
was set. If users need to handle a case where the option _changed_, it
is easy to do so in an OptionSet autocommand using v:option_new and
v:option_old (and friends).
2023-12-15 16:35:55 -06:00
zeertzjq
0d26d192d8
vim-patch:9a775b4a2ae6 (#26588)
runtime(netrw): escape curdir in BrowseUpDir (vim/vim#13681)

 fixes vim/vim#13678

9a775b4a2a

Co-authored-by: Christian Brabandt <cb@256bit.org>
2023-12-16 05:28:57 +08:00
Gregory Anders
224b2ec202
Merge pull request #26579 from gpanders/defer-set-tgc
refactor(defaults): defer setting 'termguicolors' until after VimEnter
2023-12-15 09:23:12 -06:00