aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/main.c
Commit message (Collapse)AuthorAge
...
* refactor: enable filetype detection before user startup scripts (#17040)Gregory Anders2022-01-17
|
* refactor(misc1): move out high-level input functions to a new file: input.cBjörn Linse2021-12-10
| | | | | Possibly dialog code is messages.c could be moved here as well. misc1.c is now empty, so delete it.
* refactor(misc1): move preserve_exit() to related functions in main.cBjörn Linse2021-12-09
|
* fix: remove double slash in sysinit pathglacambre2021-11-03
| | | | Closes https://github.com/neovim/neovim/issues/13187 .
* vim-patch:8.1.0743: giving error messages is not flexibleJames McCoy2021-11-01
| | | | | | | | | Problem: Giving error messages is not flexible. Solution: Add semsg(). Change argument from "char_u *" to "char *", also for msg() and get rid of most MSG macros. (Ozaki Kiichi, closes vim/vim#3302) Also make emsg() accept a "char *" argument. Get rid of an enormous number of type casts. https://github.com/vim/vim/commit/f9e3e09fdc93be9f0d47afbc6c7df1188c2a5a0d
* refactor: saner options for uncrustify #16196dundargoc2021-10-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * refactor: general good option changes sp_deref = remove sp_not = remove sp_inv = remove sp_inside_paren_cast = remove mod_remove_duplicate_include = true sp_after_semi = add sp_after_semi_for = force sp_sizeof_paren = remove nl_return_expr = remove nl_else_brace = remove nl_else_if = remove * refactor: mod_remove_extra_semicolon = true * refactor: nl_max = 3 * refactor: sp_bool = force * refactor: sp_compare = force * refactor: sp_inside_paren = remove * refactor: sp_paren_paren = remove * refactor: sp_inside_sparen = remove * refactor: sp_before_sparen = force * refactor: sp_sign = remove * refactor: sp_addr = remove * refactor: sp_member = remove * refactor: nl_struct_brace = remove * refactor: nl_before_if_closing_paren = remove * refactor: nl_fdef_brace = force * refactor: sp_paren_comma = force * refactor: mod_full_brace_do = add
* refactor(api): move extmark API to its own fileBjörn Linse2021-10-25
|
* vim-patch:8.1.2388: using old C style commentsDundar Göc2021-10-21
| | | | | | Problem: Using old C style comments. Solution: Use // comments where appropriate. https://github.com/vim/vim/commit/4ba37b5833de99db9e9afe8928b31c864182405c
* Merge pull request #15930 from dundargoc/vim-patch/old-style-c-commentsJan Edmund Lazo2021-10-17
|\ | | | | vim-patch:8.1.2396,8.1.2395,8.1.2394,8.1.2392,8.1.2368,8.1.2388,8.1.2379
| * vim-patch:8.1.2388: using old C style commentsDundar Göc2021-10-06
| | | | | | | | | | | | Problem: Using old C style comments. Solution: Use // comments where appropriate. https://github.com/vim/vim/commit/4ba37b5833de99db9e9afe8928b31c864182405c
* | refactor: reduce number of unique char castsDundar Göc2021-10-13
|/
* feat(startup): load builtin plugins with --clean #15893Gregory Anders2021-10-04
| | | Closes #15605
* fix(runtime): add packages as "/pack/*/start/*" patterns to &rtpBjörn Linse2021-10-02
| | | | This makes `globpath(&rtp, ...)` work again for start packages
* refactor: format with uncrustify #15741dundargoc2021-09-22
|
* 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