aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/lua/vim')
-rw-r--r--runtime/lua/vim/filetype.lua2
-rw-r--r--runtime/lua/vim/lsp/util.lua4
-rw-r--r--runtime/lua/vim/treesitter/highlighter.lua10
3 files changed, 14 insertions, 2 deletions
diff --git a/runtime/lua/vim/filetype.lua b/runtime/lua/vim/filetype.lua
index ab71de54f8..2194db95a9 100644
--- a/runtime/lua/vim/filetype.lua
+++ b/runtime/lua/vim/filetype.lua
@@ -1424,6 +1424,8 @@ local pattern = {
return "git"
end
end,
+ -- Neovim only
+ [".*/queries/.*%.scm"] = "query", -- tree-sitter queries
-- END PATTERN
}
-- luacheck: pop
diff --git a/runtime/lua/vim/lsp/util.lua b/runtime/lua/vim/lsp/util.lua
index cec3891418..401dac9acd 100644
--- a/runtime/lua/vim/lsp/util.lua
+++ b/runtime/lua/vim/lsp/util.lua
@@ -360,7 +360,7 @@ end
--- Applies a list of text edits to a buffer.
---@param text_edits table list of `TextEdit` objects
---@param bufnr number Buffer id
----@param offset_encoding string utf-8|utf-16|utf-32 defaults to encoding of first client of `bufnr`
+---@param offset_encoding string utf-8|utf-16|utf-32
---@see https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textEdit
function M.apply_text_edits(text_edits, bufnr, offset_encoding)
validate {
@@ -1138,7 +1138,7 @@ function M.stylize_markdown(bufnr, contents, opts)
block = {nil, "```+([a-zA-Z0-9_]*)", "```+"},
pre = {"", "<pre>", "</pre>"},
code = {"", "<code>", "</code>"},
- text = {"plaintex", "<text>", "</text>"},
+ text = {"text", "<text>", "</text>"},
}
local match_begin = function(line)
diff --git a/runtime/lua/vim/treesitter/highlighter.lua b/runtime/lua/vim/treesitter/highlighter.lua
index e1ffd42a7f..0ec4ab37ec 100644
--- a/runtime/lua/vim/treesitter/highlighter.lua
+++ b/runtime/lua/vim/treesitter/highlighter.lua
@@ -38,6 +38,9 @@ local subcapture_fallback = {
TSHighlighter.hl_map = setmetatable({
["error"] = "Error",
+ ["text.underline"] = "Underlined",
+ ["todo"] = "Todo",
+ ["debug"] = "Debug",
-- Miscs
["comment"] = "Comment",
@@ -49,10 +52,13 @@ TSHighlighter.hl_map = setmetatable({
["constant"] = "Constant",
["constant.builtin"] = "Special",
["constant.macro"] = "Define",
+ ["define"] = "Define",
+ ["macro"] = "Macro",
["string"] = "String",
["string.regex"] = "String",
["string.escape"] = "SpecialChar",
["character"] = "Character",
+ ["character.special"] = "SpecialChar",
["number"] = "Number",
["boolean"] = "Boolean",
["float"] = "Float",
@@ -78,8 +84,12 @@ TSHighlighter.hl_map = setmetatable({
["type"] = "Type",
["type.builtin"] = "Type",
+ ["type.qualifier"] = "Type",
+ ["type.definition"] = "Typedef",
+ ["storageclass"] = "StorageClass",
["structure"] = "Structure",
["include"] = "Include",
+ ["preproc"] = "PreProc",
}, subcapture_fallback)
---@private