aboutsummaryrefslogtreecommitdiff
path: root/test/functional/options/defaults_spec.lua
Commit message (Collapse)AuthorAge
* feat: NVIM_APPNAME supports relative paths #25233Rory Nesbitt2023-09-27
| | | | | | | | | | | | | | Problem: NVIM_APPNAME does not allow path separators in the name, so relative paths can't be used: NVIM_APPNAME="neovim-configs/first-config" nvim NVIM_APPNAME="neovim-configs/second-config" nvim Solution: Let NVIM_APPNAME be a relative path. Absolute paths are not supported. fix #23056 fix #24966
* test(options/defaults_spec): fix NVIM_APPNAME test flakiness (#24553)zeertzjq2023-08-04
| | | Also avoid leaving directories behind.
* fix(NVIM_APPNAME): show error message if $NVIM_APPNAME is invalidGhjuvan Lacambre2023-05-28
| | | Closes https://github.com/neovim/neovim/issues/23056.
* refactor(options): deprecate nvim[_buf|_win]_[gs]et_optionLewis Russell2023-05-21
| | | | | Co-authored-by: zeertzjq <zeertzjq@outlook.com> Co-authored-by: famiu <famiuhaque@protonmail.com>
* vim-patch:8.2.3135: Vim9: builtin function arguments not checked at compile timezeertzjq2023-05-05
| | | | | | | | | Problem: Vim9: builtin function arguments not checked at compile time. Solution: Add more type checks. (Yegappan Lakshmanan, closes vim/vim#8539) https://github.com/vim/vim/commit/5b73992d8f82be7ac4b6f46c17f53ffb9640e5fa Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
* feat: $NVIM_APPNAME #22128Ghjuvan Lacambre2023-02-16
| | | | | | | | | | | | | | | | | | | | 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
* fix: failing XDG test on Windows CIJustin M. Keyes2023-01-17
| | | | | | | | | | | | | Problem: Failing Windows CI: FAILED test/functional\options\defaults_spec.lua @ 361: XDG defaults with too long XDG variables are correctly set test\helpers.lua:134: Pattern "Failed to start server: no such file or directory: /X/X/X" not found in log (last 10 lines): Xtest-defaults-log: FAILED test/functional\options\defaults_spec.lua @ 435: XDG defaults with XDG variables that can be expanded are not expanded test\helpers.lua:134: Pattern "Failed to start server: no such file or directory: %$XDG_RUNTIME_DIR%/" not found in log (last 10 lines): Xtest-defaults-log: Solution: The assert_log() statements are not relevant on Windows, because there XDG_RUNTIME_DIR is not used for creating servers, it uses \\.pipe\….
* refactor(tests): lift retry() into assert_log()Justin M. Keyes2023-01-17
|
* test: avoid noise in NVIM_LOG_FILEJustin M. Keyes2023-01-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Tests that _intentionally_ fail certain conditions cause noise in $NVIM_LOG_FILE: $NVIM_LOG_FILE: /home/runner/work/neovim/neovim/build/.nvimlog (last 100 lines) WRN 2023-01-16T18:26:27.673 T599.7799.0 unsubscribe:519: RPC: ch 1: tried to unsubscribe unknown event 'doesnotexist' WRN 2023-01-16T18:29:00.557 ?.11151 server_start:163: Failed to start server: no such file or directory: /X/X/X/... WRN 2023-01-16T18:33:07.269 127.0.0.1:12345 server_start:163: Failed to start server: address already in use: 127.0.0.1 ... -- Output to stderr: module 'vim.shared' not found: no field package.preload['vim.shared'] no file './vim/shared.lua' no file '/home/runner/nvim-deps/usr/share/lua/5.1/vim/shared.lua' no file '/home/runner/nvim-deps/usr/share/lua/5.1/vim/shared/init.lua' no file '/home/runner/nvim-deps/usr/lib/lua/5.1/vim/shared.lua' no file '/home/runner/nvim-deps/usr/lib/lua/5.1/vim/shared/init.lua' no file './vim/shared.so' ... E970: Failed to initialize builtin lua modules Solution: - Log to a private $NVIM_LOG_FILE in tests that intentionally fail and cause ERR log messages. - Assert that the expected messages are actually logged.
* test: simplify platform detection (#21020)dundargoc2022-11-22
| | | | | Extend the capabilities of is_os to detect more platforms such as freebsd and openbsd. Also remove `iswin()` helper function as it can be replaced by `is_os("win")`.
* feat(gen_help_html.lua): adapt to new parserJustin M. Keyes2022-09-28
| | | | | - adapt to parser changes from https://github.com/vigoux/tree-sitter-vimdoc/pull/16 - numerous other generator improvements
* fix(fillchars): change fallback after setcellwidths()zeertzjq2022-08-08
|
* feat: stdpath('run'), /tmp/nvim.user/ #18993Justin M. Keyes2022-06-30
| | | | | | | | | | | | | | | | Problem: - Since c57f6b28d71d #8519, sockets are created in ~/.local/… but XDG spec says: "XDG_RUNTIME_DIR: Must be on the local filesystem", which implies that XDG_STATE_DIR is potentially non-local. - Not easy to inspect Nvim-created temp files (for debugging etc). Solution: - Store sockets in stdpath('run') ($XDG_RUNTIME_DIR). - Establish "/tmp/nvim.user/" as the tempdir root shared by all Nvims. - Make ok() actually useful. - Introduce assert_nolog(). closes #3517 closes #17093
* fix(tests): check for EOF on exit of nvim properlybfredl2022-06-13
|
* fix(windows): stdpath("state") => "nvim-data" #18546dundargoc2022-05-12
| | | This was missed in https://github.com/neovim/neovim/pull/15583
* feat(defaults): session data in $XDG_STATE_HOME #15583Ivan2022-05-12
| | | | | | | | | | | | See: https://gitlab.freedesktop.org/xdg/xdg-specs/-/commit/4f2884e16db35f2962d9b64312917c81be5cb54b - Move session persistent data to $XDG_STATE_HOME Change 'directory', 'backupdir', 'undodir', 'viewdir' and 'shadafile' default location to $XDG_STATE_HOME/nvim. - Move logs to $XDG_STATE_HOME, too. - Add stdpath('log') support. Fixes: #14805
* refactor(tests): use assert_alive() #15546Justin M. Keyes2021-09-01
|
* feat: defaults: auto-create backup dirGregory Anders2021-08-27
| | | | | | | | | | | | | | | | | Copy the behavior of 'undodir' and create the last specified directory in the 'backupdir' option if it doesn't exist. Use trailing slashes for 'backupdir' as well as 'viewdir' and 'undodir' by default. Note that 'undodir' always behaves as though it has the trailing slashes, regardless of whether or not they are present. They are added to the default option value to minimize surprise. The '.' value in 'backupdir' is kept because the default behavior for backups is solely to have a backup if the save of the main file to disk fails. As soon as that save is completed the backup file is removed, so generally there is no need to put them in a central location. Co-authored by: murphy66 <murphy66@gmail.com>
* logs: make kXDGCacheHome if it doesn't exist (#13758)Michael Lingelbach2021-01-16
|
* logging: move to XDG_CACHE_HOME (#13739)Michael Lingelbach2021-01-13
| | | | | while there is some controversy, stdpath('cache') looks like a better fit for logs than stdpath('data'): you can remove logs without preventing nvim to work which fits the XDG_CACHE_HOME definition of `user specific non-essential data files`.
* win/env: fix stdpath()/XDG_* initialization, parsing #12829erw72020-09-07
| | | | | | | | - Windows environment variables are semicolon-separated, but some logic was assuming colon (:). This broke initialization and parsing of XDG_CONFIG_DIRS, XDG_DATA_DIRS, 'runtimepath', stdpath(), etc. - test/defaults_spec: enable tests on Windows ref #12793
* tests: bail out on libdir just like $VIMRUNTIME, it cannot be calculatedBjörn Linse2020-02-07
|
* env: try find library dir (like /usr[/local]/lib/nvim) and add it to &rtpBjörn Linse2020-02-07
|
* log_init: call log_path_init (#11501)Daniel Hahler2019-12-02
| | | | | | | | This has to be done after `init_homedir` for XDG default and `set_init_1` for lookup from env, which could be done earlier likely (to help with https://github.com/neovim/neovim/issues/10937), but this keeps it in sync with Vim. Fixes https://github.com/neovim/neovim/issues/11499.
* findoption_len: treat viminfo/viminfofile as aliasesDaniel Hahler2019-08-26
| | | | Ref: https://github.com/neovim/neovim/pull/10672#issuecomment-524716824
* lua/shared: move table util funcs to vim.sharedJustin M. Keyes2019-05-18
| | | | | Use `tbl_` prefix for all table-util functions. Specify in the function docstring if it expects a list-like or map-like table.
* test: remove use of require('test.helpers')Justin M. Keyes2019-05-18
| | | | | | The test.functional.helpers and test.unit.helpers modules now include all of the public functions from test.helpers, so there is no need to separately require('test.helpers').
* win/defaults: Use "…/nvim-data/site" in 'runtimepath'Justin M. Keyes2019-04-28
| | | | | | | | | | On Windows we store non-config data in "$XDG_DATA_HOME/nvim-data". But the "…/site" items in 'runtimepath' did not correctly point to that location, they used "…/nvim/site". Fix the init logic to use "…/nvim-data/site". closes #9910
* test: clear(): `args_rm` parameterJustin M. Keyes2019-04-27
|
* test: 'shadafile' defaultJustin M. Keyes2019-04-27
| | | | ref 773bdd41ec19
* startup: fix ":if 0|syntax on|endif" bug (#8731)Justin M. Keyes2018-07-18
| | | | | | | Problem: ":if 0|syntax {on,off}|endif" skips the default of "syntax on" because the executor was setting the `did_syntax_onoff` flag even though "syntax {on,off}" is not actually executed. closes #8728
* do not pass NULL to os_getenvJustin M. Keyes2018-05-18
| | | | closes #8393
* test/options: Fix stdpath() failures on WindowsJames McCoy2018-04-01
|
* eval: Add stdpath() method (#5297)Christian Höltje2018-03-29
| | | | | | Adds the :stdpath method for fetching XDG standard directories. Fixes #5297
* 'fillchars': fix defaults logic; handle ambiwidth=double #7986Matthieu Coudron2018-02-23
| | | | Update tests.
* Merge #7753 'win: enable more functional tests'Justin M. Keyes2018-01-06
|\
| * win: enable more functional testsJan Edmund Lazo2018-01-06
| | | | | | | | | | | | - plugin/shada_spec.lua: Use \r\n as Windows EOL for tests on BufWriteCmd, FileWriteCmd, FileAppendCmd. Alternative is 'set fileformat=unix'.
* | defaults: do :filetype stuff unless explicitly "off"Justin M. Keyes2018-01-04
|/ | | | | | | | | | | Until now, the default `:filetype ...` setup was skipped if the user config touched `:filetype` in any way (including implicitly via `:syntax on`). No one needs that, and it's very confusing. Instead, proceed with `:filetype ... on` unless the user explicitly called `:filetype ... off`. closes #7765
* log: Fall back to CWD-relative .nvimlogJustin M. Keyes2017-06-07
| | | | | | If if the resolved $NVIM_LOG_FILE *and* stdpath("data")/log cannot be created (e.g. because the XDG data directory does not exist), fall back to .nvimlog in the current direcrtory.
* log: set $NVIM_LOG_FILE; fallback to $XDG_DATA_HOME/nvim/logJustin M. Keyes2017-06-07
|
* defaults_spec: Test changing :filetype/:syntax in -c, after defaultsJames McCoy2017-04-27
|
* functests: Replace execute with either command or feed_commandZyX2017-04-09
| | | | | | | | | | Hope this will make people using feed_command less likely: this hides bugs. Already found at least two: 1. msgpackparse() will show internal error: hash_add() in case of duplicate keys, though it will still work correctly. Currently silenced. 2. ttimeoutlen was spelled incorrectly, resulting in option not being set when expected. Test was still functioning somehow though. Currently fixed.
* defaults: 'showcmd', 'belloff', 'ruler'Justin M. Keyes2017-03-16
| | | | | | | | | | | - Vim "unix default" of 'noshowcmd' is serving few users. And it's inconsistent. - 'ruler' and 'belloff=all' improve the out-of-the-box experience. - Continue to use 'noshowcmd' and 'noruler' by default in the functional tests to keep them fast. TODO: Add a "disable slow stuff" command or mapping to address the use-case of a very slow terminal connection.
* win: Append process dir to $PATHJustin M. Keyes2017-02-04
| | | | | | | | This allows executables to be found by :!, system(), and executable() if they live next to ("sibling" to) nvim.exe. This is what gvim on Windows does, and also matches the behavior of Win32 SearchPath(). https://github.com/vim/vim/blob/c4a249a736d40ec54794827ef95804c225d0e38f/src/os_win32.c#L354-L370
* XDG: Windows: resolve $LOCALAPPDATA, $TEMP (#5278)Rui Abreu Ferreira2017-01-08
| | | | | | | | | | After #4964 environment variables in the XDG "fallback" table are no longer expanded. Fallback to correctly expanded $LOCALAPPDATA, $TEMP. If that fails (unlikely), fallback to hard-coded paths (e.g. ~/AppData/Local). Closes #5255
* Mark some functional tests as pending in WindowsRui Abreu Ferreira2016-08-26
|
* Set the default value for 'packpath'James McCoy2016-08-08
| | | | | | | | As noted in “:help 'packpath'”, the default value is supposed to be the same as that for 'runtimepath'. This was missed in the original port of the packages functionality from Vim. Closes #5193
* functests: Also make sure that `set all&` does not expandZyX2016-07-10
|
* functests: Add tests for XDG defaultsZyX2016-07-10
|
* option: Do not expand options, obtained from XDG varsZyX2016-07-10
| | | | | | | | | | | | | | | | It is a wrong thing to do, this makes valid variable values be treated incorrectly: in XDG_DATA_HOME='/home/$foo/.local/share' `$foo` should be treated literally and not expanded to `foo` environment variable value. Also makes option_expand not try to expand too long strings even if these too long strings are default values. Previously it thought that default values should always be expanded. Also does not try to expand NULL should it be the default value just in case. Fixes #4961