diff options
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/help.txt | 18 | ||||
-rw-r--r-- | runtime/doc/lsp.txt | 6 | ||||
-rw-r--r-- | runtime/doc/map.txt | 1 | ||||
-rw-r--r-- | runtime/doc/options.txt | 7 | ||||
-rw-r--r-- | runtime/filetype.vim | 3 | ||||
-rw-r--r-- | runtime/lua/vim/lsp/util.lua | 8 |
6 files changed, 31 insertions, 12 deletions
diff --git a/runtime/doc/help.txt b/runtime/doc/help.txt index 8b096ff28b..353058ec03 100644 --- a/runtime/doc/help.txt +++ b/runtime/doc/help.txt @@ -130,6 +130,7 @@ Advanced editing ~ |eval.txt| expression evaluation, conditional commands |fold.txt| hide (fold) ranges of lines |lua.txt| Lua API +|api.txt| Nvim API via RPC, Lua and VimL Special issues ~ |testing.txt| testing Vim and Vim scripts @@ -137,14 +138,15 @@ Special issues ~ |remote.txt| using Vim as a server or client Programming language support ~ -|indent.txt| automatic indenting for C and other languages -|lsp.txt| Language Server Protocol (LSP) -|syntax.txt| syntax highlighting -|filetype.txt| settings done specifically for a type of file -|quickfix.txt| commands for a quick edit-compile-fix cycle -|ft_ada.txt| Ada (the programming language) support -|ft_rust.txt| Filetype plugin for Rust -|ft_sql.txt| about the SQL filetype plugin +|indent.txt| automatic indenting for C and other languages +|lsp.txt| Language Server Protocol (LSP) +|treesitter.txt| tree-sitter library for incremental parsing of buffers +|syntax.txt| syntax highlighting +|filetype.txt| settings done specifically for a type of file +|quickfix.txt| commands for a quick edit-compile-fix cycle +|ft_ada.txt| Ada (the programming language) support +|ft_rust.txt| Filetype plugin for Rust +|ft_sql.txt| about the SQL filetype plugin Language support ~ |digraph.txt| list of available digraphs diff --git a/runtime/doc/lsp.txt b/runtime/doc/lsp.txt index 9624f582a9..7e589c095b 100644 --- a/runtime/doc/lsp.txt +++ b/runtime/doc/lsp.txt @@ -1805,6 +1805,9 @@ apply_text_edits({text_edits}, {bufnr}) {text_edits} (table) list of `TextEdit` objects {buf_nr} (number) Buffer id + See also: ~ + https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textEdit + *vim.lsp.util.apply_workspace_edit()* apply_workspace_edit({workspace_edit}) Applies a `WorkspaceEdit` . @@ -1833,6 +1836,9 @@ buf_highlight_references({bufnr}, {references}) {references} List of `DocumentHighlight` objects to highlight + See also: ~ + https://microsoft.github.io/language-server-protocol/specifications/specification-3-17/#documentHighlight + buf_lines({bufnr}) *vim.lsp.util.buf_lines()* TODO: Documentation diff --git a/runtime/doc/map.txt b/runtime/doc/map.txt index 10d503e180..64c0d96aed 100644 --- a/runtime/doc/map.txt +++ b/runtime/doc/map.txt @@ -1306,6 +1306,7 @@ completion can be enabled: -complete=highlight highlight groups -complete=history :history suboptions -complete=locale locale names (as output of locale -a) + -complete=lua Lua expression -complete=mapclear buffer argument -complete=mapping mapping name -complete=menu menus diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index f55ec62b77..f0ce15ac0f 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -1038,7 +1038,12 @@ A jump table for the options with a short description can be found at |Q_op|. continuation (positive). sbr Display the 'showbreak' value before applying the additional indent. - The default value for min is 20 and shift is 0. + list:{n} Adds an additional indent for lines that match a + numbered or bulleted list (using the + 'formatlistpat' setting). + list:-1 Uses the length of a match with 'formatlistpat' + for indentation. + The default value for min is 20, shift and list is 0. *'browsedir'* *'bsdir'* 'browsedir' 'bsdir' string (default: "last") diff --git a/runtime/filetype.vim b/runtime/filetype.vim index 40d7e8be08..f012c7cb4b 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -1519,6 +1519,9 @@ au BufNewFile,BufRead *.sbt setf sbt " Scilab au BufNewFile,BufRead *.sci,*.sce setf scilab +" scdoc +au BufNewFile,BufRead *.scd setf scdoc + " SCSS au BufNewFile,BufRead *.scss setf scss diff --git a/runtime/lua/vim/lsp/util.lua b/runtime/lua/vim/lsp/util.lua index 4c3ceaf503..d682fdc17e 100644 --- a/runtime/lua/vim/lsp/util.lua +++ b/runtime/lua/vim/lsp/util.lua @@ -240,6 +240,7 @@ end --- Applies a list of text edits to a buffer. --@param text_edits (table) list of `TextEdit` objects --@param buf_nr (number) Buffer id +---@see https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textEdit function M.apply_text_edits(text_edits, bufnr) if not next(text_edits) then return end if not api.nvim_buf_is_loaded(bufnr) then @@ -972,7 +973,7 @@ function M.make_floating_popup_options(width, height, opts) row = -get_border_size(opts).height end - if vim.fn.wincol() + width <= api.nvim_get_option('columns') then + if vim.fn.wincol() + width + (opts.offset_x or 0) <= api.nvim_get_option('columns') then anchor = anchor..'W' col = 0 else @@ -1483,6 +1484,7 @@ do --[[ References ]] --- --@param bufnr buffer id --@param references List of `DocumentHighlight` objects to highlight + ---@see https://microsoft.github.io/language-server-protocol/specifications/specification-3-17/#documentHighlight function M.buf_highlight_references(bufnr, references) validate { bufnr = {bufnr, 'n', true} } for _, reference in ipairs(references) do @@ -1717,14 +1719,14 @@ end function M.trim_empty_lines(lines) local start = 1 for i = 1, #lines do - if #lines[i] > 0 then + if lines[i] ~= nil and #lines[i] > 0 then start = i break end end local finish = 1 for i = #lines, 1, -1 do - if #lines[i] > 0 then + if lines[i] ~= nil and #lines[i] > 0 then finish = i break end |