{ pkgs, config, ...}: { hm = { imports = [ ./lsp.nix ./oil.nix ]; programs.neovim = { enable = true; defaultEditor = true; viAlias = true; vimAlias = true; extraLuaConfig = '' require "nvim.icons" require "nvim.keybinds" require "nvim.bufferline" require "nvim.cyrillic" ------------------- local bind = vim.keymap.set local opt = vim.opt local g = vim.g local o = vim.o local cmd = vim.cmd ------------------- -- cmd [[colorscheme gruvbox]] o.expandtab = true o.smarttab = true o.cindent = true o.autoindent = true o.ignorecase = true o.smartcase = true o.backup = false o.writebackup = false o.undofile = true o.swapfile = false opt.relativenumber = true opt.number = true opt.tabstop = 2 opt.shiftwidth = 2 opt.spelllang = { "en_us", "ru", "by" } opt.mouse = "a" opt.termguicolors = true opt.clipboard = "unnamedplus" ''; plugins = with pkgs.vimPlugins; [ nvim-tree-lua gruvbox-nvim which-key-nvim nvim-autopairs { plugin = nvim-highlight-colors; type = "lua"; config = "require('nvim-highlight-colors').setup({})"; } { plugin = comment-nvim; type = "lua"; config = "require('Comment').setup()"; } { plugin = nvim-autopairs; type = "lua"; config = ''require("nvim-autopairs").setup{}''; } { plugin = lualine-nvim; type = "lua"; config = ''require "nvim.lualine"''; } nvim-web-devicons vim-startuptime { plugin = nvim-tree-lua; type = "lua"; config = ''require "nvim.filemanager"''; } { plugin = telescope-nvim; type = "lua"; config = '' require('telescope').load_extension('fzf') local telescope = require('telescope.builtin') -- Old keybinds bind('n', 'gfc', telescope.find_files, {}) bind('n', 'gfs', telescope.live_grep, {}) bind('n', 'gfb', telescope.buffers, {}) -- New keybinds bind('n', '/', telescope.live_grep, {}) bind('n', 'h', telescope.help_tags, {}) bind('n', 'b', telescope.buffers, {}) bind('n', 'e', telescope.buffers, {}) bind('n', 'f', telescope.find_files, {}) ''; } { plugin = editorconfig-nvim; type = "lua"; config = ''require "editorconfig"''; } telescope-fzf-native-nvim bufferline-nvim # ./lua/nvim/bufferline.lua ]; }; home = { file.".config/nvim/lua" = { enable = true; source = ./lua; target = ".config/nvim/lua"; recursive = true; }; }; editorconfig = { enable = true; settings = { "*" = { charset = "utf-8"; end_of_line = "lf"; trim_trailing_whitespace = true; insert_final_newline = true; max_line_width = 78; indent_style = "space"; indent_size = 2; }; }; }; home.sessionVariables = { # EDITOR = lib.mkForce lib.getExe pkgs.neovim; MANPAGER = "${config.hm.home.sessionVariables.EDITOR} +Man!"; }; }; }