From 2613ba5000d4c0d9b15e2eec2d2b97615575925e Mon Sep 17 00:00:00 2001 From: Gregory Anders Date: Tue, 5 Dec 2023 10:01:32 -0800 Subject: feat(defaults): enable 'termguicolors' by default when supported by terminal Enable 'termguicolors' automatically when Nvim can detect that truecolor is supported by the host terminal. If $COLORTERM is set to "truecolor" or "24bit", or the terminal's terminfo entry contains capabilities for Tc, RGB, or setrgbf and setrgbb, then we assume that the terminal supports truecolor. Otherwise, the terminal is queried (using both XTGETTCAP and SGR + DECRQSS). If the terminal's response to these queries (if any) indicates that it supports truecolor, then 'termguicolors' is enabled. --- runtime/lua/vim/_meta.lua | 1 + 1 file changed, 1 insertion(+) (limited to 'runtime/lua/vim/_meta.lua') diff --git a/runtime/lua/vim/_meta.lua b/runtime/lua/vim/_meta.lua index e3b99f6b3d..bb9ed722e2 100644 --- a/runtime/lua/vim/_meta.lua +++ b/runtime/lua/vim/_meta.lua @@ -20,6 +20,7 @@ vim.lsp = require('vim.lsp') vim.re = require('vim.re') vim.secure = require('vim.secure') vim.snippet = require('vim.snippet') +vim.text = require('vim.text') vim.treesitter = require('vim.treesitter') vim.ui = require('vim.ui') vim.version = require('vim.version') -- cgit From 92204b06e7365cf4c68e6ea8258dce801f0a5df9 Mon Sep 17 00:00:00 2001 From: Steven Arcangeli <506791+stevearc@users.noreply.github.com> Date: Fri, 22 Dec 2023 02:40:01 -0800 Subject: refactor(lsp): move glob parsing to util (#26519) refactor(lsp): move glob parsing to vim.glob Moving the logic for using vim.lpeg to create a match pattern from a glob into `vim.glob`. There are several places in the LSP spec that use globs, and it's very useful to have glob matching as a generally-available utility. --- runtime/lua/vim/_meta.lua | 1 + 1 file changed, 1 insertion(+) (limited to 'runtime/lua/vim/_meta.lua') diff --git a/runtime/lua/vim/_meta.lua b/runtime/lua/vim/_meta.lua index bb9ed722e2..4c50627fe4 100644 --- a/runtime/lua/vim/_meta.lua +++ b/runtime/lua/vim/_meta.lua @@ -11,6 +11,7 @@ vim.diagnostic = require('vim.diagnostic') vim.filetype = require('vim.filetype') vim.fs = require('vim.fs') vim.func = require('vim.func') +vim.glob = require('vim.glob') vim.health = require('vim.health') vim.highlight = require('vim.highlight') vim.iter = require('vim.iter') -- cgit From 9f8c96240dc0318bd92a646966917e8fe0641144 Mon Sep 17 00:00:00 2001 From: Lewis Russell Date: Mon, 12 Feb 2024 13:46:32 +0000 Subject: refactor(lsp): resolve the config-client entanglement Previously the LSP-Client object contained some fields that are also in the client config, but for a lot of other fields, the config was used directly making the two objects vaguely entangled with either not having a clear role. Now the config object is treated purely as config (read-only) from the client, and any fields the client needs from the config are now copied in as additional fields. This means: - the config object is no longet normalised and is left as the user provided it. - the client only reads the config on creation of the client and all other implementations now read the clients version of the fields. In addition, internal support for multiple callbacks has been added to the client so the client tracking logic (done in lua.lsp) can be done more robustly instead of wrapping the user callbacks which may error. --- runtime/lua/vim/_meta.lua | 2 ++ 1 file changed, 2 insertions(+) (limited to 'runtime/lua/vim/_meta.lua') diff --git a/runtime/lua/vim/_meta.lua b/runtime/lua/vim/_meta.lua index 4c50627fe4..731dd5b923 100644 --- a/runtime/lua/vim/_meta.lua +++ b/runtime/lua/vim/_meta.lua @@ -1,5 +1,7 @@ --- @meta +--- @alias elem_or_list T|T[] + ---@type uv vim.uv = ... -- cgit