mirror of
https://github.com/neovim/neovim.git
synced 2025-09-03 18:08:16 +00:00
Compare commits
6 Commits
047da25d1c
...
b4a609e158
Author | SHA1 | Date | |
---|---|---|---|
![]() |
b4a609e158 | ||
![]() |
6a330f893b | ||
![]() |
1b3abfa688 | ||
![]() |
c333d64663 | ||
![]() |
b3d29f396d | ||
![]() |
0c0ef489f9 |
@@ -162,7 +162,7 @@ order of increasing priority:
|
||||
|
||||
1. Configuration defined for the `'*'` name.
|
||||
2. Configuration from the result of merging all tables returned by
|
||||
`lsp/<name>.lua` files in 'runtimepath' for a server of name `name`.
|
||||
`lsp/<config>.lua` files in 'runtimepath' for the config named `<config>`.
|
||||
3. Configurations defined anywhere else.
|
||||
|
||||
Example: given the following configs... >lua
|
||||
@@ -280,6 +280,12 @@ FAQ *lsp-faq*
|
||||
" (async = false is the default for format)
|
||||
autocmd BufWritePre *.rs lua vim.lsp.buf.format({ async = false })
|
||||
<
|
||||
|
||||
- Q: How to avoid my own lsp/ folder being overridden?
|
||||
- A: Place your configs under "after/lsp/". Files in "after/lsp/" are loaded
|
||||
after those in "nvim/lsp/", so your settings will take precedence over
|
||||
the defaults provided by nvim-lspconfig. See also: |after-directory|
|
||||
|
||||
*lsp-vs-treesitter*
|
||||
- Q: How do LSP, Treesitter and Ctags compare?
|
||||
- A: LSP requires a client and language server. The language server uses
|
||||
|
@@ -1392,6 +1392,8 @@ local extension = {
|
||||
yaml = 'yaml',
|
||||
eyaml = 'yaml',
|
||||
mplstyle = 'yaml',
|
||||
kyaml = 'yaml',
|
||||
kyml = 'yaml',
|
||||
grc = detect_line1('<%?xml', 'xml', 'yaml'),
|
||||
yang = 'yang',
|
||||
yuck = 'yuck',
|
||||
|
@@ -332,7 +332,7 @@ void nvim_feedkeys(String keys, String mode, Boolean escape_ks)
|
||||
if (!dangerous) {
|
||||
ex_normal_busy++;
|
||||
}
|
||||
exec_normal(true);
|
||||
exec_normal(true, lowlevel);
|
||||
if (!dangerous) {
|
||||
ex_normal_busy--;
|
||||
}
|
||||
|
@@ -7072,21 +7072,26 @@ void exec_normal_cmd(char *cmd, int remap, bool silent)
|
||||
{
|
||||
// Stuff the argument into the typeahead buffer.
|
||||
ins_typebuf(cmd, remap, 0, true, silent);
|
||||
exec_normal(false);
|
||||
exec_normal(false, false);
|
||||
}
|
||||
|
||||
/// Execute normal_cmd() until there is no typeahead left.
|
||||
///
|
||||
/// @param was_typed whether or not something was typed
|
||||
void exec_normal(bool was_typed)
|
||||
/// @param use_vpeekc true to use vpeekc() to check for available chars
|
||||
void exec_normal(bool was_typed, bool use_vpeekc)
|
||||
{
|
||||
oparg_T oa;
|
||||
int c;
|
||||
|
||||
// When calling vpeekc() from feedkeys() it will return Ctrl_C when there
|
||||
// is nothing to get, so also check for Ctrl_C.
|
||||
clear_oparg(&oa);
|
||||
finish_op = false;
|
||||
while ((!stuff_empty()
|
||||
|| ((was_typed || !typebuf_typed())
|
||||
&& typebuf.tb_len > 0))
|
||||
&& typebuf.tb_len > 0)
|
||||
|| (use_vpeekc && (c = vpeekc()) != NUL && c != Ctrl_C))
|
||||
&& !got_int) {
|
||||
update_topline_cursor();
|
||||
normal_cmd(&oa, true); // execute a Normal mode cmd
|
||||
|
@@ -1496,7 +1496,7 @@ int typval_exec_lua_callable(LuaRef lua_cb, int argcount, typval_T *argvars, typ
|
||||
PUSH_ALL_TYPVALS(lstate, argvars, argcount, false);
|
||||
|
||||
if (nlua_pcall(lstate, argcount, 1)) {
|
||||
nlua_print(lstate);
|
||||
nlua_error(lstate, _("Lua callback: %.*s"));
|
||||
return FCERR_OTHER;
|
||||
}
|
||||
|
||||
|
@@ -863,7 +863,7 @@ void free_all_mem(void)
|
||||
|
||||
// Close all tabs and windows. Reset 'equalalways' to avoid redraws.
|
||||
p_ea = false;
|
||||
if (first_tabpage->tp_next != NULL) {
|
||||
if (first_tabpage != NULL && first_tabpage->tp_next != NULL) {
|
||||
do_cmdline_cmd("tabonly!");
|
||||
}
|
||||
|
||||
@@ -873,18 +873,20 @@ void free_all_mem(void)
|
||||
// Clear user commands (before deleting buffers).
|
||||
ex_comclear(NULL);
|
||||
|
||||
// Clear menus.
|
||||
do_cmdline_cmd("aunmenu *");
|
||||
do_cmdline_cmd("tlunmenu *");
|
||||
do_cmdline_cmd("menutranslate clear");
|
||||
if (curbuf != NULL) {
|
||||
// Clear menus.
|
||||
do_cmdline_cmd("aunmenu *");
|
||||
do_cmdline_cmd("tlunmenu *");
|
||||
do_cmdline_cmd("menutranslate clear");
|
||||
|
||||
// Clear mappings, abbreviations, breakpoints.
|
||||
// NB: curbuf not used with local=false arg
|
||||
map_clear_mode(curbuf, MAP_ALL_MODES, false, false);
|
||||
map_clear_mode(curbuf, MAP_ALL_MODES, false, true);
|
||||
do_cmdline_cmd("breakdel *");
|
||||
do_cmdline_cmd("profdel *");
|
||||
do_cmdline_cmd("set keymap=");
|
||||
// Clear mappings, abbreviations, breakpoints.
|
||||
// NB: curbuf not used with local=false arg
|
||||
map_clear_mode(curbuf, MAP_ALL_MODES, false, false);
|
||||
map_clear_mode(curbuf, MAP_ALL_MODES, false, true);
|
||||
do_cmdline_cmd("breakdel *");
|
||||
do_cmdline_cmd("profdel *");
|
||||
do_cmdline_cmd("set keymap=");
|
||||
}
|
||||
|
||||
free_titles();
|
||||
free_findfile();
|
||||
@@ -905,7 +907,9 @@ void free_all_mem(void)
|
||||
free_cd_dir();
|
||||
free_signs();
|
||||
set_expr_line(NULL);
|
||||
diff_clear(curtab);
|
||||
if (curtab != NULL) {
|
||||
diff_clear(curtab);
|
||||
}
|
||||
clear_sb_text(true); // free any scrollback text
|
||||
|
||||
// Free some global vars.
|
||||
@@ -922,8 +926,10 @@ void free_all_mem(void)
|
||||
// Close all script inputs.
|
||||
close_all_scripts();
|
||||
|
||||
// Destroy all windows. Must come before freeing buffers.
|
||||
win_free_all();
|
||||
if (curwin != NULL) {
|
||||
// Destroy all windows. Must come before freeing buffers.
|
||||
win_free_all();
|
||||
}
|
||||
|
||||
// Free all option values. Must come after closing windows.
|
||||
free_all_options();
|
||||
@@ -957,8 +963,10 @@ void free_all_mem(void)
|
||||
|
||||
reset_last_sourcing();
|
||||
|
||||
free_tabpage(first_tabpage);
|
||||
first_tabpage = NULL;
|
||||
if (first_tabpage != NULL) {
|
||||
free_tabpage(first_tabpage);
|
||||
first_tabpage = NULL;
|
||||
}
|
||||
|
||||
// message history
|
||||
msg_hist_clear(0);
|
||||
|
@@ -2453,7 +2453,9 @@ static bool found_tagfile_cb(int num_fnames, char **fnames, bool all, void *cook
|
||||
void free_tag_stuff(void)
|
||||
{
|
||||
ga_clear_strings(&tag_fnames);
|
||||
do_tag(NULL, DT_FREE, 0, 0, 0);
|
||||
if (curwin != NULL) {
|
||||
do_tag(NULL, DT_FREE, 0, 0, 0);
|
||||
}
|
||||
tag_freematch();
|
||||
|
||||
tagstack_clear_entry(&ptag_entry);
|
||||
|
@@ -1053,7 +1053,9 @@ theend:
|
||||
void ex_comclear(exarg_T *eap)
|
||||
{
|
||||
uc_clear(&ucmds);
|
||||
uc_clear(&curbuf->b_ucmds);
|
||||
if (curbuf != NULL) {
|
||||
uc_clear(&curbuf->b_ucmds);
|
||||
}
|
||||
}
|
||||
|
||||
void free_ucmd(ucmd_T *cmd)
|
||||
|
@@ -110,7 +110,7 @@ static const int included_patches[] = {
|
||||
2374,
|
||||
2373,
|
||||
2372,
|
||||
// 2371,
|
||||
2371,
|
||||
2370,
|
||||
2369,
|
||||
2368,
|
||||
@@ -1222,7 +1222,7 @@ static const int included_patches[] = {
|
||||
1262,
|
||||
1261,
|
||||
1260,
|
||||
// 1259,
|
||||
1259,
|
||||
1258,
|
||||
1257,
|
||||
1256,
|
||||
@@ -1345,7 +1345,7 @@ static const int included_patches[] = {
|
||||
1139,
|
||||
1138,
|
||||
1137,
|
||||
// 1136,
|
||||
1136,
|
||||
1135,
|
||||
1134,
|
||||
1133,
|
||||
|
@@ -16,6 +16,7 @@ local feed = n.feed
|
||||
local assert_alive = n.assert_alive
|
||||
local NIL = vim.NIL
|
||||
local eq = t.eq
|
||||
local matches = t.matches
|
||||
|
||||
before_each(clear)
|
||||
|
||||
@@ -289,6 +290,8 @@ describe('luaeval()', function()
|
||||
return true
|
||||
]]
|
||||
)
|
||||
-- v:errmsg is set properly #35554
|
||||
matches(': dead function\n', api.nvim_get_vvar('errmsg'))
|
||||
end)
|
||||
|
||||
it('should handle passing functions around', function()
|
||||
|
@@ -927,7 +927,7 @@ func s:GetFilenameChecks() abort
|
||||
\ 'xsd': ['file.xsd'],
|
||||
\ 'xslt': ['file.xsl', 'file.xslt'],
|
||||
\ 'yacc': ['file.yy', 'file.yxx', 'file.y++'],
|
||||
\ 'yaml': ['file.yaml', 'file.yml', 'file.eyaml', 'any/.bundle/config', '.clangd', '.clang-format', '.clang-tidy', 'file.mplstyle', 'matplotlibrc', 'yarn.lock',
|
||||
\ 'yaml': ['file.yaml', 'file.yml', 'file.eyaml', 'file.kyaml', 'file.kyml', 'any/.bundle/config', '.clangd', '.clang-format', '.clang-tidy', 'file.mplstyle', 'matplotlibrc', 'yarn.lock',
|
||||
\ '/home/user/.kube/config', '.condarc', 'condarc', 'pixi.lock'],
|
||||
\ 'yang': ['file.yang'],
|
||||
\ 'yuck': ['file.yuck'],
|
||||
|
Reference in New Issue
Block a user