| Commit message (Collapse) | Author | Age |
... | |
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* perf(rtp): reduce rtp scans
Problem:
Scanning the filesystem is expensive and particularly affects
startuptime.
Solution:
Reduce the amount of redundant directory scans by relying less on glob
patterns and handle vim and lua sourcing lower down.
|
|
|
|
|
| |
Problem: Bashslashes added as regexp in runtime completion may be
treated as path separator with some 'isfname' value.
Solution: Make curly braces work for runtime completion and use it.
|
|
|
|
| |
followup to #24109
fix #16150
|
|
|
|
|
|
|
|
| |
Removes the `getoption_T` struct and also introduces the `OptVal` struct
to unify the methods of getting/setting different option value types.
This is the first of many PRs to reduce code duplication in the Vim
option code as well as to make options easier to maintain. It also
increases the flexibility and extensibility of options. Which opens the
door for things like Array and Dictionary options.
|
| |
|
|
|
|
| |
Adds new API helper macros `CSTR_AS_OBJ()`, `STATIC_CSTR_AS_OBJ()`, and `STATIC_CSTR_TO_OBJ()`, which cleans up a lot of the current code. These macros will also be used extensively in the upcoming option refactor PRs because then API Objects will be used to get/set options. This PR also modifies pre-existing code to use old API helper macros like `CSTR_TO_OBJ()` to make them cleaner.
|
|\
| |
| | |
refactor(map): avoid duplicated khash_t implementations for values and support sets
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This reduces the total number of khash_t instantiations from 22 to 8.
Make the khash internal functions take the size of values as a runtime
parameter. This is abstracted with typesafe Map containers which
are still specialized for both key, value type.
Introduce `Set(key)` type for when there is no value.
Refactor shada.c to use Map/Set instead of khash directly.
This requires `map_ref` operation to be more flexible.
Return pointers to both key and value, plus an indicator for new_item.
As a bonus, `map_key` is now redundant.
Instead of Map(cstr_t, FileMarks), use a pointer map as the FileMarks struct is
humongous.
Make `event_strings` actually work like an intern pool instead of wtf it
was doing before.
|
|/
|
|
|
| |
Replace usage of STR{CPY,CAT} with xstrl{cpy,cat} when using on IObuff
Co-authored-by: ii14 <ii14@users.noreply.github.com>
|
|
|
|
|
|
| |
Problem: Some error messages are not marked for translation.
Solution: Surround the messages in _(). (closes vim/vim#12356)
https://github.com/vim/vim/commit/276410e78f0b82e3123059383994d2f4c578dfbd
|
|
|
|
|
|
|
| |
Problem: Handling new value of an option has a long "else if" chain.
Solution: Use a function pointer. (Yegappan Lakshmanan, closes vim/vim#12015)
https://github.com/vim/vim/commit/af93691b53f38784efce0b93fe7644c44a7e382e
|
|
|
|
| |
Notable changes: replace all infinite loops to `while(true)` and remove
`int` from `unsigned int`.
|
|
|
|
|
|
|
|
|
| |
problem: breakcheck might run arbitrary lua code, which might require
modules and thus invoke runtime path calculation recursively.
solution: Block the use of breakcheck when expanding glob patterns
inside 'runtimepath'
fixes #23012
|
| |
|
|
|
|
| |
It's for Vim9 script only.
|
|
|
|
|
|
|
|
| |
Problem: getscriptinfo() loops even when specific SID is given.
Solution: Only loop when needed. Give a clearer error message.
(closes vim/vim#12207)
https://github.com/vim/vim/commit/2d68b722e3bca7532eb0d83ce773934618f12db5
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: It is not easy to get information about a script.
Solution: Make getscriptinf() return the version. When selecting a specific
script return functions and variables. (Yegappan Lakshmanan,
closes vim/vim#10991)
https://github.com/vim/vim/commit/2f892d8663498c21296ad6661dac1bb8372cfd10
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: getscriptinfo() does not include the version. Cannot select
entries by script name.
Solution: Add the "version" item and the "name" argument. (Yegappan
Lakshmanan, closes vim/vim#10962)
https://github.com/vim/vim/commit/520f6ef60a59f7b5f3da9199999d13dbe817d3ce
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Problem: Crash when adding package already in 'runtimepath'.
Solution: Change order for using 'runtimepath' entries. (closes vim/vim#12215)
https://github.com/vim/vim/commit/39c9ec16ea7ef13c5d783481542ee9aa6c05282c
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: Autoload script sourced twice if sourced directly.
Solution: Do not source an autoload script again. (issue vim/vim#6644)
https://github.com/vim/vim/commit/daa2f36573db3e1df7eb1fdbc3a09a2815644048
Cherry-pick ret_sid changes from patch 8.2.0149.
Use do_in_runtimepath() as that's what source_runtime() calls in Nvim.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| |
|
|
|
| |
This the refactoring done in Vim patch 8.2.4050.
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: Cannot easily get the list of sourced scripts.
Solution: Add the getscriptinfo() function. (Yegappan Lakshmanan,
closes vim/vim#10957)
https://github.com/vim/vim/commit/f768c3d19c518822d89dec4cc3947ddeea249316
Cherry-pick usr_41.txt change from a later runtime update.
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
|
|
|
|
| |
This commit fixes an assertion failure on windows debug builds that was
introduced in https://github.com/neovim/neovim/pull/22128 .
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit implements the ability to control all of the XDG paths
Neovim should use. This is done by setting an environment variable named
NVIM_APPNAME. For example, setting $NVIM_APPNAME makes Neovim look for
its configuration directory in $XDG_CONFIG_HOME/$NVIM_APPNAME instead of
$XDG_CONFIG_HOME/nvim.
If NVIM_APPNAME is not set or is an empty string, "nvim" will be used as
default.
The usecase for this feature is to enable an easy way to switch from
configuration to configuration. One might argue that the various $XDG
environment variables can already be used for this usecase. However,
setting $XDG environment variables also affects tools spawned by Neovim.
For example, while setting $XDG_CONFIG_HOME will enable Neovim to use a
different configuration directory, it will also prevent Git from finding
its "default" configuration.
Closes https://github.com/neovim/neovim/issues/21691
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: Reallocating the list of scripts is inefficient.
Solution: Instead of using a growarray of scriptitem_T, store pointers and
allocate each scriptitem_T separately. Also avoids that the
growarray pointers change when sourcing a new script.
https://github.com/vim/vim/commit/21b9e9773d64de40994f8762173bdd8befa6acf7
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
|
|
|
|
|
|
|
|
|
| |
Problem: Info about sourced scripts is scattered.
Solution: Use scriptitem_T for info about a script, including s: variables.
Drop ga_scripts.
https://github.com/vim/vim/commit/7ebcba61b20d25d23109fff73d0346ad44ba1b3b
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
|
|
| |
refactor: reduce scope of locals as per the style guide
|
| |
|
|
|
|
|
|
|
|
| |
Problem: :runtime completion can be further improved.
Solution: Also complete the {where} argument values and adjust the
completion for that. (closes vim/vim#11874)
https://github.com/vim/vim/commit/5c8771bc5a2be123ab8e6325fa60ed524e8efb09
|
|
|
|
|
|
|
| |
Problem: Completion of :runtime does not handle {where} argument.
Solution: Parse the {where} argument. (closes vim/vim#11863)
https://github.com/vim/vim/commit/3770f4c9cde7b5fcd10b6fa2e665cd0b69450fb2
|
|
|
|
|
|
|
|
| |
Problem: No cmdline completion for :runtime.
Solution: Add completion for :runtime. (closes vim/vim#11853, closes vim/vim#11447)
Improve the resulting matches.
https://github.com/vim/vim/commit/a6759381a590b2d395e05b109ca9ccfc356be5a8
|
|
|
|
|
|
|
|
|
| |
Problem: Code is indented more than necessary.
Solution: Use an early return where it makes sense. (Yegappan Lakshmanan,
closes vim/vim#11858)
https://github.com/vim/vim/commit/6ec66660476562e643deceb7c325cd0e8c903663
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Test using the following test script (timings with ASAN):
let start = reltime()
for i in range(100)
call getcompletion('', 'filetype')
endfor
echomsg reltimefloat(reltime(start))
Without this PR: 3.251825 seconds
With this PR: 2.747285 seconds
|
|
|
|
| |
This just removes DIP_LUA and always executes its branches.
Also add tests for cmdline completion for other lua runtime files.
|
|
|
| |
Work on https://github.com/neovim/neovim/issues/459
|
|
|
|
|
|
|
|
|
|
| |
Problem: No completion for :scriptnames.
Solution: Implement :scriptnames completion. (Yegappan Lakshmanan,
closes vim/vim#10005)
https://github.com/vim/vim/commit/454ce6737cadb82886f1fc0eb9e8666cc59ae42b
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
|
|
|
| |
Also add the EXITFREE definition to main_lib rather than the nvim target, as the header generation needs the EXITFREE flag to work properly.
|
|
|
|
|
| |
refactor: replace char_u with char
Work on https://github.com/neovim/neovim/issues/459
|
|
|
|
|
| |
refactor: replace char_u with char
Work on https://github.com/neovim/neovim/issues/459
|
|
|
|
| |
Work on https://github.com/neovim/neovim/issues/459
|
|
|
|
| |
Work on https://github.com/neovim/neovim/issues/459
|
|
|
|
| |
Work on https://github.com/neovim/neovim/issues/459
|
|
|
|
|
| |
Now that 'exrc' files must be explicitly marked trusted there is no need
to constrain what can be done in them.
|