Compare commits
2
Commits
27555fe856
...
4f117ac83f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4f117ac83f | ||
|
|
0d73aa3087 |
@@ -4,15 +4,13 @@
|
|||||||
lib,
|
lib,
|
||||||
inputs,
|
inputs,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
let
|
|
||||||
program = "nvf";
|
program = "nvf";
|
||||||
cfg = config.dots.${program};
|
cfg = config.dots.${program};
|
||||||
isLinux = pkgs.stdenv.isLinux;
|
isLinux = pkgs.stdenv.isLinux;
|
||||||
isDarwin = pkgs.stdenv.isDarwin;
|
isDarwin = pkgs.stdenv.isDarwin;
|
||||||
#sec = sops.secrets;
|
#sec = sops.secrets;
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
options.dots.${program} = {
|
options.dots.${program} = {
|
||||||
enable = lib.mkEnableOption "enables ${program}";
|
enable = lib.mkEnableOption "enables ${program}";
|
||||||
};
|
};
|
||||||
@@ -28,14 +26,13 @@ in
|
|||||||
vim = {
|
vim = {
|
||||||
clipboard =
|
clipboard =
|
||||||
# On Linux, use wl-copy as you do now
|
# On Linux, use wl-copy as you do now
|
||||||
if isLinux then
|
if isLinux
|
||||||
{
|
then {
|
||||||
enable = true;
|
enable = true;
|
||||||
providers.wl-copy.enable = true;
|
providers.wl-copy.enable = true;
|
||||||
registers = "unnamed,unnamedplus";
|
registers = "unnamed,unnamedplus";
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
enable = true;
|
enable = true;
|
||||||
registers = "unnamed,unnamedplus";
|
registers = "unnamed,unnamedplus";
|
||||||
};
|
};
|
||||||
@@ -47,12 +44,35 @@ in
|
|||||||
|
|
||||||
vimAlias = true;
|
vimAlias = true;
|
||||||
|
|
||||||
lsp.enable = true;
|
# fix indents
|
||||||
|
autocmds = [
|
||||||
|
{
|
||||||
|
enable = true;
|
||||||
|
event = ["BufEnter"];
|
||||||
|
pattern = ["*"];
|
||||||
|
command = "setlocal indentexpr=nvim_treesitter#indent()";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
lsp = {
|
||||||
|
enable = true;
|
||||||
|
formatOnSave = true;
|
||||||
|
};
|
||||||
|
|
||||||
statusline.lualine.enable = true;
|
statusline.lualine.enable = true;
|
||||||
telescope.enable = true;
|
telescope.enable = true;
|
||||||
autocomplete.nvim-cmp.enable = true;
|
autocomplete.nvim-cmp.enable = true;
|
||||||
autopairs.nvim-autopairs.enable = true;
|
autopairs.nvim-autopairs.enable = true;
|
||||||
|
|
||||||
|
treesitter = {
|
||||||
|
enable = true;
|
||||||
|
grammars = pkgs.vimPlugins.nvim-treesitter.allGrammars;
|
||||||
|
|
||||||
|
indent = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
keymaps = [
|
keymaps = [
|
||||||
# visual line movement (insert mode)
|
# visual line movement (insert mode)
|
||||||
{
|
{
|
||||||
@@ -157,7 +177,6 @@ in
|
|||||||
];
|
];
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
|
|
||||||
# line numbers
|
# line numbers
|
||||||
number = true;
|
number = true;
|
||||||
numberwidth = 2;
|
numberwidth = 2;
|
||||||
@@ -168,7 +187,6 @@ in
|
|||||||
shiftwidth = 2;
|
shiftwidth = 2;
|
||||||
softtabstop = -1;
|
softtabstop = -1;
|
||||||
expandtab = true;
|
expandtab = true;
|
||||||
smarttab = true;
|
|
||||||
autoindent = true;
|
autoindent = true;
|
||||||
|
|
||||||
# search
|
# search
|
||||||
@@ -191,11 +209,12 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
languages = {
|
languages = {
|
||||||
# enableTreesitter = isLinux;
|
|
||||||
enableTreesitter = true;
|
enableTreesitter = true;
|
||||||
|
|
||||||
nix = {
|
nix = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
treesitter.enable = true;
|
||||||
|
treesitter.package = pkgs.vimPlugins.nvim-treesitter.grammarPlugins.nix;
|
||||||
format = {
|
format = {
|
||||||
enable = true;
|
enable = true;
|
||||||
type = ["alejandra"];
|
type = ["alejandra"];
|
||||||
|
|||||||
Reference in New Issue
Block a user