Commit Graph

28322 Commits

Author SHA1 Message Date
Famiu Haque
4587912527
refactor(options): do bound checking in validate_num_option() 2023-12-24 11:22:26 +06:00
Famiu Haque
547ccc2681
refactor(options): remove side effects from check_num_option_bounds() 2023-12-24 11:22:25 +06:00
dundargoc
eae6727325 refactor: remove os_errmsg and os_msg functions
Instead replace them with fprintf and printf.
2023-12-23 14:00:09 +01:00
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
zeertzjq
c16d5729b5
refactor: remove CPO_TO_CPO_FLAGS() (#26718)
Just pass p_cpo to replace_termcodes() directly.
This allows removing option_vars.h from keycodes.h, and also avoids the
mistake of passing 0 as cpo_flags.
2023-12-23 15:53:28 +08:00
zeertzjq
3c667d3e0f
fix(mappings): fix mapset() not replacing map with backslash (#26719) 2023-12-23 15:30:44 +08:00
Famiu Haque
8f72987837
refactor(options): use OptIndex for os_idx 2023-12-23 11:09:00 +06:00
Famiu Haque
4d98ec2fa4
refactor(options): move some functions from options.c to option.c 2023-12-23 11:09:00 +06:00
Famiu Haque
1d2af15a95
refactor(options): restructure functions related to key options 2023-12-23 11:09:00 +06:00
zeertzjq
242261d4e7
refactor(IWYU): move evalarg_T to eval_defs.h (#26716) 2023-12-23 08:28:17 +08:00
Jared Baur
0c3d2a7fd9
build(nix): update flake.lock (#26702)
updates nixpkgs version to reflect the removal of nvim-client in the build see https://github.com/NixOS/nixpkgs/pull/274865
2023-12-23 00:50:24 +01:00
luukvbaal
e632396bab
refactor(drawline): avoid storing info to draw 'statuscolumn' (#26712)
We no longer return to the main loop in win_line() to put column
characters on the screen. Simplify and sync statuscolumn drawing
logic with that of statusline.
2023-12-23 06:31:07 +08:00
Lewis Russell
2b0acacb3c fix(decor): allow adding providers during redraw
Fixes: #26652
2023-12-22 20:27:07 +00: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
zeertzjq
2151e781e4
Merge pull request #26709 from luukvbaal/drawstatuscol 2023-12-22 19:35:26 +08:00
Luuk van Baal
35d98888bd refactor(drawline): simplify draw_statuscol() and remove draw_state references 2023-12-22 12:07:15 +01:00
bfredl
d9d9d94343
Merge pull request #26528 from bfredl/nodrawstate
refactor(drawline): remove LineDrawState and wlv->saved_n_extra
2023-12-22 11:49:06 +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
bfredl
66ac327db2 refactor(drawline): remove LineDrawState and wlv->saved_n_extra
We do not need an enum to keep track of what place in win_line() we
currently are at. We already have a variable which keeps track where
in the code we currently are (and thus what part of the line we are
currently rendering), it is called the _program counter_. When we need
non-linear or self-referential control-flow anyway for a laugh, we
have a mechanism for that, it is called _function calls_.

Do not "save" and "restore" the wlv->n_extra state every time the
columns are to be drawn. This sort of thing needs to go away. Instead of
setting the n_extra variables and then going to the outer while loop,
the text in the columns can be rendered by just simply putting the text
into the cells of the screen line, right away. Even in nvim this can be
tricky sometimes, luckily we can use function calls to abstract this
logic, which means that this handy data structure called the _call
stack_ is handling saving away state temporarily, and restoring it back
when we need it again.

Lastly, but not least, as we now have direct control how signs
are rendered, these can be stored as schar_T[2] and be directly
put on screen as such.
2023-12-22 10:54:28 +01:00
zeertzjq
ba0fa4fa19
refactor(IWYU): add "private" pragma to more generated headers (#26706)
"export" only prevents IWYU from adding these headers if the headers
that export them are included, while "private" ensures that IWYU never
adds these headers.
2023-12-22 13:32:46 +08:00
zeertzjq
089b934352
refactor(options): generate BV_ and WV_ constants (#26705) 2023-12-22 12:24:23 +08: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
dundargoc
af93a74a0f refactor: run IWYU on entire repo
Reference: https://github.com/neovim/neovim/issues/6371.
2023-12-21 17:38:42 +01:00
Lewis Russell
ade42d531b fix(build): teach cmake about vvars 2023-12-21 15:23:28 +00: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
Luuk van Baal
2ded2e75f4 fix(column): avoid exceeding configured 'signcolumn' width 2023-12-21 10:57:01 +00: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
8533adb484
refactor(IWYU): move decor provider types to decoration_defs.h (#26692) 2023-12-21 16:50:05 +08:00
zeertzjq
8c611f53fe
fixup: 2023-12-21 15:32:30 +08: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
zeertzjq
342c7da4bd
fix(channel): use os_write() instead of fwrite() for stderr (#26689)
This handles EAGAIN.

Related #26688
2023-12-21 10:39:10 +08:00
dundargoc
0c120307ca refactor: eliminate cyclic includes 2023-12-20 19:52:02 +01: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
Christian Clason
095bd8d0f8 fix(buffer): do not filter help buffer
Problem: If a help buffer is opened without legacy syntax set (because
treesitter is enabled), Vim strips (some) markup. This means the syntax
engine fails to parse (some) syntax if treesitter highlighting is
disabled again.

Solution: Do not strip the help buffer of markup since (legacy or
treesitter) highlighting is always enabled in Nvim. Similarly, remove
redundant setting of filetype and give the function a more descriptive
name.
2023-12-20 17:44:31 +01:00
zeertzjq
99d1e7da28
ci(release): create version tag after "stable" tag (#26671) 2023-12-20 21:53:30 +08: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