aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'runtime')
-rw-r--r--runtime/autoload/dist/ft.vim11
-rw-r--r--runtime/doc/api.txt9
-rw-r--r--runtime/doc/builtin.txt2
-rw-r--r--runtime/doc/filetype.txt1
-rw-r--r--runtime/doc/lua.txt4
-rw-r--r--runtime/doc/nvim_terminal_emulator.txt9
-rw-r--r--runtime/doc/options.txt2
-rw-r--r--runtime/doc/term.txt2
-rw-r--r--runtime/doc/treesitter.txt2
-rw-r--r--runtime/filetype.vim9
-rw-r--r--runtime/lua/vim/_editor.lua10
-rw-r--r--runtime/lua/vim/filetype.lua10
-rw-r--r--runtime/lua/vim/lsp/handlers.lua2
-rw-r--r--runtime/lua/vim/lsp/util.lua4
-rw-r--r--runtime/lua/vim/ui.lua2
-rw-r--r--runtime/nvim.appdata.xml1
16 files changed, 46 insertions, 34 deletions
diff --git a/runtime/autoload/dist/ft.vim b/runtime/autoload/dist/ft.vim
index 866196a7df..975e2c23d8 100644
--- a/runtime/autoload/dist/ft.vim
+++ b/runtime/autoload/dist/ft.vim
@@ -823,7 +823,9 @@ func dist#ft#FTperl()
endfunc
func dist#ft#FTsys()
- if IsRapid()
+ if exists("g:filetype_sys")
+ exe "setf " .. g:filetype_sys
+ elseif IsRapid()
setf rapid
else
setf bat
@@ -990,20 +992,23 @@ func dist#ft#FTtf()
setf tf
endfunc
+let s:ft_krl_header = '\&\w+'
" Determine if a *.src file is Kuka Robot Language
func dist#ft#FTsrc()
+ let ft_krl_def_or_deffct = '%(global\s+)?def%(fct)?>'
if exists("g:filetype_src")
exe "setf " .. g:filetype_src
- elseif getline(nextnonblank(1)) =~? '^\s*\%(&\w\+\|\%(global\s\+\)\?def\>\)'
+ elseif getline(nextnonblank(1)) =~? '\v^\s*%(' .. s:ft_krl_header .. '|' .. ft_krl_def_or_deffct .. ')'
setf krl
endif
endfunc
" Determine if a *.dat file is Kuka Robot Language
func dist#ft#FTdat()
+ let ft_krl_defdat = 'defdat>'
if exists("g:filetype_dat")
exe "setf " .. g:filetype_dat
- elseif getline(nextnonblank(1)) =~? '^\s*\%(&\w\+\|defdat\>\)'
+ elseif getline(nextnonblank(1)) =~? '\v^\s*%(' .. s:ft_krl_header .. '|' .. ft_krl_defdat .. ')'
setf krl
endif
endfunc
diff --git a/runtime/doc/api.txt b/runtime/doc/api.txt
index 858258320d..9e0002db48 100644
--- a/runtime/doc/api.txt
+++ b/runtime/doc/api.txt
@@ -2859,8 +2859,7 @@ nvim_win_set_cursor({window}, {pos}) *nvim_win_set_cursor()*
{pos} (row, col) tuple representing the new position
nvim_win_set_height({window}, {height}) *nvim_win_set_height()*
- Sets the window height. This will only succeed if the screen
- is split horizontally.
+ Sets the window height.
Parameters: ~
{window} Window handle, or 0 for current window
@@ -3234,9 +3233,9 @@ nvim_create_autocmd({event}, {*opts}) *nvim_create_autocmd()*
pattern = { "*.py", "*.pyi" }
<
- Examples values for event: >
- "BufPreWrite"
- {"CursorHold", "BufPreWrite", "BufPostWrite"}
+ Example values for event: >
+ "BufWritePre"
+ {"CursorHold", "BufWritePre", "BufWritePost"}
<
Parameters: ~
diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt
index 49aa52a92f..7871885a5d 100644
--- a/runtime/doc/builtin.txt
+++ b/runtime/doc/builtin.txt
@@ -966,8 +966,6 @@ byteidxcomp({expr}, {nr}) *byteidxcomp()*
< The first and third echo result in 3 ('e' plus composing
character is 3 bytes), the second echo results in 1 ('e' is
one byte).
- Only works differently from byteidx() when 'encoding' is set
- to a Unicode encoding.
Can also be used as a |method|: >
GetName()->byteidxcomp(idx)
diff --git a/runtime/doc/filetype.txt b/runtime/doc/filetype.txt
index 5f7c1b57f8..e1b0e88c95 100644
--- a/runtime/doc/filetype.txt
+++ b/runtime/doc/filetype.txt
@@ -153,6 +153,7 @@ variables can be used to overrule the filetype used for certain extensions:
*.pp g:filetype_pp |ft-pascal-syntax|
*.prg g:filetype_prg
*.src g:filetype_src
+ *.sys g:filetype_sys
*.sh g:bash_is_sh |ft-sh-syntax|
*.tex g:tex_flavor |ft-tex-plugin|
*.w g:filetype_w |ft-cweb-syntax|
diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt
index 46b9f0576f..16f27486c8 100644
--- a/runtime/doc/lua.txt
+++ b/runtime/doc/lua.txt
@@ -1151,7 +1151,7 @@ In any of the above examples, to replicate the behavior |setlocal|, use
|vim.opt| returns an Option object.
-For example: `local listchar_object = vim.opt.listchar`
+For example: `local listchar_object = vim.opt.listchars`
An `Option` has the following methods:
@@ -1910,7 +1910,7 @@ select({items}, {opts}, {on_choice}) *vim.ui.select()*
which select() was called.
{on_choice} function ((item|nil, idx|nil) -> ()) Called
once the user made a choice. `idx` is the
- 1-based index of `item` within `item`. `nil`
+ 1-based index of `item` within `items`. `nil`
if the user aborted the dialog.
diff --git a/runtime/doc/nvim_terminal_emulator.txt b/runtime/doc/nvim_terminal_emulator.txt
index f322764ecf..9ac81e2916 100644
--- a/runtime/doc/nvim_terminal_emulator.txt
+++ b/runtime/doc/nvim_terminal_emulator.txt
@@ -45,11 +45,10 @@ by |:mksession| to restore a terminal buffer (by restarting the {cmd}).
==============================================================================
Input *terminal-input*
-To send input, enter |Terminal-mode| using any command that would enter "insert
-mode" in a normal buffer, such as |i| or |:startinsert|. In this mode all keys
-except <C-\> are sent to the underlying program. If <C-\> is pressed, the
-next key is sent unless it is <C-N>. Use <C-\><C-N> to return to normal-mode.
-|CTRL-\_CTRL-N|
+To send input, enter |Terminal-mode| with |i|, |I|, |a|, |A| or
+|:startinsert|. In this mode all keys except <C-\> are sent to the underlying
+program. If <C-\> is pressed, the next key is sent unless it is <C-N>. Use
+<C-\><C-N> to return to normal-mode. |CTRL-\_CTRL-N|
Terminal-mode forces these local options:
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index 8d353804a4..7ea6a92a34 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -921,7 +921,7 @@ A jump table for the options with a short description can be found at |Q_op|.
Note that environment variables are not expanded. If you want to use
$HOME you must expand it explicitly, e.g.: >
- :let backupskip = escape(expand('$HOME'), '\') .. '/tmp/*'
+ :let &backupskip = escape(expand('$HOME'), '\') .. '/tmp/*'
< Note that the default also makes sure that "crontab -e" works (when a
backup would be made by renaming the original file crontab won't see
diff --git a/runtime/doc/term.txt b/runtime/doc/term.txt
index ddf52b65c6..bdf0094721 100644
--- a/runtime/doc/term.txt
+++ b/runtime/doc/term.txt
@@ -111,7 +111,7 @@ width of the terminal.
*tui-input*
Nvim uses libtermkey to convert terminal escape sequences to key codes.
|terminfo| is used first, and CSI sequences not in |terminfo| (including
-exteneded keys a.k.a. modifyOtherKeys or `CSI u`) can also be parsed.
+extended keys a.k.a. modifyOtherKeys or `CSI u`) can also be parsed.
For example, when running Nvim in tmux, this makes Nvim leave Insert mode and
go to the window below: >
tmux send-keys 'Escape' [ 2 7 u 'C-W' j
diff --git a/runtime/doc/treesitter.txt b/runtime/doc/treesitter.txt
index a9d9f81849..b10bf3498d 100644
--- a/runtime/doc/treesitter.txt
+++ b/runtime/doc/treesitter.txt
@@ -268,7 +268,7 @@ Here is a list of built-in directives:
((identifier) @foo (#set! @foo "kind" "parameter"))
((node1) @left (node2) @right (#set! "type" "pair"))
<
- `offset!` *ts-predicate-offset!*
+ `offset!` *ts-directive-offset!*
Takes the range of the captured node and applies the offsets
to it's range : >
((identifier) @constant (#offset! @constant 0 1 0 -1))
diff --git a/runtime/filetype.vim b/runtime/filetype.vim
index f7c0317eff..5e73374649 100644
--- a/runtime/filetype.vim
+++ b/runtime/filetype.vim
@@ -1271,6 +1271,9 @@ au BufNewFile,BufRead *.or setf openroad
" OPL
au BufNewFile,BufRead *.[Oo][Pp][Ll] setf opl
+" OpenSCAD
+au BufNewFile,BufRead *.scad setf openscad
+
" Oracle config file
au BufNewFile,BufRead *.ora setf ora
@@ -1280,13 +1283,13 @@ au BufNewFile,BufRead *.org,*.org_archive setf org
" Packet filter conf
au BufNewFile,BufRead pf.conf setf pf
-" Pacman Config (close enough to dosini)
-au BufNewFile,BufRead */etc/pacman.conf setf dosini
+" Pacman config
+au BufNewFile,BufRead */etc/pacman.conf setf conf
" Pacman hooks
au BufNewFile,BufRead *.hook
\ if getline(1) == '[Trigger]' |
- \ setf dosini |
+ \ setf conf |
\ endif
" Pam conf
diff --git a/runtime/lua/vim/_editor.lua b/runtime/lua/vim/_editor.lua
index d4db4850bd..8e372b806c 100644
--- a/runtime/lua/vim/_editor.lua
+++ b/runtime/lua/vim/_editor.lua
@@ -174,11 +174,11 @@ do
if vim.fn.getcmdtype() ~= '' then -- cmdline-mode: paste only 1 line.
if not got_line1 then
got_line1 = (#lines > 1)
- vim.api.nvim_set_option('paste', true) -- For nvim_input().
- -- Escape "<" and control characters
- local line1 = lines[1]:gsub('<', '<lt>'):gsub('(%c)', '\022%1')
- vim.api.nvim_input(line1)
- vim.api.nvim_set_option('paste', false)
+ -- Escape control characters
+ local line1 = lines[1]:gsub('(%c)', '\022%1')
+ -- nvim_input() is affected by mappings,
+ -- so use nvim_feedkeys() with "n" flag to ignore mappings.
+ vim.api.nvim_feedkeys(line1, 'n', true)
end
return true
end
diff --git a/runtime/lua/vim/filetype.lua b/runtime/lua/vim/filetype.lua
index 603f9f854a..d8d4afb6c2 100644
--- a/runtime/lua/vim/filetype.lua
+++ b/runtime/lua/vim/filetype.lua
@@ -103,6 +103,11 @@ local extension = {
cbl = "cobol",
atg = "coco",
recipe = "conaryrecipe",
+ hook = function(path, bufnr)
+ if getline(bufnr, 1) == '[Trigger]' then
+ return "conf"
+ end
+ end,
mklx = "context",
mkiv = "context",
mkii = "context",
@@ -436,6 +441,7 @@ local extension = {
xin = "omnimark",
opam = "opam",
["or"] = "openroad",
+ scad = "openscad",
ora = "ora",
org = "org",
org_archive = "org",
@@ -902,7 +908,7 @@ local filename = {
Dockerfile = "dockerfile",
npmrc = "dosini",
["/etc/yum.conf"] = "dosini",
- ["/etc/pacman.conf"] = "dosini",
+ ["/etc/pacman.conf"] = "conf",
[".npmrc"] = "dosini",
[".editorconfig"] = "dosini",
dune = "dune",
@@ -1181,7 +1187,7 @@ local pattern = {
[".*/etc/DIR_COLORS"] = "dircolors",
[".*/etc/dnsmasq%.conf"] = "dnsmasq",
["php%.ini%-.*"] = "dosini",
- [".*/etc/pacman%.conf"] = "dosini",
+ [".*/etc/pacman%.conf"] = "conf",
[".*/etc/yum%.conf"] = "dosini",
[".*lvs"] = "dracula",
[".*lpe"] = "dracula",
diff --git a/runtime/lua/vim/lsp/handlers.lua b/runtime/lua/vim/lsp/handlers.lua
index f5aefd4402..9871f00677 100644
--- a/runtime/lua/vim/lsp/handlers.lua
+++ b/runtime/lua/vim/lsp/handlers.lua
@@ -141,7 +141,7 @@ M['workspace/configuration'] = function(_, result, ctx)
local response = {}
for _, item in ipairs(result.items) do
if item.section then
- local value = util.lookup_section(client.config.settings, item.section) or vim.NIL
+ local value = util.lookup_section(client.config.settings, item.section)
-- For empty sections with no explicit '' key, return settings as is
if value == vim.NIL and item.section == '' then
value = client.config.settings or vim.NIL
diff --git a/runtime/lua/vim/lsp/util.lua b/runtime/lua/vim/lsp/util.lua
index 401dac9acd..30587afb38 100644
--- a/runtime/lua/vim/lsp/util.lua
+++ b/runtime/lua/vim/lsp/util.lua
@@ -1950,8 +1950,8 @@ end
function M.lookup_section(settings, section)
for part in vim.gsplit(section, '.', true) do
settings = settings[part]
- if not settings then
- return
+ if settings == nil then
+ return vim.NIL
end
end
return settings
diff --git a/runtime/lua/vim/ui.lua b/runtime/lua/vim/ui.lua
index 9d4b38f08a..165dada1b8 100644
--- a/runtime/lua/vim/ui.lua
+++ b/runtime/lua/vim/ui.lua
@@ -16,7 +16,7 @@ local M = {}
--- `items`, or the context in which select() was called.
---@param on_choice function ((item|nil, idx|nil) -> ())
--- Called once the user made a choice.
---- `idx` is the 1-based index of `item` within `item`.
+--- `idx` is the 1-based index of `item` within `items`.
--- `nil` if the user aborted the dialog.
---
---
diff --git a/runtime/nvim.appdata.xml b/runtime/nvim.appdata.xml
index 4ad656f1a3..1464c27694 100644
--- a/runtime/nvim.appdata.xml
+++ b/runtime/nvim.appdata.xml
@@ -26,6 +26,7 @@
</screenshots>
<releases>
+ <release date="2022-04-15" version="0.7.0"/>
<release date="2021-12-31" version="0.6.1"/>
<release date="2021-11-30" version="0.6.0"/>
<release date="2021-09-26" version="0.5.1"/>