chore: update neovim config to use extraConfig 🎨
This commit is contained in:
parent
086d6d898a
commit
da93ae365e
1 changed files with 61 additions and 67 deletions
|
|
@ -1,11 +1,11 @@
|
||||||
{ config, pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
programs.neovim = {
|
programs.neovim = {
|
||||||
enable = true;
|
enable = true;
|
||||||
defaultEditor = true;
|
defaultEditor = true;
|
||||||
configure = {
|
# TODO: refactor (some parts) to extraLuaConfig
|
||||||
customRC = ''
|
extraConfig = ''
|
||||||
set title
|
set title
|
||||||
set go=a
|
set go=a
|
||||||
set mouse=a
|
set mouse=a
|
||||||
|
|
@ -18,7 +18,6 @@
|
||||||
local f = io.open(config_file, "r")
|
local f = io.open(config_file, "r")
|
||||||
if f ~= nil then
|
if f ~= nil then
|
||||||
local system_theme = f:read()
|
local system_theme = f:read()
|
||||||
-- f:close()
|
|
||||||
io.close(f)
|
io.close(f)
|
||||||
if system_theme == 'dark' then
|
if system_theme == 'dark' then
|
||||||
vim.cmd("set bg=dark")
|
vim.cmd("set bg=dark")
|
||||||
|
|
@ -27,11 +26,11 @@
|
||||||
else
|
else
|
||||||
print('warning: expected value "light" or "dark"')
|
print('warning: expected value "light" or "dark"')
|
||||||
print(' got:', system_theme)
|
print(' got:', system_theme)
|
||||||
print(' expected path:', file)
|
print(' expected path:', config_file)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
print('warning: nvim color scheme not found')
|
print('warning: nvim color scheme not found')
|
||||||
print(' expected path:', file)
|
print(' expected path:', config_file)
|
||||||
end
|
end
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
|
@ -56,10 +55,8 @@
|
||||||
set spell spelllang=en_us
|
set spell spelllang=en_us
|
||||||
setlocal spell! spelllang=en_us
|
setlocal spell! spelllang=en_us
|
||||||
'';
|
'';
|
||||||
# vimPlugins inspired from Alexnortung
|
|
||||||
# https://discourse.nixos.org/t/neovim-no-longer-uses-config-or-plugins/13399/4
|
plugins = with pkgs.vimPlugins; [
|
||||||
packages.nix = with pkgs.vimPlugins; {
|
|
||||||
start = [
|
|
||||||
vim-surround # shortcuts for setting () {} etc.
|
vim-surround # shortcuts for setting () {} etc.
|
||||||
vim-gitgutter # git diff in sign column
|
vim-gitgutter # git diff in sign column
|
||||||
# vim-airline # nice and light status bar # doesn't work nicely with tmux
|
# vim-airline # nice and light status bar # doesn't work nicely with tmux
|
||||||
|
|
@ -74,8 +71,5 @@
|
||||||
goyo-vim # write prose
|
goyo-vim # write prose
|
||||||
limelight-vim # prose paragraph highlighter
|
limelight-vim # prose paragraph highlighter
|
||||||
];
|
];
|
||||||
opt = [];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue