Skip to content

Commit 3ae5db3

Browse files
committed
[remote-nvim] Display if running in remote
1 parent 6f0047a commit 3ae5db3

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

lua/custom/plugins/mini.lua

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,17 @@ return { -- Collection of various small independent plugins/modules
2828
-- cursor information with codeium status instead (it appears on the furthest right of the statusline).
2929
---@diagnostic disable-next-line: duplicate-set-field
3030
statusline.section_location = function()
31-
-- return vim.api.nvim_call_function('codeium#GetStatusString', {})
32-
return require('codeium.virtual_text').status_string()
31+
local value = ''
32+
local codeium = require('codeium.virtual_text').status_string()
33+
value = value .. codeium
34+
35+
-- check if this is an nvim-remote instance
36+
if vim.g.remote_neovim_host then
37+
local remote_name = (" | Remote: %s"):format(vim.uv.os_gethostname()) or ""
38+
value = value .. remote_name
39+
end
40+
41+
return value
3342
end
3443

3544
-- ... and there is more!

lua/custom/plugins/remote-nvim.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ return {
2626
})
2727
end,
2828

29-
-- Remote configuration
29+
-- Remote configuration
3030
remote = {
3131
-- List of directories that should be copied over
3232
copy_dirs = {
@@ -40,8 +40,8 @@ return {
4040
},
4141
-- What to copy to remote's Neovim cache directory
4242
cache = {
43-
base = vim.env.HOME, -- vim.fn.stdpath("cache"),
44-
dirs = {'.codeium'},
43+
base = vim.fn.stdpath("cache"),
44+
dirs = {'codeium'},
4545
compression = {
4646
enabled = true,
4747
},

0 commit comments

Comments
 (0)