From 367bc27f4f81f513e40ec5a2b9123a3edb15ae24 Mon Sep 17 00:00:00 2001 From: Adithya Nair Date: Sun, 4 Jun 2023 10:24:39 +0530 Subject: [PATCH] update inputs --- flake.lock | 6 +- home/programs/neovim.nix.bak | 131 +++++++++++++++++++++++++++++++++++ 2 files changed, 134 insertions(+), 3 deletions(-) create mode 100644 home/programs/neovim.nix.bak diff --git a/flake.lock b/flake.lock index 5038a1c..94a2ecd 100644 --- a/flake.lock +++ b/flake.lock @@ -148,11 +148,11 @@ ] }, "locked": { - "lastModified": 1685721552, - "narHash": "sha256-ifvq/zlO7lck8q+YkC5uom/h8/MVdMcQEldOL3cDQW0=", + "lastModified": 1685833925, + "narHash": "sha256-KCo8QT/DtM4pSTQDWFOhVP7MDzwi0wb2ZlxhgjEwXtM=", "owner": "nix-community", "repo": "home-manager", - "rev": "29519461834c08395b35f840811faf8c23e3b61c", + "rev": "bffc49ffb255f213d2f902043da37b3016450f4a", "type": "github" }, "original": { diff --git a/home/programs/neovim.nix.bak b/home/programs/neovim.nix.bak new file mode 100644 index 0000000..e9f265c --- /dev/null +++ b/home/programs/neovim.nix.bak @@ -0,0 +1,131 @@ +{pkgs, ...}: { + programs.nixneovim = { + enable = true; + extraLuaPreConfig = '' + vim.g.gitblame_date_format = '%r' + vim.g.gitblame_message_when_not_committed = ''' + + vim.opt.list = true + vim.opt.listchars:append "space:⋅" + vim.opt.listchars:append "eol:↴" + ''; + extraPlugins = with pkgs.vimExtraPlugins; [dracula-vim git-blame-nvim]; + colorscheme = "dracula"; + options = { + autowrite = true; + background = "dark"; + clipboard = "unnamedplus"; + expandtab = true; + laststatus = 2; + list = true; + showmode = false; + swapfile = false; + number = true; + relativenumber = true; + shiftwidth = 2; + signcolumn = "yes"; + smartindent = true; + tabstop = 2; + termguicolors = true; + updatetime = 100; + wrap = true; + splitright = true; + splitbelow = true; + }; + mappings = { + normal = { + "" = "'bp'"; + "" = "'bn'"; + "" = { + silent = true; + action = "'noh'"; + }; + "w" = { + silent = true; + action = "'bdeletebnext'"; + }; + "1" = { + silent = true; + action = "'NvimTreeToggle'"; + }; + "`" = { + silent = true; + action = "'split term://zsh'"; + }; + "ff" = { + silent = true; + action = "'Telescope find_files'"; + }; + "fg" = { + silent = true; + action = "'Telescope live_grep'"; + }; + "fb" = { + silent = true; + action = "'Telescope buffers'"; + }; + }; + }; + plugins = { + comment.enable = true; + fugitive.enable = true; + gitsigns.enable = true; + indent-blankline = { + enable = true; + showEndOfLine = true; + }; + telescope.enable = true; + nvim-tree = { + enable = true; + diagnostics.enable = true; + disableNetrw = true; + git.enable = true; + }; + bufferline = { + enable = true; + alwaysShowBufferline = true; + diagnostics = "nvim_lsp"; + separatorStyle = "slant"; + offsets = [ + { + filetype = "NvimTree"; + text = "File Explorer"; + separator = true; + } + ]; + }; + lualine = { + enable = true; + globalstatus = true; + }; + nvim-cmp = { + enable = true; + snippet.luasnip.enable = true; + sources = { + buffer.enable = true; + nvim_lsp.enable = true; + nvim_lsp_document_symbol.enable = true; + nvim_lsp_signature_help.enable = true; + treesitter.enable = true; + luasnip.enable = true; + }; + }; + luasnip.enable = true; + treesitter = { + enable = true; + installAllGrammars = true; + indent = true; + incrementalSelection.enable = true; + }; + treesitter-context.enable = true; + lsp = { + enable = true; + servers = { + gopls.enable = true; + nil.enable = true; + rust-analyzer.enable = true; + }; + }; + }; + }; +}