Commit Graph

22009 Commits

Author SHA1 Message Date
Justin M. Keyes
f50135a32e
feat: stdpath('run'), /tmp/nvim.user/ #18993
Problem:
- Since c57f6b28d7 #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
2022-06-30 04:16:46 -07:00
Hugo
514e76e4b2
vim-patch:9.0.0001: Travis CI is no longer used #19163
Problem:    Travis CI is no longer used.
Solution:   Delete the Travis CI configuration. (Hugo Osvaldo Barrera,
            closes vim/vim#10636)
75417d960b
2022-06-30 03:12:08 -07:00
bfredl
ba5be650a7
Merge pull request #19134 from dundargoc/refactor/conversion
refactor: enable -Wconversion warning for fileio.c
2022-06-30 11:51:07 +02:00
zeertzjq
995e487915
refactor(highlight)!: rename attributes to match Vim (#19159)
Ref: 84f5463630
Rename:
- `underlineline` to `underdouble`
- `underdot` to `underdotted`
- `underdash` to `underdashed`

`underdouble` also now takes higher precedence than `undercurl`.
2022-06-30 16:57:44 +08:00
Dundar Goc
593f2f753f refactor: enable -Wconversion warning for fileio.c
Work on https://github.com/neovim/neovim/issues/567
2022-06-29 22:00:56 +02:00
L3MON4D3
6f6286e4f9
fix(lsp): small bugs in snippet-parser #18998
This fixes the following bugs:
`${1:else_text}` -> format with if_text: "else_text"
`${1:-else_text}` -> format with if_text: "else_text"
`${1:}` in `format` (eg. empty else_text) -> error.
`${1:}` (eg. empty placeholder) -> error.

Thanks hrsh7th :)
2022-06-29 09:53:49 -07:00
Christian Clason
1eb9624666
vim-patch:9.0.0006: not all Visual Basic files are recognized (#19153)
Problem:    Not all Visual Basic files are recognized.
Solution:   Change detection of *.cls files. (Doug Kearns)
8b5901e2f9
2022-06-29 18:43:56 +02:00
Christian Clason
ba583f8206
vim-patch:9.0.0005: hare files are not recognized (#19151)
Problem:    Hare files are not recognized.
Solution:   Add a filetype pattern. (Hugo Osvaldo Barrera, closes vim/vim#10630)
040674129f
2022-06-29 16:21:04 +02:00
zeertzjq
8ea09fc908
vim-patch:8.2.4378: incsearch HL broken when calling searchcount in 'tabLine' (#19147)
Problem:    Incsearch highlight broken when calling searchcount() in 'tabLine'
            function. (Mirko Palmer)
Solution:   Save and restore the incsearch state. (Christian Brabandt,
            closes vim/vim#9763, closes vim/vim#9633)
6dd7424c7e
2022-06-29 19:34:37 +08:00
zeertzjq
bab32bba7a
vim-patch:9.0.0002: map functionality outside of map.c (#19150)
Problem:    Map functionality outside of map.c.
Solution:   Move f_hasmapto() to map.c.  Rename a function. (closes vim/vim#10611)
c207fd2535
2022-06-29 19:25:38 +08:00
bfredl
21a1f1f552
Merge pull request #19133 from famiu/feat/api/cmd_support_filter
feat(api): make `nvim_parse_cmd` and `nvim_cmd` support :filter
2022-06-29 09:12:01 +02:00
Justin M. Keyes
01fc5097d3
Merge #19139 build(cmake): fix static libintl on macOS 2022-06-29 03:41:40 +02:00
Justin M. Keyes
998dc07288
feat: update unicode tables #19135 2022-06-28 18:34:56 -07:00
bfredl
3cc8559963
Merge pull request #19141 from bfredl/mapchar
refactor: define builtin mappings and autocmds without pseudo-excmds
2022-06-29 00:46:25 +02:00
bfredl
7ab2e12ebc refactor(aucmd): call define_autocmd() directly for default autocmds 2022-06-28 23:41:46 +02:00
bfredl
83170a4986 refactor(map): simplify add_map params 2022-06-28 23:40:27 +02:00
Carlo Cabrera
674787feae
ci(release): link gettext include directory
Our previous mangling of gettext broke the `HAVE_WORKING_LIBINTL` test
because it prevented CMake from finding `libintl.h`. Let's fix that by
linking Gettext's `include` directory into `/usr/local` too.
2022-06-29 02:19:45 +08:00
Carlo Cabrera
be40ba68a8
build(cmake): fix static libintl test on macOS
If `libintl` is a static library on macOS, we also need to explicitly
link with `libiconv` and the `CoreFoundation` framework. Otherwise, our
`HAVE_WORKING_LIBINTL` test erroneously fails.

Closes #19127
Closes #19138
2022-06-29 02:19:42 +08:00
Justin M. Keyes
e0f605bfd8
Merge #19120 build: rename build-related dirs 2022-06-28 13:35:56 +02:00
Famiu Haque
606ec8b708 feat(api): make nvim_parse_cmd and nvim_cmd support :filter
Also fixes a memory leak in `parse_cmdline`.

Closes #18954.
2022-06-28 17:31:04 +06:00
Thomas Vigouroux
9e14744099
fix(coverity): redundant assert #19059
* fix(coverity/353303): redundant assert
  eap->line2 is an int32_t, it is always lower than INT_MAX.
* fix(coverity/353302): redundant assert
2022-06-28 04:24:21 -07:00
Justin M. Keyes
4c0c6f8428 build: move unicode/ to src/unicode/ 2022-06-28 04:05:11 -07:00
Justin M. Keyes
f05a2891d3 build: rename build-related dirs
Problem:
Dirs "config", "packaging", and "third-party" are all closely related
but this is not obvious from the layout. This adds friction for new
contributors.

Solution:
- rename config/ to cmake.config/
- rename test/config/ to test/cmakeconfig/ because it is used in Lua
  tests: require('test.cmakeconfig.paths').
- rename packaging/ to cmake.packaging/
- rename third-party/ to cmake.deps/ (parallel with .deps/)
2022-06-28 04:02:29 -07:00
Vedant
9ddb481d88
refactor(ci): cleanup release.yml #19132 2022-06-28 03:40:53 -07:00
Justin M. Keyes
094086a713
Merge #19060 memory leaks 2022-06-28 12:37:39 +02:00
0x74696d6d79
ee6b21e843
fix(vim.ui.input): accept nil or empty "opts" #19109
Fix #18143
2022-06-28 02:53:15 -07:00
dundargoc
014a88799a
refactor: replace char_u #18429
Work on https://github.com/neovim/neovim/issues/459
2022-06-28 02:31:54 -07:00
Famiu Haque
7e1cf6b764
fix(inccommand): parse the command to check if it is previewable
Free regprog if command isn't previewable

Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2022-06-28 13:00:05 +08:00
Christian Clason
274609a109
vim-patch:069a7d561bbe (#19130)
Update runtime files
069a7d561b
2022-06-27 23:35:26 +02:00
Christian Clason
f2fa11708c
fix(filetype): check for non-nil match in detect.rules (#19129) 2022-06-27 20:43:37 +02:00
bfredl
0c363d1a70
Merge pull request #19122 from dundargoc/refactor/conversion
refactor: enable -Wconversion warning for message.c
2022-06-27 17:07:21 +02:00
Dundar Goc
2dd01e3e21 refactor: enable -Wconversion warning for message.c
Work on https://github.com/neovim/neovim/issues/567
2022-06-27 13:55:40 +02:00
Christian Clason
f3c8f3e5d4
vim-patch:partial:8a3b805c6c9c (#19104)
Update runtime files
8a3b805c6c

skip builtin.txt (needs 8.2.4838)
skip message.txt (whitespace changes)
2022-06-27 10:23:09 +02:00
bfredl
f10489d9c2
Merge pull request #19077 from dundargoc/refactor/conversion
refactor: enable -Wconversion warning for ex_cmds.c
2022-06-27 10:09:33 +02:00
Gregory Anders
6f3508f8ed
refactor(filetype): allow vim.filetype.match to accept buf and filename (#19114)
This is necessary in cases where filetype detection acts recursively.
For example, when matching files that end with .bak, the "root" of
the filename is matched again against the same buffer (e.g. a buffer
named "foo.c.bak" will be matched again with the filename "foo.c", using
the same underlying buffer).
2022-06-27 10:03:43 +02:00
Justin M. Keyes
eab8b998e9
build: move man/ to src/man/ #19119
Problem:
man/ contains source files for manpage generation, it doesn't need to
live at the project root.

Solution:
Move it to src/man/.
2022-06-27 01:02:02 -07:00
Gregory Anders
8c2b870544
fix(api): change default value of 'pattern' in nvim_exec_autocmds (#19115)
Omitting 'pattern' in nvim_exec_autocmds should be equivalent to
omitting the 'fname' argument in :doautoall, which is equivalent to
using an empty string as the pattern. Fixes regression introduced
in #19091.
2022-06-27 09:51:33 +02:00
zeertzjq
cf23695dd7
fix(api): nvim_parse_cmd check for ambiguous user command (#19116) 2022-06-27 14:10:13 +08:00
Justin M. Keyes
e2f9d0332b
test: use "python3" to avoid skipped test #19106
Problem:
The "calls executable in $PATH" is skipped on some CI jobs because
"python" is not found.

Solution:
Use "python3" instead.
2022-06-26 22:03:06 -07:00
Thomas Vigouroux
89f75dcd1f
fix(coverity/348300): free memory when overiding sing attribute
Nothing prevent the user from doing `:sign define abc culhl=Normal
culhl=Normal` and thus this leads to an obvious memory leak.
2022-06-27 06:55:41 +02:00
zeertzjq
a0a815ec57
Merge pull request #18716 from zeertzjq/vim-8.2.5007
vim-patch:8.2.{3484,5007,5123}: spell suggestion fixes
2022-06-27 06:45:00 +08:00
zeertzjq
6711d001c5 fix(spell): make setting 'encoding' clear word list 2022-06-27 05:33:54 +08:00
zeertzjq
f0d4007f62 vim-patch:8.2.5123: using invalid index when looking for spell suggestions
Problem:    Using invalid index when looking for spell suggestions.
Solution:   Do not decrement the index when it is zero.
156d391195
2022-06-27 05:33:54 +08:00
zeertzjq
80af2c6055 vim-patch:8.2.5007: spell suggestion may use uninitialized memory
Problem:    Spell suggestion may use uninitialized memory. (Zdenek Dohnal)
Solution:   Avoid going over the end of the word.
6d24b4ff69
2022-06-27 05:33:54 +08:00
zeertzjq
bafb53604a vim-patch:8.2.3484: crash when going through spell suggestions
Problem:    Crash when going through spell suggestions.
Solution:   Limit the text length for finding suggestions to the original
            length.  Do not update buffers when exiting. (closes vim/vim#8965)
e275ba4fc9
2022-06-27 05:33:54 +08:00
Christian Clason
516d6318b7
Merge pull request #19091 from clason/do-aucmd-pats
feat(api): support pattern array for exec_autocmds
2022-06-26 23:05:52 +02:00
Gregory Anders
f3ce06cfa1
refactor(filetype)!: allow vim.filetype.match to use different strategies (#18895)
This enables vim.filetype.match to match based on a buffer (most
accurate) or simply a filename or file contents, which are less accurate
but may still be useful for some scenarios.

When matching based on a buffer, the buffer's name and contents are both
used to do full filetype matching. When using a filename, if the file
exists the file is loaded into a buffer and full filetype detection is
performed. If the file does not exist then filetype matching is only
performed against the filename itself. Content-based matching does the
equivalent of scripts.vim, and matches solely based on file contents
without any information from the name of the file itself (e.g. for
shebangs).

BREAKING CHANGE: use `vim.filetype.match({buf = bufnr})` instead 
of `vim.filetype.match(name, bufnr)`
2022-06-26 18:41:20 +02:00
Christian Clason
5c8025967e refactor(api): use FOREACH_ITEM macro in autocmd 2022-06-26 17:57:45 +02:00
Carlo Cabrera
ae3e371303
docs(release): suggest "xattr" for macos release #19100 2022-06-26 08:46:37 -07:00
Christian Clason
da358d4521 feat(api): support pattern array for exec_autocmds 2022-06-26 13:04:45 +02:00