Switch to neovim
This commit is contained in:
parent
f3a1af9333
commit
dfdd19fbce
5 changed files with 25 additions and 55 deletions
|
@ -1,10 +1 @@
|
||||||
# Elnu's NixOS configuration
|
# Elnu's NixOS configuration
|
||||||
|
|
||||||
### TODO
|
|
||||||
|
|
||||||
- Load in vim configuration
|
|
||||||
|
|
||||||
### Needs checking
|
|
||||||
|
|
||||||
- Fix issue where wireless connection dies after suspend, even after restarting NetworkManager: not an issue on T430, still problem on X220?
|
|
||||||
- Fix/map media keys (already declared within [`i3.nix`](i3.nix) but are non-functional: not an issue on T430, still problem on X220?
|
|
||||||
|
|
4
TODO.md
Normal file
4
TODO.md
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
### Needs checking
|
||||||
|
|
||||||
|
- Fix issue where wireless connection dies after suspend, even after restarting NetworkManager: not an issue on T430, still problem on X220?
|
||||||
|
- Fix/map media keys (already declared within [`i3.nix`](i3.nix) but are non-functional: not an issue on T430, still problem on X220?
|
|
@ -5,7 +5,7 @@ let
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
../vim.nix
|
../neovim.nix
|
||||||
../ranger.nix
|
../ranger.nix
|
||||||
../fcitx5
|
../fcitx5
|
||||||
../picom.nix
|
../picom.nix
|
||||||
|
@ -95,7 +95,7 @@ in
|
||||||
gC = "g clone";
|
gC = "g clone";
|
||||||
goops = "g reset --soft HEAD^";
|
goops = "g reset --soft HEAD^";
|
||||||
|
|
||||||
v = "vim";
|
v = "nvim";
|
||||||
r = "ranger";
|
r = "ranger";
|
||||||
rm = "trash-put";
|
rm = "trash-put";
|
||||||
};
|
};
|
||||||
|
|
19
neovim.nix
Normal file
19
neovim.nix
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
programs.neovim = {
|
||||||
|
enable = true;
|
||||||
|
viAlias = true;
|
||||||
|
vimAlias = true;
|
||||||
|
defaultEditor = true;
|
||||||
|
plugins = with pkgs.vimPlugins; [ vim-nix ];
|
||||||
|
extraConfig = ''
|
||||||
|
" Temporary configuration for editing Nix files
|
||||||
|
syntax on
|
||||||
|
set autoindent
|
||||||
|
set expandtab
|
||||||
|
set tabstop=2
|
||||||
|
set shiftwidth=2
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
44
vim.nix
44
vim.nix
|
@ -1,44 +0,0 @@
|
||||||
{ pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
programs.vim = {
|
|
||||||
enable = true;
|
|
||||||
defaultEditor = true;
|
|
||||||
extraConfig = ''
|
|
||||||
" Temporary configuration for editing Nix files
|
|
||||||
syntax on
|
|
||||||
set autoindent
|
|
||||||
set expandtab
|
|
||||||
set tabstop=2
|
|
||||||
set shiftwidth=2
|
|
||||||
|
|
||||||
" Temporary configuration for editing markdown
|
|
||||||
" full configuration with plugins is described here
|
|
||||||
" https://blog.elnu.com/2022/06/how-to-configure-vim-for-writing
|
|
||||||
|
|
||||||
setlocal linebreak
|
|
||||||
|
|
||||||
set spell spelllang=en
|
|
||||||
set spelllang+=cjk " prevent CJK characters from being spellchecked
|
|
||||||
|
|
||||||
function! Characters()
|
|
||||||
return strchars(join(getline(1, '$'), "\n"))
|
|
||||||
endfunction
|
|
||||||
function! Words()
|
|
||||||
return wordcount().words
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function! Minutes()
|
|
||||||
let wpm = 200
|
|
||||||
return (Words() + wpm / 2) / wpm
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
set laststatus=2 " enable status line
|
|
||||||
set statusline+=%=%{Words()}\ words,
|
|
||||||
set statusline+=\ %{Characters()}\ characters,\ about
|
|
||||||
set statusline+=\ %{Minutes()}\ minutes
|
|
||||||
" remove ugly white background
|
|
||||||
hi StatusLine ctermfg=0 ctermbg=none cterm=bold " 0 for the terminal color 0
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
}
|
|
Loading…
Add table
Reference in a new issue