From fbd0f6658f960a069f8fef09f5f91c4b11259977 Mon Sep 17 00:00:00 2001 From: dundargoc Date: Tue, 12 Dec 2023 16:42:02 +0100 Subject: docs: add installation and build guides from wiki to repo --- runtime/lua/nvim/health.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'runtime/lua/nvim') diff --git a/runtime/lua/nvim/health.lua b/runtime/lua/nvim/health.lua index 6b6370fa19..afab6f824d 100644 --- a/runtime/lua/nvim/health.lua +++ b/runtime/lua/nvim/health.lua @@ -17,7 +17,7 @@ local shell_error = function() return vim.v.shell_error ~= 0 end -local suggest_faq = 'https://github.com/neovim/neovim/wiki/Building-Neovim#optimized-builds' +local suggest_faq = 'https://github.com/neovim/neovim/blob/docs/install/BUILD.md#building' local function check_runtime() health.start('Runtime') -- cgit From 88eb0ad149d353c475455e4013cafa6db2a3f9f1 Mon Sep 17 00:00:00 2001 From: Tristan Partin Date: Thu, 4 Jan 2024 15:51:52 -0600 Subject: fix(health): fix tmux RGB capability detection (#26886) tmux indicates its RGB support via setrgbb and setrgbf. In modern tmux code, Tc and RGB just set setrgbb and setrgbf, so we can just check for them. Link: https://github.com/tmux/tmux/commit/7eb496c00c313c2f8ab8debe6d154d5ac0db277b --- runtime/lua/nvim/health.lua | 29 +++++++++++------------------ 1 file changed, 11 insertions(+), 18 deletions(-) (limited to 'runtime/lua/nvim') diff --git a/runtime/lua/nvim/health.lua b/runtime/lua/nvim/health.lua index afab6f824d..5a643db0ba 100644 --- a/runtime/lua/nvim/health.lua +++ b/runtime/lua/nvim/health.lua @@ -324,24 +324,17 @@ local function check_tmux() end -- check for RGB capabilities - local info = vim.fn.system({ 'tmux', 'display-message', '-p', '#{client_termfeatures}' }) - info = vim.split(vim.trim(info), ',', { trimempty = true }) - if not vim.list_contains(info, 'RGB') then - local has_rgb = false - if #info == 0 then - -- client_termfeatures may not be supported; fallback to checking show-messages - info = vim.fn.system({ 'tmux', 'show-messages', '-JT' }) - has_rgb = info:find(' Tc: (flag) true', 1, true) or info:find(' RGB: (flag) true', 1, true) - end - if not has_rgb then - health.warn( - "Neither Tc nor RGB capability set. True colors are disabled. |'termguicolors'| won't work properly.", - { - "Put this in your ~/.tmux.conf and replace XXX by your $TERM outside of tmux:\nset-option -sa terminal-features ',XXX:RGB'", - "For older tmux versions use this instead:\nset-option -ga terminal-overrides ',XXX:Tc'", - } - ) - end + local info = vim.fn.system({ 'tmux', 'show-messages', '-T' }) + local has_setrgbb = vim.fn.stridx(info, ' setrgbb: (string)') ~= -1 + local has_setrgbf = vim.fn.stridx(info, ' setrgbf: (string)') ~= -1 + if not has_setrgbb or not has_setrgbf then + health.warn( + "True color support could not be detected. |'termguicolors'| won't work properly.", + { + "Add the following to your tmux configuration file, replacing XXX by the value of $TERM outside of tmux:\nset-option -a terminal-features 'XXX:RGB'", + "For older tmux versions use this instead:\nset-option -a terminal-overrides 'XXX:Tc'", + } + ) end end -- cgit From eb5d15e3838f53e2fcd25989c88db87458e9f984 Mon Sep 17 00:00:00 2001 From: dundargoc Date: Sun, 7 Jan 2024 13:05:03 +0100 Subject: refactor: rewrite python provider in lua --- runtime/lua/nvim/health.lua | 4 ---- 1 file changed, 4 deletions(-) (limited to 'runtime/lua/nvim') diff --git a/runtime/lua/nvim/health.lua b/runtime/lua/nvim/health.lua index 5a643db0ba..1a440c9827 100644 --- a/runtime/lua/nvim/health.lua +++ b/runtime/lua/nvim/health.lua @@ -183,10 +183,6 @@ local function check_rplugin_manifest() health.start('Remote Plugins') local existing_rplugins = {} - for _, item in ipairs(vim.fn['remote#host#PluginsForHost']('python')) do - existing_rplugins[item.path] = 'python' - end - for _, item in ipairs(vim.fn['remote#host#PluginsForHost']('python3')) do existing_rplugins[item.path] = 'python3' end -- cgit From 50cd5ed360ee76352bdfe1a49fa5746731c0ee16 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Sun, 28 Jan 2024 12:44:32 -0800 Subject: fix(health): check more "old" files --- runtime/lua/nvim/health.lua | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'runtime/lua/nvim') diff --git a/runtime/lua/nvim/health.lua b/runtime/lua/nvim/health.lua index 1a440c9827..0480e4df4e 100644 --- a/runtime/lua/nvim/health.lua +++ b/runtime/lua/nvim/health.lua @@ -23,9 +23,15 @@ local function check_runtime() health.start('Runtime') -- Files from an old installation. local bad_files = { + ['plugin/health.vim'] = false, + ['autoload/health/nvim.vim'] = false, + ['autoload/health/provider.vim'] = false, + ['autoload/man.vim'] = false, ['plugin/man.vim'] = false, + ['queries/help/highlights.scm'] = false, + ['queries/help/injections.scm'] = false, ['scripts.vim'] = false, - ['autoload/man.vim'] = false, + ['syntax/syncolor.vim'] = false, } local bad_files_msg = '' for k, _ in pairs(bad_files) do @@ -42,10 +48,10 @@ local function check_runtime() if not ok then health.error( string.format( - '$VIMRUNTIME has files from an old installation (this can cause weird behavior):\n%s', + 'Found old files in $VIMRUNTIME (this can cause weird behavior):\n%s', bad_files_msg ), - { 'Delete $VIMRUNTIME (or uninstall Nvim), then reinstall Nvim.' } + { 'Delete the $VIMRUNTIME directory (or uninstall Nvim), then reinstall Nvim.' } ) end end -- cgit