Commit Graph

18488 Commits

Author SHA1 Message Date
Björn Linse
7b520cca3a
Merge pull request #15151 from dundargoc/refactor/true-and-false-macro
refactor: replace TRUE/FALSE macros with C99 true/false
2021-07-26 10:25:08 +02:00
Dundar Göc
11dcf15682 refactor: replace TRUE/FALSE macros with C99 true/false 2021-07-25 21:51:50 +02:00
Björn Linse
192adfe99f
Merge pull request #14311 from matveyt/nomode_ce
refactor(state): Remove EXMODE_NORMAL
2021-07-25 19:35:23 +02:00
dundargoc
f15c745502
chore: PVS/V751: ignore warning #15153
There's already an ignore directive but it's placed on the wrong line.
This commit should correct it.
2021-07-25 10:19:56 -07:00
Rishabh Dwivedi
53f70bb183
chore: added ccls-cache in .gitignore (#15175) 2021-07-25 19:12:07 +02:00
Thomas Vigouroux
3a34f59ae8
Merge pull request #14347 from theHamsta/list_directives
treesitter: add query.list_directives
2021-07-25 16:49:22 +02:00
dundargoc
bebca7bbeb
chore: update LSP bug report with Github issue forms (#15159) 2021-07-25 16:07:20 +02:00
dundargoc
1aef6297b3
chore: update feature request template by using Github issue forms. (#15158) 2021-07-25 16:06:19 +02:00
dundargoc
e5f3abfd17
chore: update bug report template by using Github's new issue forms (#15152) 2021-07-25 16:05:11 +02:00
Björn Linse
a8f00e39ba
Merge pull request #15178 from gpanders/master
fix: source syncolors.vim after startup scripts
2021-07-25 15:36:04 +02:00
Stephan Seitz
289c153d1f doc: group documentation of predicates and directives 2021-07-24 20:57:45 +02:00
Stephan Seitz
b2a9afef6d treesitter: add query.list_directives 2021-07-24 20:57:45 +02:00
Gregory Anders
860aedd06b fix: source syncolors.vim after startup scripts
This fixes an issue introduced in #14771 (fix: source syncolors.vim
before startup scripts) that affected highlights for users who set
'background' to light in their startup script. Because syncolor.vim
checks for the value of &background, it was always setting up the 'dark'
background colors, which looked wrong for users using light backgrounds.

The primary benefit of #14771 is that it decoupled highlighting from the
syntax engine. This is useful for e.g. treesitter, which still makes use
of highlights even if the syntax engine is disabled. For this reason, it
is still worthwhile to source syncolor.vim separately from synload.vim,
which #14771 accomplishes. However, we should still source syncolor.vim
after the user startup scripts, to ensure that we are respecting the
options the user sets.

Another corollary benefit is that this reduces some redundancy in
highlight definitions, since we now only source syncolors.vim if the
user did not already enable a colorscheme.
2021-07-24 10:28:16 -06:00
Björn Linse
46009499af
Merge pull request #15169 from bfredl/freebsdfail
fix(ci): disable broken test on openbsd also on freebsd
2021-07-24 13:18:38 +02:00
Björn Linse
13db912e51 fix(ci): lower timeout to 45 minutes (from default 360 mins) 2021-07-24 10:23:15 +02:00
Björn Linse
a3e2636afd fix(ci): disable broken test on openbsd on all CI due to resource constraints 2021-07-23 19:35:32 +02:00
matveyt
8ce0929418 Remove EXMODE_NORMAL 2021-07-23 18:08:40 +02:00
Björn Linse
754ac5a834
Merge pull request #15114 from theHamsta/treesitter-hl-priority
feat(treesitter): allow to set highlight priority for queries
2021-07-23 17:56:16 +02:00
Stephan Seitz
5ea6cc1d75 docs(tree-sitter): document highlight priority 2021-07-22 21:38:57 +02:00
Stephan Seitz
242608e669 feat(treesitter): allow to set highlight priority for queries 2021-07-22 21:38:57 +02:00
Marc Jakobi
a8c3d50fad
lsp: add vim.lsp.diagnostic.set_qflist() function (#14831)
* Add vim.lsp.diagnostic.set_qflist() function
* replaces opts.open_loclist with unified opts.open
2021-07-22 08:48:28 -07:00
Björn Linse
ea35584bac
Merge pull request #14771 from gpanders/colorscheme
fix: source syncolors.vim before startup scripts
2021-07-22 14:10:56 +02:00
Christian Clason
6f48c018b5
Revert "fix(ci): remove mongodb from brew to avoid brew upgrade error (#15115)" (#15141)
This reverts commit 5377b2b00a.

(Fix no longer needed.)
2021-07-20 23:30:32 +02:00
sim
710b9ed1c7
lsp(start_client): Allow passing custom workspaceFolders to the LSP (#15132)
Some language servers *cough*rust-analyzer*cough* need an empty/custom
workspaceFolders for certain usecases. For example, rust-analyzer
needs an empty workspaceFolders table for standalone file support
(See https://github.com/rust-analyzer/rust-analyzer/pull/8955).

This can also be useful for other languages that need to commonly
open a certain directory (like flutter or lua), which would help
prevent spinning up a new language server altogether.

In case no workspaceFolders are passed, we fallback to what we had
before.
2021-07-20 22:00:38 +02:00
Thomas Vigouroux
2475161def
Merge pull request #15135 from neovim/marvim/api-doc-update/master
docs: regenerate
2021-07-19 23:35:35 +02:00
marvim
823412eda9 docs: regenerate 2021-07-19 21:24:46 +00:00
Folke Lemaitre
9358aa04c4
docs: made can_merge private (#15138) 2021-07-19 14:23:28 -07:00
Gregory Anders
4ed2d4fd66
fix(lsp): allow diagnostic.clear to accept nil bufnr (#15137)
Passing `nil` is equivalent to passing 0, i.e. it simply uses the
current buffer number.

This fixes a bug when vim.lsp.diagnostic.disable() is called without
arguments.
2021-07-19 14:23:12 -07:00
Björn Linse
223c355040
Merge pull request #15127 from bfredl/nlua_init
refactor(lua): initialize lua state at startup instead of dynamically
2021-07-19 22:27:55 +02:00
Gregory Anders
1aeb945553
feat(lsp): allow diagnostics to be disabled for a buffer (#15134)
Add two new methods to allow diagnostics to be disabled (and re-enabled)
in the current buffer. When diagnostics are disabled they are simply not
displayed to the user, but they are still sent by the server and
processed by the client.

Disabling diagnostics can be helpful in a number of scenarios. For
example, if one is working on a buffer with an overwhelming amount of
diagnostic warnings it can be helpful to simply disable diagnostics
without disabling the LSP client entirely. This also allows users more
flexibility on when and how they may want diagnostic information to be
displayed. For example, some users may not want to display diagnostic
information until after the buffer is first written.
2021-07-19 11:49:55 -07:00
rayx
c487a73fa2
feat(lsp): allow configuring zindex for floating windows (#15086) 2021-07-19 09:03:59 -07:00
Folke Lemaitre
526fc609b8
fix(shared): do not treat empty tables as list in deep extend (#15094)
An empty table was previously always treated as a list, which means that
while merging tables, whenever an empty table was encountered it would
  always truncate any table on the left.

`vim.tbl_deep_extend("force", { b = { a = 1 } }, { b = {} })`

Before: `{ b = {} }`
After: `{ b = { a = 1 } }`
2021-07-19 08:52:44 -07:00
James McCoy
3b2a85ff76
Merge pull request #15070 from dundargoc/PVS/V768
[RDY] chore(PVS/V768): don't use enum as bool.
2021-07-19 11:29:09 -04:00
Björn Linse
e877eccafd refactor(lua): initialize lua state at startup instead of dynamically
lua is used as part of implementation for more core features. As an
example, every user keypress will invoke a lua function to check for
keypress handlers (regardless if they are registered or not). Thus not
starting lua until it is first used doesn't make much sense anymore.

nlua_enter was also needed due to the earlier stateful &rtp
translation, which by now have been made stateless.
2021-07-19 16:12:39 +02:00
Dundar Göc
192c21ccde chore(PVS/V768): don't use enum as bool. 2021-07-19 14:42:39 +02:00
James McCoy
bfb04812d5
Merge pull request #15073 from dundargoc/PVS/V751
[RDY] chore(PVS/V751): tui.c, Parameter is not used
2021-07-18 13:39:20 -04:00
James McCoy
d9be6ba796
Merge pull request #15110 from dundargoc/PVS/V1042
[RDY] chore: PVS/V1042 - ignore warning globally.
2021-07-18 13:36:23 -04:00
Justin M. Keyes
6f9e219f60 chore(PVS/V751): tui.c, Parameter is not used
False positive. Documentation for grid_scroll says "`cols` is always
zero, reserved for future use".
2021-07-18 11:47:09 +02:00
Folke Lemaitre
c36df20aef
feat: aggregate code actions from all clients (#15121) 2021-07-18 01:58:35 -07:00
Dundar Göc
9f6989d551 chore: PVS/V1042 - ignore warning globally.
V1042 is a warning that a file has a copyleft license, which is an
irrelevant warning to open-source projects.
2021-07-17 17:27:17 +02:00
Oliver Marriott
5377b2b00a
fix(ci): remove mongodb from brew to avoid brew upgrade error (#15115)
macOS CI was failing because:

- brew upgrade fails because,
- mongodb-community cant upgrade because,
- some symlinks are owned by ...  mongodb-community...

We don't use mogodb, so we can just remove it wholesale.
2021-07-17 16:59:39 +02:00
Ido Ariel
d8f5f4d090
doc(lsp): various small fixes (#15113)
- remove incorrect usage of docstrings
- fix make_formatting_params return type documentation to 'DocumentFormattingParams'
- make progress_handler private
- fix links
2021-07-17 11:15:57 +02:00
Gregory Anders
0bcf96bf0b fix: source syncolors.vim before startup scripts
This fixes an issue (#12573) where colorscheme files are sourced twice
upon startup. This occurs when the startup script calls `:colorscheme`,
which sets the `g:colors_name` global variable. When syntax highlighting
is enabled in `syn_maybe_enable()` the `syntax.vim` script is sourced
which in turn sources `synload.vim`. This script checks to see if
`g:colors_name` is set and, if so, runs

    exe "colors " . colors_name

This is done to ensure that highlight groups are defined before enabling
the syntax highlighting engine.

Instead, source syncolors.vim before the startup scripts which sets up
default highlights and only load the full syntax engine after
the startup scripts or when the user runs `:syntax on`. Add a guard
variable `did_syncolor` to prevent syncolor.vim from being sourced
twice and remove the line mentioned above from synload.vim so that
the colorscheme file is not re-sourced when the syntax engine is loaded.
2021-07-14 20:51:36 -06:00
Björn Linse
682247b52e
Merge pull request #15078 from bfredl/p_vim_vi
refactor(options): remove obsolete distinction of "vi" vs "vim" defaults
2021-07-14 22:21:57 +02:00
Björn Linse
f0cc3a9480 refactor(options): remove obsolete distinction of "vi" vs "vim" defaults
It might come as a schocking surprise, but the defaults we support
are the NEOVIM defaults.
2021-07-14 21:54:19 +02:00
Michael Lingelbach
19a2e59f7e
Merge pull request #15017 from donbex/local-file-uri
fix(lsp): accept file URIs without a hostname
2021-07-14 12:20:13 -07:00
Björn Linse
fc869da6dc refactor(options): delet unused P_VIM flag 2021-07-14 21:06:07 +02:00
Michael Lingelbach
c31bc6ea73
fix(lsp): pass bufnr for async formatting (#15084)
the `textDocument/rangeFormatting` nad `textDocument/formatting` did not
pass bufnr to apply_text_edits, meaning edits were applied to
the user's currently active buffer. This could result in text being
applied to the wrong buffer.
2021-07-14 09:15:43 -07:00
Björn Linse
02bf251bb3
Merge pull request #14812 from gpanders/stdin_closed
feat(job): add parameter to close stdin
2021-07-13 20:51:46 +02:00
Gregory Anders
f83763b261 Add test case for 'null' stdin mode 2021-07-12 13:22:56 -06:00