From b895f2d6a23637e3b9d6b64f1804297dcbf29cbc Mon Sep 17 00:00:00 2001 From: spl3g Date: Fri, 17 Jan 2025 00:06:39 +0500 Subject: feat: remove all nixvim configuration --- home-manager/homeModules/nvim.nix | 187 +------------------------------------- 1 file changed, 1 insertion(+), 186 deletions(-) (limited to 'home-manager/homeModules/nvim.nix') diff --git a/home-manager/homeModules/nvim.nix b/home-manager/homeModules/nvim.nix index 5339326..be17e3a 100644 --- a/home-manager/homeModules/nvim.nix +++ b/home-manager/homeModules/nvim.nix @@ -1,193 +1,8 @@ -{ pkgs, config, lib, helpers, inputs, ... }: +{ pkgs, config, lib, ... }: { - imports = [ - inputs.nixvim.homeManagerModules.nixvim - ]; - options = { nvim.enable = lib.mkEnableOption "enable nvim"; }; - - config = lib.mkIf config.nvim.enable { - programs.nixvim = { - opts = { - number = true; - relativenumber = true; - tabstop = 4; - softtabstop = 4; - smartindent = true; - expandtab = true; - scrolloff = 5; - }; - colorschemes.catppuccin.enable = true; - globals.mapleader = " "; - - keymaps = [ - # Most used - { - action = ":Telescope file_browser"; - key = "."; - } - { - action = ":Telescope buffers sort_lastused=true"; - key = ","; - } - # File related - { - action = ":Telescope frecency"; - key = "fr"; - } - { - action = ":Telescope find_files"; - key = "ff"; - } - { - action = ":Telescope find_files cwd=~/nixfiles"; - key = "fn"; - } - { - action = ":Telescope projects"; - key = "op"; - } - # Terminal - { - action = ":ToggleTerm direction=vertical"; - key = "ot"; - } - { - action = ":ToggleTerm direction=horizontal"; - key = "oT"; - } - { - action = ""; - key = ""; - mode = "t"; - } - ]; - autoCmd = [ - { - event = "FileType"; - pattern = [ "sql" "mysql" "plsql" ]; - command = "lua require('cmp').setup.buffer({ sources = {{ name = 'vim-dadbod-completion' }} })"; - } - ]; - - # lsps - plugins = { - lsp = { - enable = true; - servers = { - pyright.enable = true; - nixd.enable = true; - }; - }; - - cmp = { - enable = true; - autoEnableSources = true; - settings = { - snippet.expand = "luasnip"; - sources = [ - {name = "nvim_lsp";} - {name = "luasnip";} - {name = "path";} - {name = "buffer";} - ]; - mapping = { - "" = "cmp.mapping.confirm({select = false})"; - "" = "cmp.mapping.select_next_item(cmp_select_opts)"; - "" = "cmp.mapping.select_prev_item(cmp_select_opts)"; - "" = "cmp.mapping.confirm({select = true})"; - }; - }; - }; - - luasnip.enable = true; - }; - - plugins = { - nix.enable = true; - comment-nvim.enable = true; - nvim-autopairs.enable = true; - intellitab.enable = true; - project-nvim.enable = true; - undotree.enable = true; - treesitter = { - enable = true; - indent = true; - nixvimInjections = true; - }; - codeium-vim = { - enable = true; - settings = { - disable_binds = true; - manual = true; - no_map_tab = true; - }; - keymaps.accept = ""; - }; - toggleterm = { - enable = true; - autochdir = true; - persistSize = false; - size = "function(term) - if term.direction == 'horizontal' then - return 15 - elseif term.direction == 'vertical' then - return vim.o.columns * 0.4 - end - end"; - }; - telescope = { - enable = true; - defaults = { - mappings = { - i = { - "" = "move_selection_next"; - "" = "move_selection_previous"; - "" = "toggle_selection"; - "" = "select_default"; - }; - n = { - "" = "toggle_selection"; - "" = "move_selection_next"; - "" = "move_selection_previous"; - "" = "select_default"; - }; - }; - }; - extensions = { - file-browser = { - enable = true; - path = "%:p:h"; - }; - frecency.enable = true; - project-nvim.enable = true; - }; - }; - lualine = { - enable = true; - sectionSeparators = { - left = " "; - right = " "; - }; - componentSeparators = { - left = " "; - right = " "; - }; - }; - }; - extraPlugins = with pkgs; with vimPlugins; [ - vim-dadbod-ui - vim-dadbod-completion - direnv-vim - ]; - extraPackages = with pkgs; [ - sqls - ]; - extraConfigLua = builtins.readFile ./extralua.lua; - }; - }; } -- cgit v1.2.3