diff options
-rw-r--r-- | lua/tjk/options.lua | 9 | ||||
-rw-r--r-- | lua/tjk/plugins/colorizer.lua | 1 | ||||
-rw-r--r-- | lua/tjk/plugins/colorscheme.lua | 7 | ||||
-rw-r--r-- | lua/tjk/plugins/indentblankline.lua | 1 |
4 files changed, 11 insertions, 7 deletions
diff --git a/lua/tjk/options.lua b/lua/tjk/options.lua index ee54753..945536a 100644 --- a/lua/tjk/options.lua +++ b/lua/tjk/options.lua @@ -28,7 +28,7 @@ opt.smartcase = true -- ...unless the search term is capital -- experimental opt.smartindent = true -opt.wildmode = "longest:list:full" -- Better auto-complete +--opt.wildmode = "longest:list:full" -- Better auto-complete -- dont continue comments on to new lines (:help fo-table) api.nvim_create_autocmd("FileType", { pattern = "*", callback = function() @@ -37,3 +37,10 @@ end}) -- ignore __pycache__ directories in file listings opt.wildignore = "__pycache__/,*/__pycache__/" + +-- for running in tty +if os.getenv "TERM" == "linux" then + vim.cmd.colorscheme "vim" + opt.termguicolors = false + opt.list = false +end diff --git a/lua/tjk/plugins/colorizer.lua b/lua/tjk/plugins/colorizer.lua index f4f3868..964b6f4 100644 --- a/lua/tjk/plugins/colorizer.lua +++ b/lua/tjk/plugins/colorizer.lua @@ -1,5 +1,6 @@ return { "norcalli/nvim-colorizer.lua", -- css color highlighter + enabled = vim.opt.termguicolors._value, opts = { "css", "sass", diff --git a/lua/tjk/plugins/colorscheme.lua b/lua/tjk/plugins/colorscheme.lua index bb62cb3..2bffef6 100644 --- a/lua/tjk/plugins/colorscheme.lua +++ b/lua/tjk/plugins/colorscheme.lua @@ -4,14 +4,9 @@ if os.getenv "USER" == "root" then return {} end --- disable gruvbox and termguicolors when in a tty -if os.getenv "DISPLAY" == nil then - vim.opt.termguicolors = false - return {} -end - return { "ellisonleao/gruvbox.nvim", + enabled = vim.opt.termguicolors._value, priority = 9001, config = function() vim.o.background = "dark" diff --git a/lua/tjk/plugins/indentblankline.lua b/lua/tjk/plugins/indentblankline.lua index bba7c1a..826f1ae 100644 --- a/lua/tjk/plugins/indentblankline.lua +++ b/lua/tjk/plugins/indentblankline.lua @@ -1,5 +1,6 @@ return { "lukas-reineke/indent-blankline.nvim", + enabled = vim.opt.termguicolors._value, main = "ibl", opts = { scope = { enabled = false }; |