[neovim] Adds configs. Auto-sessions doesn't load properly.
This commit is contained in:
6
home-manager/features/config/neovim/.XCompose
Normal file
6
home-manager/features/config/neovim/.XCompose
Normal file
@@ -0,0 +1,6 @@
|
||||
include "%L"
|
||||
|
||||
<Multi_key> <g> <a> : "α"
|
||||
<Multi_key> <g> <b> : "β"
|
||||
<Multi_key> <g> <g> : "γ"
|
||||
<Multi_key> <g> <p> : "π"
|
||||
3
home-manager/features/config/neovim/ftplugin/lua.vim
Normal file
3
home-manager/features/config/neovim/ftplugin/lua.vim
Normal file
@@ -0,0 +1,3 @@
|
||||
set shiftwidth=4
|
||||
set tabstop=4
|
||||
set softtabstop=4
|
||||
1
home-manager/features/config/neovim/init.lua
Normal file
1
home-manager/features/config/neovim/init.lua
Normal file
@@ -0,0 +1 @@
|
||||
require("periodic")
|
||||
37
home-manager/features/config/neovim/lua/periodic/init.lua
Normal file
37
home-manager/features/config/neovim/lua/periodic/init.lua
Normal file
@@ -0,0 +1,37 @@
|
||||
vim.g.mapleader = ","
|
||||
|
||||
vim.cmd [[
|
||||
colorscheme decay-dark
|
||||
set autoindent
|
||||
set expandtab
|
||||
set smartindent
|
||||
set shiftwidth=2
|
||||
set tabstop=2
|
||||
set softtabstop=2
|
||||
filetype on
|
||||
|
||||
]]
|
||||
|
||||
-- Make sure sesssion options includes `localoptions` so that auto-sessions will start properly
|
||||
vim.o.sessionoptions="blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal,localoptions"
|
||||
|
||||
local telescope = require('telescope.builtin')
|
||||
|
||||
vim.keymap.set("n", "<C-e>", "<cmd>RnvimrToggle<CR>", { noremap = true, silent = true })
|
||||
vim.keymap.set("n", "<C-n>", "<cmd>TabNext<CR>", { noremap = true, silent = true })
|
||||
vim.keymap.set("n", "<C-p>", telescope.find_files, { desc = "Telescope find files" })
|
||||
vim.keymap.set("n", "<C-t>", telescope.buffers, { desc = "Telescope buffers" })
|
||||
|
||||
|
||||
vim.filetype.add {
|
||||
extension = {
|
||||
rasi = 'rasi',
|
||||
},
|
||||
pattern = {
|
||||
-- Some common config files and their types
|
||||
['.*/waybar/config'] = 'jsonc',
|
||||
['.*/mako/config'] = 'dosini',
|
||||
['.*/kitty/*.conf'] = 'bash',
|
||||
['.*/hypr/.*%.conf'] = 'hyprlang',
|
||||
},
|
||||
}
|
||||
42
home-manager/features/neovim.nix
Normal file
42
home-manager/features/neovim.nix
Normal file
@@ -0,0 +1,42 @@
|
||||
{ pkgs, lib, ... }:
|
||||
let
|
||||
fromGitHub = repo: ref: rev: pkgs.vimUtils.buildVimPlugin {
|
||||
pname = "${lib.strings.sanitizeDerivationName repo}";
|
||||
version = ref;
|
||||
src = builtins.fetchGit {
|
||||
url = "https://github.com/${repo}.git";
|
||||
ref = ref;
|
||||
rev = rev;
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
home.file.".config/nvim" = {
|
||||
source = ./config/neovim;
|
||||
recursive = true;
|
||||
};
|
||||
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
defaultEditor = true;
|
||||
|
||||
plugins = with pkgs.vimPlugins; [
|
||||
nvim-treesitter
|
||||
surround-nvim
|
||||
telescope-nvim
|
||||
plenary-nvim # dependency of telescope
|
||||
rnvimr
|
||||
(fromGitHub "decaycs/decay.nvim" "HEAD" "457014541ebcfb29bd660592a0b02f22c9e2d0e2")
|
||||
auto-session
|
||||
];
|
||||
|
||||
extraPackages = with pkgs; [
|
||||
gcc # For treesitter complation
|
||||
ripgrep # Search support
|
||||
wayclip # Clipboard support
|
||||
fd # finder for telescope
|
||||
];
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user