diff options
| author | seth <[email protected]> | 2023-01-28 07:13:23 -0500 |
|---|---|---|
| committer | seth <[email protected]> | 2023-01-28 07:13:23 -0500 |
| commit | 53b2dc1ce7ea995fb3a1a11864128127d929666f (patch) | |
| tree | 0451d097c8ba379e2c293efea66345e48d5eb9f0 /users/seth/programs/neovim | |
| parent | 5ee4a77d0a6dd23b080f30a08cb1b3d7cea360a0 (diff) | |
make neovim respect devel option
Diffstat (limited to 'users/seth/programs/neovim')
| -rw-r--r-- | users/seth/programs/neovim/config/init.lua | 23 | ||||
| -rw-r--r-- | users/seth/programs/neovim/default.nix | 37 |
2 files changed, 33 insertions, 27 deletions
diff --git a/users/seth/programs/neovim/config/init.lua b/users/seth/programs/neovim/config/init.lua deleted file mode 100644 index b6550ba..0000000 --- a/users/seth/programs/neovim/config/init.lua +++ /dev/null @@ -1,23 +0,0 @@ --- --- getchoo's neovim config (but in lua :p) --- - -local cmd = vim.cmd -local opt = vim.opt - -vim.g.use_lsp_plugins = true; - -require("getchoo") - --- text options -opt.tabstop = 2 -opt.shiftwidth = 2 -opt.expandtab = false -opt.smartindent = true -opt.wrap = false - --- appearance -opt.syntax = "on" -cmd("filetype plugin indent on") -opt.termguicolors = true -vim.api.nvim_command("colorscheme catppuccin") diff --git a/users/seth/programs/neovim/default.nix b/users/seth/programs/neovim/default.nix index 58d5634..58d8071 100644 --- a/users/seth/programs/neovim/default.nix +++ b/users/seth/programs/neovim/default.nix @@ -3,6 +3,11 @@ pkgs, ... }: let + neovimConfig = + if config.seth.devel.enable + then "vim.g.use_lsp_plugins = true" + else "vim.g.use_lsp_plugins = false"; + lspPackages = if config.seth.devel.enable then @@ -29,7 +34,6 @@ if config.seth.devel.enable then with pkgs.vimPlugins; [ - nvim-tree-lua nvim-lspconfig null-ls-nvim plenary-nvim @@ -43,7 +47,6 @@ luasnip cmp_luasnip trouble-nvim - nvim-web-devicons telescope-nvim gitsigns-nvim editorconfig-nvim @@ -55,10 +58,12 @@ in { extraPackages = lspPackages; plugins = with pkgs.vimPlugins; [ - lualine-nvim - catppuccin-nvim barbar-nvim + catppuccin-nvim lightspeed-nvim + lualine-nvim + nvim-tree-lua + nvim-web-devicons ] ++ lspPlugins; }; @@ -67,4 +72,28 @@ in { source = ./config; recursive = true; }; + xdg.configFile."nvim/init.lua" = { + text = + neovimConfig + + '' + + local cmd = vim.cmd + local opt = vim.opt + + require("getchoo") + + -- text options + opt.tabstop = 2 + opt.shiftwidth = 2 + opt.expandtab = false + opt.smartindent = true + opt.wrap = false + + -- appearance + opt.syntax = "on" + cmd("filetype plugin indent on") + opt.termguicolors = true + vim.api.nvim_command("colorscheme catppuccin") + ''; + }; } |
