summaryrefslogtreecommitdiff
path: root/users/seth/programs/neovim
diff options
context:
space:
mode:
Diffstat (limited to 'users/seth/programs/neovim')
-rw-r--r--users/seth/programs/neovim/default.nix148
-rw-r--r--users/seth/programs/neovim/lua/getchoo/ftdetect.lua (renamed from users/seth/programs/neovim/config/lua/getchoo/ftdetect.lua)0
-rw-r--r--users/seth/programs/neovim/lua/getchoo/init.lua (renamed from users/seth/programs/neovim/config/lua/getchoo/init.lua)7
-rw-r--r--users/seth/programs/neovim/lua/getchoo/keymap.lua (renamed from users/seth/programs/neovim/config/lua/getchoo/keymap.lua)0
-rw-r--r--users/seth/programs/neovim/lua/getchoo/lsp/config/cmp.lua (renamed from users/seth/programs/neovim/config/lua/getchoo/lsp/config/cmp.lua)0
-rw-r--r--users/seth/programs/neovim/lua/getchoo/lsp/config/init.lua (renamed from users/seth/programs/neovim/config/lua/getchoo/lsp/config/init.lua)0
-rw-r--r--users/seth/programs/neovim/lua/getchoo/lsp/config/lsp_config.lua (renamed from users/seth/programs/neovim/config/lua/getchoo/lsp/config/lsp_config.lua)0
-rw-r--r--users/seth/programs/neovim/lua/getchoo/lsp/config/null_ls.lua (renamed from users/seth/programs/neovim/config/lua/getchoo/lsp/config/null_ls.lua)0
-rw-r--r--users/seth/programs/neovim/lua/getchoo/lsp/config/sources.lua (renamed from users/seth/programs/neovim/config/lua/getchoo/lsp/config/sources.lua)0
-rw-r--r--users/seth/programs/neovim/lua/getchoo/lsp/init.lua (renamed from users/seth/programs/neovim/config/lua/getchoo/lsp/init.lua)0
-rw-r--r--users/seth/programs/neovim/lua/getchoo/lsp/keymap.lua (renamed from users/seth/programs/neovim/config/lua/getchoo/lsp/keymap.lua)0
-rw-r--r--users/seth/programs/neovim/lua/getchoo/lsp/server.lua (renamed from users/seth/programs/neovim/config/lua/getchoo/lsp/server.lua)0
12 files changed, 62 insertions, 93 deletions
diff --git a/users/seth/programs/neovim/default.nix b/users/seth/programs/neovim/default.nix
index 58d8071..0f814be 100644
--- a/users/seth/programs/neovim/default.nix
+++ b/users/seth/programs/neovim/default.nix
@@ -1,99 +1,71 @@
-{
- config,
- 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
- with pkgs; [
- alejandra
- clang
- codespell
- deadnix
- nodePackages.alex
- nodePackages.bash-language-server
- nodePackages.prettier
- nodePackages.pyright
- pylint
- rust-analyzer
- rustfmt
- statix
- stylua
- sumneko-lua-language-server
- yapf
- ]
- else [];
-
- lspPlugins =
- if config.seth.devel.enable
- then
- with pkgs.vimPlugins; [
- nvim-lspconfig
- null-ls-nvim
- plenary-nvim
- nvim-treesitter.withAllGrammars
- nvim-cmp
- cmp-nvim-lsp
- cmp-buffer
- cmp-path
- cmp-vsnip
- vim-vsnip
- luasnip
- cmp_luasnip
- trouble-nvim
- telescope-nvim
- gitsigns-nvim
- editorconfig-nvim
- ]
- else [];
-in {
+{pkgs, ...}: {
programs.neovim = {
enable = true;
- extraPackages = lspPackages;
- plugins = with pkgs.vimPlugins;
- [
- barbar-nvim
- catppuccin-nvim
- lightspeed-nvim
- lualine-nvim
- nvim-tree-lua
- nvim-web-devicons
- ]
- ++ lspPlugins;
+ extraPackages = with pkgs; [
+ alejandra
+ clang
+ codespell
+ deadnix
+ nodePackages.alex
+ nodePackages.bash-language-server
+ nodePackages.prettier
+ nodePackages.pyright
+ pylint
+ rust-analyzer
+ rustfmt
+ statix
+ stylua
+ sumneko-lua-language-server
+ yapf
+ ];
+ plugins = with pkgs.vimPlugins; [
+ barbar-nvim
+ catppuccin-nvim
+ cmp-nvim-lsp
+ cmp-buffer
+ cmp_luasnip
+ cmp-path
+ cmp-vsnip
+ editorconfig-nvim
+ gitsigns-nvim
+ lightspeed-nvim
+ lualine-nvim
+ luasnip
+ nvim-cmp
+ nvim-lspconfig
+ null-ls-nvim
+ nvim-tree-lua
+ nvim-treesitter.withAllGrammars
+ nvim-web-devicons
+ plenary-nvim
+ telescope-nvim
+ trouble-nvim
+ vim-vsnip
+ ];
};
xdg.configFile.nvim = {
- source = ./config;
+ source = ./lua;
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
+ text = ''
+ local cmd = vim.cmd
+ local opt = vim.opt
+ require("getchoo")
+ vim.g.use_lsp_plugins = true
+ -- 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")
- '';
+ -- 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/config/lua/getchoo/ftdetect.lua b/users/seth/programs/neovim/lua/getchoo/ftdetect.lua
index c13bdb6..c13bdb6 100644
--- a/users/seth/programs/neovim/config/lua/getchoo/ftdetect.lua
+++ b/users/seth/programs/neovim/lua/getchoo/ftdetect.lua
diff --git a/users/seth/programs/neovim/config/lua/getchoo/init.lua b/users/seth/programs/neovim/lua/getchoo/init.lua
index a719ac3..d73b5ae 100644
--- a/users/seth/programs/neovim/config/lua/getchoo/init.lua
+++ b/users/seth/programs/neovim/lua/getchoo/init.lua
@@ -42,11 +42,8 @@ require("catppuccin").setup(M.catppuccin)
require("lualine").setup(M.lualine)
require("nvim-tree").setup(M.tree)
-if vim.g.use_lsp_plugins then
- require("getchoo.ftdetect")
- require("getchoo.lsp")
-end
-
+require("getchoo.ftdetect")
+require("getchoo.lsp")
require("getchoo.keymap")
return M
diff --git a/users/seth/programs/neovim/config/lua/getchoo/keymap.lua b/users/seth/programs/neovim/lua/getchoo/keymap.lua
index 9a4484c..9a4484c 100644
--- a/users/seth/programs/neovim/config/lua/getchoo/keymap.lua
+++ b/users/seth/programs/neovim/lua/getchoo/keymap.lua
diff --git a/users/seth/programs/neovim/config/lua/getchoo/lsp/config/cmp.lua b/users/seth/programs/neovim/lua/getchoo/lsp/config/cmp.lua
index cef2ad1..cef2ad1 100644
--- a/users/seth/programs/neovim/config/lua/getchoo/lsp/config/cmp.lua
+++ b/users/seth/programs/neovim/lua/getchoo/lsp/config/cmp.lua
diff --git a/users/seth/programs/neovim/config/lua/getchoo/lsp/config/init.lua b/users/seth/programs/neovim/lua/getchoo/lsp/config/init.lua
index f2634d5..f2634d5 100644
--- a/users/seth/programs/neovim/config/lua/getchoo/lsp/config/init.lua
+++ b/users/seth/programs/neovim/lua/getchoo/lsp/config/init.lua
diff --git a/users/seth/programs/neovim/config/lua/getchoo/lsp/config/lsp_config.lua b/users/seth/programs/neovim/lua/getchoo/lsp/config/lsp_config.lua
index 9874820..9874820 100644
--- a/users/seth/programs/neovim/config/lua/getchoo/lsp/config/lsp_config.lua
+++ b/users/seth/programs/neovim/lua/getchoo/lsp/config/lsp_config.lua
diff --git a/users/seth/programs/neovim/config/lua/getchoo/lsp/config/null_ls.lua b/users/seth/programs/neovim/lua/getchoo/lsp/config/null_ls.lua
index 16b1b3c..16b1b3c 100644
--- a/users/seth/programs/neovim/config/lua/getchoo/lsp/config/null_ls.lua
+++ b/users/seth/programs/neovim/lua/getchoo/lsp/config/null_ls.lua
diff --git a/users/seth/programs/neovim/config/lua/getchoo/lsp/config/sources.lua b/users/seth/programs/neovim/lua/getchoo/lsp/config/sources.lua
index bed6361..bed6361 100644
--- a/users/seth/programs/neovim/config/lua/getchoo/lsp/config/sources.lua
+++ b/users/seth/programs/neovim/lua/getchoo/lsp/config/sources.lua
diff --git a/users/seth/programs/neovim/config/lua/getchoo/lsp/init.lua b/users/seth/programs/neovim/lua/getchoo/lsp/init.lua
index f354b2a..f354b2a 100644
--- a/users/seth/programs/neovim/config/lua/getchoo/lsp/init.lua
+++ b/users/seth/programs/neovim/lua/getchoo/lsp/init.lua
diff --git a/users/seth/programs/neovim/config/lua/getchoo/lsp/keymap.lua b/users/seth/programs/neovim/lua/getchoo/lsp/keymap.lua
index 9f34ffa..9f34ffa 100644
--- a/users/seth/programs/neovim/config/lua/getchoo/lsp/keymap.lua
+++ b/users/seth/programs/neovim/lua/getchoo/lsp/keymap.lua
diff --git a/users/seth/programs/neovim/config/lua/getchoo/lsp/server.lua b/users/seth/programs/neovim/lua/getchoo/lsp/server.lua
index f238eb5..f238eb5 100644
--- a/users/seth/programs/neovim/config/lua/getchoo/lsp/server.lua
+++ b/users/seth/programs/neovim/lua/getchoo/lsp/server.lua