diff --git a/assets/screenshot.png b/assets/screenshot.png deleted file mode 100644 index e26b02e..0000000 Binary files a/assets/screenshot.png and /dev/null differ diff --git a/config/default.nix b/config/default.nix index da46687..960d573 100644 --- a/config/default.nix +++ b/config/default.nix @@ -1,22 +1,15 @@ { pkgs, ... }: { imports = [ + ./keybindings.nix ./opts.nix - ./lsp.nix - ./cmp.nix - ./keymaps.nix ./plugins ]; colorschemes.catppuccin.enable = true; - extraPackages = with pkgs; [ - wl-clipboard - ]; clipboard = { register = "unnamedplus"; providers.wl-copy.enable = true; providers.wl-copy.package = pkgs.wl-clipboard; - providers.xclip.enable = true; - providers.xclip.package = pkgs.xclip; }; } diff --git a/config/keybindings.nix b/config/keybindings.nix new file mode 100644 index 0000000..ed19f8e --- /dev/null +++ b/config/keybindings.nix @@ -0,0 +1,52 @@ +{ ... }: +let + defaultOptions = { + silent = true; + }; +in +{ + keymaps = [ + { + key = "e"; + action = ":Neotree toggle"; + options = defaultOptions; + } + { + key = ""; + action = ":w"; + } + { + key = ""; + action = ":bdelete"; + options = defaultOptions; + } + { + key = ""; + action = ":bnext"; + options = defaultOptions; + } + { + key = ""; + action = ":bprevious"; + options = defaultOptions; + } + { + key = ""; + action = ":lua vim.lsp.buf.format()"; + options = defaultOptions; + } + { + action = ":ToggleTerm direction=float"; + key = "t"; + } + { + action = ""; + key = ""; + options = { + silent = true; + desc = "Exit terminal insert mode"; + }; + mode = "t"; + } + ]; +} diff --git a/config/keymaps.nix b/config/keymaps.nix deleted file mode 100644 index 32c3881..0000000 --- a/config/keymaps.nix +++ /dev/null @@ -1,174 +0,0 @@ -{ ... }: -{ - keymaps = [ - { - action = ":bnext"; - key = ""; - options = { - silent = true; - desc = "Next tab"; - }; - mode = "n"; - } - { - action = ":bprevious"; - key = ""; - options = { - silent = true; - desc = "Previous tab"; - }; - mode = "n"; - } - { - action = ":bdelete"; - key = ""; - options = { - silent = true; - desc = "Next tab"; - }; - mode = "n"; - } - { - action = ""; - key = ""; - options = { - silent = true; - desc = "Exit terminal insert mode"; - }; - mode = "t"; - } - { - action = ":w"; - key = ""; - options = { - silent = true; - desc = "Save"; - }; - mode = "n"; - } - { - action = ":lua vim.lsp.buf.format()"; - key = ""; - options = { - silent = true; - desc = "Format buffer"; - }; - mode = "n"; - } - { - action = ":q"; - key = ""; - options = { - silent = true; - desc = "Quit"; - }; - mode = "n"; - } - { - action = ":wincmd l"; - key = "wl"; - options = { - silent = true; - desc = "Go to left panel"; - }; - mode = "n"; - } - { - action = ":wincmd k"; - key = "wk"; - options = { - silent = true; - desc = "Go to upper panel"; - }; - mode = "n"; - } - { - action = ":wincmd j"; - key = "wj"; - options = { - silent = true; - desc = "Go to down panel"; - }; - mode = "n"; - } - { - action = ":wincmd h"; - key = "wh"; - options = { - silent = true; - desc = "Go to left panel"; - }; - mode = "n"; - } - { - action = "$"; - key = "gl"; - options = { - silent = true; - desc = "Go to end line"; - }; - mode = [ - "n" - "v" - ]; - } - { - action = "^"; - key = "gh"; - options = { - silent = true; - desc = "Go to start line"; - }; - mode = [ - "n" - "v" - ]; - } - { - action = ":lua Snacks.explorer()"; - key = "e"; - options = { - silent = true; - desc = "Toggle file explorer"; - }; - mode = "n"; - } - # ToggleTerm - { - action = ":ToggleTerm direction=float"; - key = "t"; - options = { - silent = true; - desc = "Toggle terminal"; - }; - mode = "n"; - } - # Dap - { - action.__raw = '' - function() - require("dap").toggle_breakpoint() - end - ''; - key = "b"; - mode = "n"; - options = { - silent = true; - desc = "Toggle breakpoint"; - }; - } - { - action.__raw = '' - function() - require("dapui").toggle() - end - ''; - key = "y"; - mode = "n"; - options = { - silent = true; - desc = "Toggle debugger"; - }; - } - ]; -} diff --git a/config/opts.nix b/config/opts.nix index a95dbc5..4ceb43c 100644 --- a/config/opts.nix +++ b/config/opts.nix @@ -1,17 +1,18 @@ { ... }: { opts = { + cursorline = true; number = true; relativenumber = true; - signcolumn = "yes"; - splitright = true; - splitbelow = true; - cursorline = true; scrolloff = 5; - undofile = true; - ignorecase = true; + shiftwidth = 4; + signcolumn = "yes"; + autoindent = true; + updatetime = 200; smartcase = true; - gdefault = true; + ignorecase = true; termguicolors = true; + gdefault = true; + cursorlineopt = "both"; }; } diff --git a/config/plugins/blink-indent.nix b/config/plugins/blink-indent.nix new file mode 100644 index 0000000..89fb37f --- /dev/null +++ b/config/plugins/blink-indent.nix @@ -0,0 +1,10 @@ +{ ... }: +{ + plugins.guess-indent = { + enable = true; + settings = { + underline.enable = true; + static.enable = true; + }; + }; +} diff --git a/config/cmp.nix b/config/plugins/cmp.nix similarity index 91% rename from config/cmp.nix rename to config/plugins/cmp.nix index 4176690..4369731 100644 --- a/config/cmp.nix +++ b/config/plugins/cmp.nix @@ -13,6 +13,8 @@ { name = "path"; } { name = "buffer"; } { name = "dap"; } + { name = "blink-emoji"; } + { name = "blink-ripgrep"; } ]; mapping = { "" = "cmp.mapping.select_next_item()"; diff --git a/config/plugins/cursorline.nix b/config/plugins/cursorline.nix new file mode 100644 index 0000000..a124827 --- /dev/null +++ b/config/plugins/cursorline.nix @@ -0,0 +1,20 @@ +{ ... }: +{ + plugins.cursorline = { + enable = true; + settings = { + cursorline = { + enable = true; + timeout = 0; + number = false; + }; + cursorword = { + enable = true; + minLength = 3; + hl = { + underline = true; + }; + }; + }; + }; +} diff --git a/config/plugins/dap.nix b/config/plugins/dap.nix deleted file mode 100644 index 99c524e..0000000 --- a/config/plugins/dap.nix +++ /dev/null @@ -1,66 +0,0 @@ -{ pkgs, ... }: -{ - plugins = { - dap = { - enable = true; - adapters = { - executables = { - gdb = { - command = "gdb"; - args = [ - "-i" - "dap" - ]; - }; - lldb = { - command = "lldb"; - }; - }; - servers = { - codelldb = { - port = 13000; - executable = { - command = "${pkgs.vscode-extensions.vadimcn.vscode-lldb}/share/vscode/extensions/vadimcn.vscode-lldb/adapter/codelldb"; - args = [ - "--port" - "13000" - ]; - }; - }; - }; - }; - configurations = { - cpp = [ - { - name = "Launch GDB"; - type = "gdb"; - request = "launch"; - program.__raw = '' - function() - return vim.fn.input("Path to executable: ", vim.fn.getcwd() .. "/", "file") - end''; - } - { - name = "Launch LLDB"; - type = "lldb"; - request = "launch"; - program.__raw = '' - function() - return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file') - end''; - } - { - name = "Launch CodeLLDB"; - type = "codelldb"; - request = "launch"; - program.__raw = '' - function() - return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file') - end''; - } - ]; - }; - }; - dap-ui.enable = true; - }; -} diff --git a/config/plugins/dashboard.nix b/config/plugins/dashboard.nix deleted file mode 100644 index 825dc6b..0000000 --- a/config/plugins/dashboard.nix +++ /dev/null @@ -1,20 +0,0 @@ -{ ... }: -{ - plugins.dashboard = { - enable = true; - settings.config = { - header = [ - " ███▄ █ ▓█████ ▒█████ ██▒ █▓ ██▓ ███▄ ▄███▓" - " ██ ▀█ █ ▓█ ▀ ▒██▒ ██▒▓██░ █▒▓██▒▓██▒▀█▀ ██▒" - "▓██ ▀█ ██▒▒███ ▒██░ ██▒ ▓██ █▒░▒██▒▓██ ▓██░" - "▓██▒ ▐▌██▒▒▓█ ▄ ▒██ ██░ ▒██ █░░░██░▒██ ▒██ " - "▒██░ ▓██░░▒████▒░ ████▓▒░ ▒▀█░ ░██░▒██▒ ░██▒" - "░ ▒░ ▒ ▒ ░░ ▒░ ░░ ▒░▒░▒░ ░ ▐░ ░▓ ░ ▒░ ░ ░" - "░ ░░ ░ ▒░ ░ ░ ░ ░ ▒ ▒░ ░ ░░ ▒ ░░ ░ ░" - " ░ ░ ░ ░ ░ ░ ░ ▒ ░░ ▒ ░░ ░ " - " ░ ░ ░ ░ ░ ░ ░ ░ " - ]; - footer = [ "Made with ❤️" ]; - }; - }; -} diff --git a/config/plugins/default.nix b/config/plugins/default.nix index 234332a..c90ba8b 100644 --- a/config/plugins/default.nix +++ b/config/plugins/default.nix @@ -1,27 +1,29 @@ { ... }: { imports = [ + ./blink-indent.nix + ./cmp.nix ./comment.nix - ./dap.nix - ./dashboard.nix - ./fidget.nix - ./guess-indent.nix + ./cursorline.nix + ./gitsigns.nix + ./lsp.nix ./lualine.nix - ./snacks.nix ./telescope.nix - ./vimwiki.nix ]; plugins = { - autoclose.enable = true; - bufferline.enable = true; - colorful-menu.enable = true; - gitsigns.enable = true; - lazygit.enable = true; - nix-develop.enable = true; - nvim-surround.enable = true; - toggleterm.enable = true; + neo-tree.enable = true; web-devicons.enable = true; + bufferline.enable = true; + nvim-autopairs.enable = true; which-key.enable = true; + notify.enable = true; + toggleterm.enable = true; + treesitter.enable = true; + todo-comments.enable = true; + fidget.enable = true; + blink-indent.enable = true; + blink-ripgrep.enable = true; + blink-pairs.enable = true; }; } diff --git a/config/plugins/fidget.nix b/config/plugins/fidget.nix deleted file mode 100644 index bfde202..0000000 --- a/config/plugins/fidget.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ - plugins.fidget = { - enable = true; - settings.progress = { - suppress_on_insert = true; - ignore_done_already = true; - poll_rate = 1; - }; - }; -} diff --git a/config/plugins/guess-indent.nix b/config/plugins/gitsigns.nix similarity index 57% rename from config/plugins/guess-indent.nix rename to config/plugins/gitsigns.nix index 87c3b74..f55e580 100644 --- a/config/plugins/guess-indent.nix +++ b/config/plugins/gitsigns.nix @@ -1,6 +1,6 @@ { ... }: { - plugins.guess-indent = { + plugins.gitsigns = { enable = true; }; } diff --git a/config/lsp.nix b/config/plugins/lsp.nix similarity index 93% rename from config/lsp.nix rename to config/plugins/lsp.nix index 023bc4b..2a494ca 100644 --- a/config/lsp.nix +++ b/config/plugins/lsp.nix @@ -22,8 +22,6 @@ docker_compose_language_service.enable = true; jsonls.enable = true; phpactor.enable = true; - gleam.enable = true; - elixirls.enable = true; qmlls.enable = true; }; keymaps = { diff --git a/config/plugins/lualine.nix b/config/plugins/lualine.nix index 0f8c01b..d965972 100644 --- a/config/plugins/lualine.nix +++ b/config/plugins/lualine.nix @@ -1,6 +1,4 @@ { ... }: { - plugins.lualine = { - enable = true; - }; + plugins.lualine.enable = true; } diff --git a/config/plugins/snacks.nix b/config/plugins/snacks.nix deleted file mode 100644 index cb1c007..0000000 --- a/config/plugins/snacks.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ ... }: -{ - plugins.snacks = { - enable = true; - settings = { - explorer = { - enabled = true; - }; - }; - }; -} diff --git a/config/plugins/vimwiki.nix b/config/plugins/vimwiki.nix deleted file mode 100644 index 12a3b09..0000000 --- a/config/plugins/vimwiki.nix +++ /dev/null @@ -1,16 +0,0 @@ -{ ... }: -{ - plugins.vimwiki = { - enable = true; - settings = { - list = [ - { - path = "$HOME/.vimwiki/"; - template_path = "$HOME/.vimwiki/"; - template_default = "default"; - template_ext = "html"; - } - ]; - }; - }; -}