From 5cb5fda6bd45781c5dfdbde2b0d41dbeecd9ba74 Mon Sep 17 00:00:00 2001 From: joygnu Date: Mon, 8 Jul 2024 19:43:04 +0200 Subject: [PATCH] neovim --- home/misc/default.nix | 3 +- home/neovim/default.nix | 50 ++++++++++----------- home/neovim/plugins/alpha.nix | 78 --------------------------------- home/neovim/plugins/default.nix | 1 - home/neovim/set.nix | 28 ------------ 5 files changed, 24 insertions(+), 136 deletions(-) delete mode 100644 home/neovim/plugins/alpha.nix delete mode 100644 home/neovim/set.nix diff --git a/home/misc/default.nix b/home/misc/default.nix index 795d056..1570651 100644 --- a/home/misc/default.nix +++ b/home/misc/default.nix @@ -10,7 +10,8 @@ home.username = "joy"; EDITOR = "nvim"; }; qt.enable = true; - qt.style.name = "adwaita"; + qt.platformTheme.name = "gtk"; + qt.style.name = "adwaita-dark"; xdg.mimeApps.defaultApplications = { "text/plain" = ["neovide.desktop"]; diff --git a/home/neovim/default.nix b/home/neovim/default.nix index e56a499..5fcbb11 100644 --- a/home/neovim/default.nix +++ b/home/neovim/default.nix @@ -1,44 +1,38 @@ -{ ... }: +{ ... }: { - imports = [ - ./plugins - ./set.nix - ]; + imports = [ + ./plugins + ]; programs.nixvim = { enable = true; defaultEditor = true; - vimAlias = true; clipboard.register = "unnamedplus"; colorschemes.gruvbox.enable = true; plugins = { - presence-nvim = { - enable = true; - mainImage = "file"; - }; - bufferline = { - enable = true; - separatorStyle = "slope"; - }; treesitter = { enable = true; indent = true; nixvimInjections = true; }; - treesitter-context.enable = true; - nvim-tree = { - enable = true; - renderer.groupEmpty = true; - }; - lualine.enable = true; + lualine.enable = true; + }; + + opts = { + number = true; + tabstop = 2; + softtabstop = 2; + showtabline = 2; + expandtab = true; + shiftwidth = 2; + smartindent = true; + breakindent = true; + cursorline = true; + scrolloff = 8; + cmdheight = 0; + wrap = true; + termguicolors = true; + showmode = false; }; - - keymaps = [ - { - mode = "n"; - key = ""; - action = "NvimTreeToggle"; - } - ]; }; } diff --git a/home/neovim/plugins/alpha.nix b/home/neovim/plugins/alpha.nix deleted file mode 100644 index 3975997..0000000 --- a/home/neovim/plugins/alpha.nix +++ /dev/null @@ -1,78 +0,0 @@ -{ ... }: -{ - programs.nixvim.plugins.alpha = { - enable = true; - layout = [ - { - type = "padding"; - val = 4; - } - { - opts = { - hl = "AlphaHeader"; - position = "center"; - }; - type = "text"; - val = [ - " ▄▄▄█████▓ ▒█████ ███▄ ▄███▓ " - " ▓ ██▒ ▓▒▒██▒ ██▒▓██▒▀█▀ ██▒ " - " ▒ ▓██░ ▒░▒██░ ██▒▓██ ▓██░ " - " ░ ▓██▓ ░ ▒██ ██░▒██ ▒██ " - " ▒██▒ ░ ░ ████▓▒░▒██▒ ░██▒ " - " ▒ ░░ ░ ▒░▒░▒░ ░ ▒░ ░ ░ " - " ░ ░ ▒ ▒░ ░ ░ ░ " - " ░ ░ ░ ░ ▒ ░ ░ " - " ░ ░ ░ " - " " - " git@github.com:TomJuri " - ]; - } - { - type = "padding"; - val = 2; - } - { - type = "group"; - val = let - mkButton = shortcut: cmd: val: hl: { - type = "button"; - inherit val; - opts = { - inherit hl shortcut; - keymap = [ - "n" - shortcut - cmd - {} - ]; - position = "center"; - cursor = 0; - width = 40; - align_shortcut = "right"; - hl_shortcut = "Keyword"; - }; - }; - in [ - ( - mkButton - "f" - "lua require('telescope.builtin').find_files({hidden = true})" - "🔍 Find File" - "Operator" - ) - ( - mkButton - "q" - "qa" - "💣 Quit" - "String" - ) - ]; - } - { - type = "padding"; - val = 2; - } - ]; - }; -} diff --git a/home/neovim/plugins/default.nix b/home/neovim/plugins/default.nix index 80a20e4..589a4f5 100644 --- a/home/neovim/plugins/default.nix +++ b/home/neovim/plugins/default.nix @@ -1,7 +1,6 @@ { ... }: { imports = [ - ./alpha.nix ./cmp.nix ./lsp.nix ./luasnip.nix diff --git a/home/neovim/set.nix b/home/neovim/set.nix deleted file mode 100644 index da15fa0..0000000 --- a/home/neovim/set.nix +++ /dev/null @@ -1,28 +0,0 @@ -{ ... }: -{ - programs.nixvim = { - globals.mapleader = " "; - - opts = { - number = true; - relativenumber = true; - - tabstop = 2; - softtabstop = 2; - showtabline = 2; - expandtab = true; - - shiftwidth = 2; - smartindent = true; - - breakindent = true; - cursorline = true; - scrolloff = 8; - cmdheight = 0; - wrap = true; - termguicolors = true; - colorcolumn = "150"; - showmode = false; - }; - }; -}