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 = {
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
configure = {
|
||||
customRC = ''
|
||||
# TODO: refactor (some parts) to extraLuaConfig
|
||||
extraConfig = ''
|
||||
set title
|
||||
set go=a
|
||||
set mouse=a
|
||||
|
|
@ -18,7 +18,6 @@
|
|||
local f = io.open(config_file, "r")
|
||||
if f ~= nil then
|
||||
local system_theme = f:read()
|
||||
-- f:close()
|
||||
io.close(f)
|
||||
if system_theme == 'dark' then
|
||||
vim.cmd("set bg=dark")
|
||||
|
|
@ -27,11 +26,11 @@
|
|||
else
|
||||
print('warning: expected value "light" or "dark"')
|
||||
print(' got:', system_theme)
|
||||
print(' expected path:', file)
|
||||
print(' expected path:', config_file)
|
||||
end
|
||||
else
|
||||
print('warning: nvim color scheme not found')
|
||||
print(' expected path:', file)
|
||||
print(' expected path:', config_file)
|
||||
end
|
||||
EOF
|
||||
|
||||
|
|
@ -56,10 +55,8 @@
|
|||
set 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
|
||||
packages.nix = with pkgs.vimPlugins; {
|
||||
start = [
|
||||
|
||||
plugins = with pkgs.vimPlugins; [
|
||||
vim-surround # shortcuts for setting () {} etc.
|
||||
vim-gitgutter # git diff in sign column
|
||||
# vim-airline # nice and light status bar # doesn't work nicely with tmux
|
||||
|
|
@ -74,8 +71,5 @@
|
|||
goyo-vim # write prose
|
||||
limelight-vim # prose paragraph highlighter
|
||||
];
|
||||
opt = [];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue