aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/main.c
Commit message (Collapse)AuthorAge
* fix(startup): init.lua: set $MYVIMRC to absolute path #15748Justin M. Keyes2021-09-21
| | | | | | - main.c: remove os_setenv("MYVIMRC",…), it is already done by do_source(). - This also sets $MYVIMRC to a full (absolute) path. - code cleanup.
* refactor(runtime): always use DIP_START when searching for runtime filesBjörn Linse2021-09-18
| | | | | | | | Now remove the addition of "start/*" packages in 'packpath' as explicit items in 'runtimepath'. This avoids 'runtimepath' from becoming very long when using a lot of plugins as packages. To get the effective search path as a list, use |nvim_list_runtime_paths()|
* refactor: replace TRUE/FALSE with true/false #15647dundargoc2021-09-13
|
* docs: naming conventionsJustin M. Keyes2021-09-09
|
* feat(defaults): limit syntax cost on CmdwinEnter #15401Gregory Anders2021-09-02
| | | | | | | | | Add a new default autocommand to limit syntax highlighting synchronization in the command window. This refactors the nvim_terminal autocommand out of main() and into a new init_default_autocmds() function, which is now part of the startup process and can be further extended with more default autocommands down the road. ref #6289 #6399
* refactor(api): remove unneccesary indirection around handlesBjörn Linse2021-08-22
| | | | | These things are just maps to pointers, no need to perform a huge song and dance around it.
* refactor(map): get rid of spurious subsystem_init() functions due to mapsBjörn Linse2021-08-22
|
* refactor(syntax): don't use pointer indirected maps for no reasonBjörn Linse2021-08-22
|
* perf(highlight): use a hashtable for highlight group namesBjörn Linse2021-08-19
| | | | | | | | syn_name2id and syn_check_group go brr. Note: this has impact mostly when using multiple filetypes, as the old syn_name2id was optimized to return latest added groups quickly (which will be the latest filetype)
* feat(defaults): map Y to y$ #13268Matthieu Coudron2021-08-15
| | | | | | | | | rationale: - consistent with D and Y - long recommended by Vim's own ":help Y" close #13268 close #416 ref #6289
* Merge pull request #15206 from ↵Björn Linse2021-07-30
|\ | | | | | | | | dundargoc/refactor/a-song-of-true-and-false/global-variables-2 refactor: replace TRUE/FALSE with true/false
| * refactor: replace TRUE/FALSE with true/falseDundar Göc2021-07-30
| |
* | fix(highlight): remove syncolor.vimGregory Anders2021-07-27
|/ | | | | | | | | | | | | | | | | | | Remove syncolor.vim in favor of defining the default highlight groups directly in `init_highlight`. This approach provides a number of advantages: 1. The highlights are always defined, regardless of whether or not the syntax regex engine is enabled. 2. Redundant sourcing of syntax files is eliminated (syncolor.vim was often sourced multiple times based on how the user's colorscheme file was written). 3. The syntax highlighting regex engine and the highlight groups themselves are more fully decoupled. 4. Removal of the confusing `:syntax on` / `:syntax enable` dichotomy (they now both do the same thing). This approach also correctly solves a number of bugs related to highlighting (#15176, #12573, #15205).
* refactor: replace TRUE/FALSE with true/falseDundar Göc2021-07-26
| | | | Focus is on global variables.
* Merge pull request #14311 from matveyt/nomode_ceBjörn Linse2021-07-25
|\ | | | | refactor(state): Remove EXMODE_NORMAL
| * Remove EXMODE_NORMALmatveyt2021-07-23
| |
* | fix: source syncolors.vim after startup scriptsGregory Anders2021-07-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Merge pull request #14771 from gpanders/colorschemeBjörn Linse2021-07-22
|\ \ | |/ |/| fix: source syncolors.vim before startup scripts
| * fix: source syncolors.vim before startup scriptsGregory Anders2021-07-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | refactor(lua): initialize lua state at startup instead of dynamicallyBjörn Linse2021-07-19
|/ | | | | | | | | | 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.
* buffer: move BUFEMPTY to a functionThomas Vigouroux2021-07-06
|
* buffer: don't rely on curbuf in BUFEMPTYThomas Vigouroux2021-07-06
|
* doc/startup: cleanup; assign ENN to "conflicing configs" msg (#14971)Justin M. Keyes2021-07-03
|
* refactor(startup): Load init.lua with do_sorceshadmansaleh2021-06-13
| | | | This was init.lua will be logged in startuptime
* refactor(source): Move lua file detection to do_sourceshadmansaleh2021-06-11
| | | | | | So now :source can run lua files too :) * feat: Add support for :[ranged]source for lua files
* feat(startup): Source runtime/plugin/**/*.lua at startupshadmansaleh2021-06-11
| | | | | | For opt plugins these files are sourced on `:packadd` * `:runtime` Now can exexute lua files
* startup: do "syntax enable" instead of "syntax on"Björn Linse2021-04-30
| | | | | | | | "syntax on" overwrites existing highlight groups, while "syntax enable" just sets missing groups. This change prevents user defined highlights in init.vim/lua to get overwritten. The manual recommends "syntax enable" for new configurations anyway, "on" command was probably used as it is the implicit default.
* option: use char* for set_string_option_direct()Jan Edmund Lazo2021-02-07
| | | | | | | "name" param was cast to (const char *). All calls to set_string_option_direct() cast 1st arg from (char *) to (char_u *). Remove these useless casts.
* remove -Z entry from --helpsrafi12021-01-15
|
* Revert "vim-patch:8.1.1192: mode is not cleared when leaving Insert mode ↵Jan Edmund Lazo2020-12-31
| | | | | | | | with mapped Esc" This reverts commit 44bb7147e40743d9a70ee3a2663a7a7dacec7b13. Avoid regression mentioned in https://github.com/neovim/neovim/commit/c64cce906e7ed828d331e1786c985ff7aa734546#commitcomment-45554271
* vim-patch:8.1.1192: mode is not cleared when leaving Insert mode with mapped EscJan Edmund Lazo2020-12-26
| | | | | | Problem: Mode is not cleared when leaving Insert mode with mapped Esc. Solution: Clear the mode when redraw_cmdline is set. (closes vim/vim#4269) https://github.com/vim/vim/commit/4c25bd785aa8b565bf973cbba12ed36b76daaa4f
* Merge pull request #13595 from teto/fix-fillerBjörn Linse2020-12-24
|\ | | | | de curwinify some functions
| * refactor: de-curwin-ify update_topline/curs_columnsMatthieu Coudron2020-12-23
| |
* | vim-patch:8.2.0769: VimLeavePre not triggered when Vim is terminatedJan Edmund Lazo2020-12-22
| | | | | | | | | | | | Problem: VimLeavePre not triggered when Vim is terminated. Solution: Unblock autocommands. https://github.com/vim/vim/commit/129d6bf6b3d120b0a4c69e18b5e8602a84e352bf
* | vim-patch:8.1.1872: when Vim exits because of a signal, VimLeave is not ↵Jan Edmund Lazo2020-12-20
|/ | | | | | | | | triggered Problem: When Vim exits because of a signal, VimLeave is not triggered. (Daniel Hahler) Solution: Unblock autocommands when triggering VimLeave. (closes vim/vim#4818) https://github.com/vim/vim/commit/c7226684c82dde7eb6601e067ee2e9387e447903
* vim-patch:8.2.0047: cannot skip tests for specific MS-Windows platform (#13461)Jan Edmund Lazo2020-12-11
| | | | | Problem: Cannot skip tests for specific MS-Windows platform. Solution: Add windowsversion(). https://github.com/vim/vim/commit/0c1e3744ff0cd6c17af773046b876b428ff3dded
* vim-patch:8.2.1833: when reading from stdin dup() is called twice (#13498)Jan Edmund Lazo2020-12-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: When reading from stdin dup() is called twice. Solution: Remove the dup() in main.c. (Ken Takata, closes vim/vim#7110) https://github.com/vim/vim/commit/204ade6bcb85f48f56e52e040d1ebf40548d92be N/A patches for version.c: vim-patch:8.2.2109: "vim -" does not work well when modifyOtherKeys is enabled Problem: "vim -" does not work well when modifyOtherKeys is enabled and a shell command is executed on startup. Solution: Only change modifyOtherKeys when executing a shell command in raw mode. https://github.com/vim/vim/commit/8a3da6a368ca7e761939366e355528bccb6dffa3 vim-patch:8.2.2110: cannot use ":shell" when reading from stdin Problem: Cannot use ":shell" when reading from stdin. (Gary Johnson) Solution: Revert patch 8.2.1833. https://github.com/vim/vim/commit/8e1cbb55c389bdc4eade7a67309d5042fbcdca7d vim-patch:8.2.2111: GTK: menu background is the same color as the main window Problem: GTK: Menu background is the same color as the main window. Solution: Fix white space around the test in another way. (closes vim/vim#7437, closes vim/vim#7427) https://github.com/vim/vim/commit/023fd5d21323fe6dffa080bd20c4d39e1212d353 vim-patch:8.2.2113: MS-Windows GUI: crash after using ":set guifont=" four times Problem: MS-Windows GUI: crash after using ":set guifont=" four times. Solution: Check for NULL pointer. (Ken Takata, closes vim/vim#7434) https://github.com/vim/vim/commit/1b3e0727ce86ca4cfa47f8b5421d82ed47a9bec1 vim-patch:8.2.2116: MS-Windows GUI: test for 'guifont' is incomplete Problem: MS-Windows GUI: test for 'guifont' is incomplete. Solution: Set 'renderoptions'. (Christian Brabandt) https://github.com/vim/vim/commit/2c78a772fdb5f6a16d16a47e7f218051c4dcb845 vim-patch:8.2.2118: dead code in the job support Problem: Dead code in the job support. (Dominique Pellé) Solution: Define USE_ARGV before checking for it. https://github.com/vim/vim/commit/f46bf5204c3c55d23921b501db21a906d526eb45 vim-patch:8.2.2119: GTK3: status line background color is wrong Problem: GTK3: status line background color is wrong. Solution: Don't change the code for earlier GTK3 versions. (closes vim/vim#7444) https://github.com/vim/vim/commit/7988a6f0e9999d1103271024ab4ed26e5599de17
* executor: use new nlua_ name patternBjörn Linse2020-12-01
|
* startup: allow lua files as session onedm1try2020-12-01
|
* startup: add init.lua as an alternative user config, fixes #7895dm1try2020-12-01
|
* vim-patch:8.2.2059: Amiga: can't find pluginsJan Edmund Lazo2020-11-27
| | | | | | Problem: Amiga: can't find plugins. Solution: Do not use "**" in the pattern. (Ola Söder, closes vim/vim#7384) https://github.com/vim/vim/commit/6ee874d378829b62e0944063a9a029e81b5debfb
* globals: eliminate "has_mbyte" macroJan Edmund Lazo2020-11-14
| | | | | "has_mbyte" always evaluates to "true". Continue dead code removal, started in https://github.com/neovim/neovim/pull/13275.
* Removed restricted mode - Fix #11972georg3tom2020-11-11
|
* decoration: split out "decoration" from "extmark" moduleBjörn Linse2020-11-07
| | | | | Decorations will only grow more complex. move the to a separate file, so that extmark.c remains about extmarks.
* api: add API for themesBjörn Linse2020-11-01
| | | | | | | | | | co-author: hlpr98 <hlpr98@gmail.com> (dict2hlattrs function) orange is sus?? NOVEMBER DAWN erase the lie that is redraw_later()
* luahl: global the luahlBjörn Linse2020-09-13
|
* decor: sketch new decorations APIBjörn Linse2020-09-03
| | | | | | | | return decorations back lol no nvim_buf_get_virtual_text share decorations that are hl only to avoid alloc avalanche
* startup: fix stall issue with -D options (#12652)erw72020-07-19
| | | fixes #12647.
* main.c: fix hang issue with recoverymode (#12496)erw72020-06-22
| | | | | In the case of recoverymode, the headlessmode was true, causing the UI to hang without starting. Fix this problem by setting headlessmode to true for List swap files only.
* vim-patch:8.0.1554: custom plugins loaded with --cleanJan Edmund Lazo2020-06-18
| | | | | | Problem: Custom plugins loaded with --clean. Solution: Do not include the home directory in 'runtimepath'. https://github.com/vim/vim/commit/072687032683b1994d25a114893d9a6f8bc36612