From 4a05a27e54774638328e08d82484b1c493117980 Mon Sep 17 00:00:00 2001 From: Christoffer Martinsson Date: Thu, 15 Jun 2023 11:17:43 +0200 Subject: [PATCH] Updated theme --- config/nvim/init.lua | 65 +++++++++++++++---- .../lua/lualine/themes/nightly_cm.lua | 2 +- nightly_cm.nvim/lua/nightly_cm/theme.lua | 1 + 3 files changed, 55 insertions(+), 13 deletions(-) diff --git a/config/nvim/init.lua b/config/nvim/init.lua index a1cccb8..b070c4e 100644 --- a/config/nvim/init.lua +++ b/config/nvim/init.lua @@ -57,6 +57,17 @@ vim.o.wrap = false -- vim.o.cmdheight = 0 +-- show cursor line only in active window +local cursorLineGrp = vim.api.nvim_create_augroup("CursorLine", { clear = true }) +vim.api.nvim_create_autocmd( + { "InsertLeave", "WinEnter" }, + { pattern = "*", command = "set cursorline", group = cursorLineGrp } +) +vim.api.nvim_create_autocmd( + { "InsertEnter", "WinLeave" }, + { pattern = "*", command = "set nocursorline", group = cursorLineGrp } +) + ------------------------------------------------------------------- -- Plugin management ------------------------------------------------------------------- @@ -329,6 +340,9 @@ require('lazy').setup({ config = function() require("neo-tree").setup { close_if_last_window = true, + default_component_configs = { + indent = { padding = 0, indent_size = 1 }, + }, commands = { parent_or_close = function(state) local node = state.tree:get_node() @@ -343,11 +357,11 @@ require('lazy').setup({ if node.type == "directory" or node:has_children() then if not node:is_expanded() then -- if unexpanded, expand state.commands.toggle_node(state) - else -- if expanded and has children, seleect the next child + else -- if expanded and has children, seleect the next child require("neo-tree.ui.renderer").focus_node(state, node:get_child_ids()[1]) end else -- if not a directory just open it - state.commands.open(state) + state.commands.open_with_window_picker(state) end end, copy_selector = function(state) @@ -390,21 +404,22 @@ require('lazy').setup({ width = 30, mappings = { [""] = false, -- disable space until we figure out which-key disabling - o = "open", h = "parent_or_close", l = "child_or_open", Y = "copy_selector", }, }, - } - end, - }, - - { - "levouh/tint.nvim", - config = function() - require("tint").setup { - highlight_ignore_patterns = { "EndOfBuffer" }, + -- filesystem = { + -- follow_current_file = false, + -- hijack_netrw_behavior = "open_current", + -- use_libuv_file_watcher = true, + -- }, + -- event_handlers = { + -- { + -- event = "neo_tree_buffer_enter", + -- handler = function(_) vim.opt_local.signcolumn = "auto" end, + -- }, + -- }, } end, }, @@ -428,6 +443,31 @@ require('lazy').setup({ end, }, + { + "s1n7ax/nvim-window-picker", + opts = { + use_winbar = "smart", + highlights = { + statusline = { + unfocused = { + fg = '#d7af5f', + bg = '#262626', + bold = true, + }, + }, + }, + } + }, + + -- { + -- "levouh/tint.nvim", + -- config = function() + -- require("tint").setup { + -- highlight_ignore_patterns = { "EndOfBuffer" }, + -- } + -- end, + -- }, + }, {}) ------------------------------------------------------------------- @@ -701,6 +741,7 @@ require('nvim-treesitter.configs').setup { }, } + -- resizing splits vim.keymap.set('n', '', require('smart-splits').resize_left, { desc = 'Resize left' }) vim.keymap.set('n', '', require('smart-splits').resize_down, { desc = 'Resize down' }) diff --git a/nightly_cm.nvim/lua/lualine/themes/nightly_cm.lua b/nightly_cm.nvim/lua/lualine/themes/nightly_cm.lua index c184f51..fbfbda4 100644 --- a/nightly_cm.nvim/lua/lualine/themes/nightly_cm.lua +++ b/nightly_cm.nvim/lua/lualine/themes/nightly_cm.lua @@ -26,7 +26,7 @@ local nightly = { }, terminal = { - a = { bg = "#87afd7", fg = "#0c0c0c" }, + a = { bg = "#d7af5f", fg = "#0c0c0c" }, b = { bg = "#303030", fg = "#c6c6c6" }, }, diff --git a/nightly_cm.nvim/lua/nightly_cm/theme.lua b/nightly_cm.nvim/lua/nightly_cm/theme.lua index 0337fae..980ff68 100644 --- a/nightly_cm.nvim/lua/nightly_cm/theme.lua +++ b/nightly_cm.nvim/lua/nightly_cm/theme.lua @@ -20,6 +20,7 @@ function theme.setup() Conditional = { fg = p.color6 }, Constant = { fg = p.color7 }, Cursor = { fg = p.foreground, bg = p.foreground }, + CursorNC = { fg = "NONE", bg = "NONE" }, CurSearch = { link = "IncSearch" }, CursorColumn = { bg = p.background }, CursorIM = { fg = p.foreground, bg = p.foreground },