diff options
Diffstat (limited to 'runtime')
| -rw-r--r-- | runtime/autoload/dist/ft.vim | 11 | ||||
| -rw-r--r-- | runtime/doc/ui.txt | 10 | ||||
| -rw-r--r-- | runtime/filetype.vim | 16 | ||||
| -rw-r--r-- | runtime/lua/vim/lsp/util.lua | 2 |
4 files changed, 31 insertions, 8 deletions
diff --git a/runtime/autoload/dist/ft.vim b/runtime/autoload/dist/ft.vim index 1ac74b5785..ac80659113 100644 --- a/runtime/autoload/dist/ft.vim +++ b/runtime/autoload/dist/ft.vim @@ -172,6 +172,17 @@ func dist#ft#FTent() setf dtd endfunc +func dist#ft#ExCheck() + let lines = getline(1, min([line("$"), 100])) + if exists('g:filetype_euphoria') + exe 'setf ' . g:filetype_euphoria + elseif match(lines, '^--\|^ifdef\>\|^include\>') > -1 + setf euphoria3 + else + setf elixir + endif +endfunc + func dist#ft#EuphoriaCheck() if exists('g:filetype_euphoria') exe 'setf ' . g:filetype_euphoria diff --git a/runtime/doc/ui.txt b/runtime/doc/ui.txt index b385cab36f..e7be14e732 100644 --- a/runtime/doc/ui.txt +++ b/runtime/doc/ui.txt @@ -631,11 +631,13 @@ Tabline Events *ui-tabline* Activated by the `ext_tabline` |ui-option|. -["tabline_update", curtab, tabs] +["tabline_update", curtab, tabs, curbuf, buffers] Tabline was updated. UIs should present this data in a custom tabline - widget. - curtab: Current Tabpage - tabs: List of Dicts [{ "tab": Tabpage, "name": String }, ...] + widget. Note: options `curbuf` + `buffers` were added in API7. + curtab: Current Tabpage + tabs: List of Dicts [{ "tab": Tabpage, "name": String }, ...] + curbuf: Current buffer handle. + buffers: List of Dicts [{ "buffer": buffer handle, "name": String}, ...] ============================================================================== Cmdline Events *ui-cmdline* diff --git a/runtime/filetype.vim b/runtime/filetype.vim index 09a1d1d0e6..2617d8ffc0 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -389,7 +389,7 @@ au BufNewFile,BufRead *.cfm,*.cfi,*.cfc setf cf " Configure scripts au BufNewFile,BufRead configure.in,configure.ac setf config -" CUDA Cumpute Unified Device Architecture +" CUDA Compute Unified Device Architecture au BufNewFile,BufRead *.cu,*.cuh setf cuda " Dockerfilb; Podman uses the same syntax with name Containerfile @@ -404,8 +404,15 @@ au BufNewFile,BufRead *enlightenment/*.cfg setf c " Eterm au BufNewFile,BufRead *Eterm/*.cfg setf eterm +" Elixir or Euphoria +au BufNewFile,BufRead *.ex call dist#ft#ExCheck() + +" Elixir +au BufRead,BufNewFile mix.lock,*.exs setf elixir +au BufRead,BufNewFile *.eex,*.leex setf eelixir + " Euphoria 3 or 4 -au BufNewFile,BufRead *.eu,*.ew,*.ex,*.exu,*.exw call dist#ft#EuphoriaCheck() +au BufNewFile,BufRead *.eu,*.ew,*.exu,*.exw call dist#ft#EuphoriaCheck() if has("fname_case") au BufNewFile,BufRead *.EU,*.EW,*.EX,*.EXU,*.EXW call dist#ft#EuphoriaCheck() endif @@ -851,6 +858,9 @@ au BufNewFile,BufRead *.jov,*.j73,*.jovial setf jovial " JSON au BufNewFile,BufRead *.json,*.jsonp,*.webmanifest setf json +" JSON Patch (RFC 6902) +au BufNewFile,BufRead *.json-patch setf json + " Jupyter Notebook is also json au BufNewFile,BufRead *.ipynb setf json @@ -1495,7 +1505,7 @@ au BufNewFile,BufRead *.sass setf sass au BufNewFile,BufRead *.sa setf sather " Scala -au BufNewFile,BufRead *.scala setf scala +au BufNewFile,BufRead *.scala,*.sc setf scala " SBT - Scala Build Tool au BufNewFile,BufRead *.sbt setf sbt diff --git a/runtime/lua/vim/lsp/util.lua b/runtime/lua/vim/lsp/util.lua index 08437063a3..195e3a0e65 100644 --- a/runtime/lua/vim/lsp/util.lua +++ b/runtime/lua/vim/lsp/util.lua @@ -1153,7 +1153,7 @@ function M.stylize_markdown(bufnr, contents, opts) table.insert(highlights, { ft = match.ft; start = start + 1; - finish = #stripped + 1 - 1; + finish = #stripped; }) else table.insert(stripped, line) |