nvf config-ing
This commit is contained in:
parent
87bf9997b6
commit
59d469574b
2 changed files with 142 additions and 4 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -1,3 +1,4 @@
|
||||||
.directory
|
.directory
|
||||||
*.swp
|
*.swp
|
||||||
|
result
|
||||||
result/
|
result/
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,145 @@
|
||||||
{ ... }: {
|
{
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
programs.nvf.enable = true;
|
programs.nvf.enable = true;
|
||||||
programs.nvf.settings.vim = {
|
programs.nvf.settings.vim = {
|
||||||
viAlias = false;
|
enableMan = true;
|
||||||
vimAlias = false;
|
viAlias = true;
|
||||||
lsp.enable = true;
|
vimAlias = true;
|
||||||
|
|
||||||
|
options = {
|
||||||
|
mouse = "a";
|
||||||
|
clipboard = "unnamedplus";
|
||||||
|
showmode = false;
|
||||||
|
breakindent = true;
|
||||||
|
undofile = true;
|
||||||
|
ignorecase = true;
|
||||||
|
smartcase = true;
|
||||||
|
updatetime = 250;
|
||||||
|
timeoutlen = 300;
|
||||||
|
splitright = true;
|
||||||
|
splitbelow = true;
|
||||||
|
signcolumn = "yes";
|
||||||
|
scrolloff = 8;
|
||||||
|
completeopt = "menuone,noselect";
|
||||||
|
termguicolors = true;
|
||||||
|
|
||||||
|
expandtab = true;
|
||||||
|
shiftwidth = 4;
|
||||||
|
tabstop = 4;
|
||||||
|
softtabstop = 4;
|
||||||
|
};
|
||||||
|
|
||||||
|
colorschemes.gruvbox = {
|
||||||
|
enable = true;
|
||||||
|
settings.contrast = "hard";
|
||||||
|
};
|
||||||
|
|
||||||
|
treesitter = {
|
||||||
|
enable = true;
|
||||||
|
ensureInstalled = [
|
||||||
|
"org"
|
||||||
|
"python"
|
||||||
|
"rust"
|
||||||
|
"c"
|
||||||
|
"cpp"
|
||||||
|
"lua"
|
||||||
|
"html"
|
||||||
|
"css"
|
||||||
|
"javascript"
|
||||||
|
"typescript"
|
||||||
|
"json"
|
||||||
|
"yaml"
|
||||||
|
"nix"
|
||||||
|
"bash"
|
||||||
|
"go"
|
||||||
|
"make"
|
||||||
|
"clojure"
|
||||||
|
"scheme"
|
||||||
|
"commonlisp"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
rainbow-delimiters.enable = true;
|
||||||
|
|
||||||
|
orgmode.enable = true;
|
||||||
|
|
||||||
|
extraPlugins = with pkgs.vimPlugins; {
|
||||||
|
orgmode-babel = orgmode-babel-nvim;
|
||||||
|
};
|
||||||
|
|
||||||
|
luaConfigRC = {
|
||||||
|
org-babel = ''require("orgmode-babel").setup()'';
|
||||||
|
|
||||||
|
indent = ''
|
||||||
|
local two_space_ft = {
|
||||||
|
"html", "htmldjango", "css", "scss", "less",
|
||||||
|
"nix", "javascript", "typescript",
|
||||||
|
"javascriptreact", "typescriptreact",
|
||||||
|
"json", "jsonc", "yaml", "lua"
|
||||||
|
}
|
||||||
|
local four_space_ft = {
|
||||||
|
"python", "rust", "c", "cpp",
|
||||||
|
"java", "scala", "kotlin", "swift"
|
||||||
|
}
|
||||||
|
local tab_ft = {
|
||||||
|
"make", "go", "odin"
|
||||||
|
}
|
||||||
|
|
||||||
|
local indent_augroup = vim.api.nvim_create_augroup("IndentSettings", { clear = true })
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd("FileType", {
|
||||||
|
group = indent_augroup,
|
||||||
|
pattern = two_space_ft,
|
||||||
|
callback = function()
|
||||||
|
vim.opt_local.expandtab = true
|
||||||
|
vim.opt_local.shiftwidth = 2
|
||||||
|
vim.opt_local.tabstop = 2
|
||||||
|
vim.opt_local.softtabstop = 2
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd("FileType", {
|
||||||
|
group = indent_augroup,
|
||||||
|
pattern = four_space_ft,
|
||||||
|
callback = function()
|
||||||
|
vim.opt_local.expandtab = true
|
||||||
|
vim.opt_local.shiftwidth = 4
|
||||||
|
vim.opt_local.tabstop = 4
|
||||||
|
vim.opt_local.softtabstop = 4
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd("FileType", {
|
||||||
|
group = indent_augroup,
|
||||||
|
pattern = tab_ft,
|
||||||
|
callback = function()
|
||||||
|
vim.opt_local.expandtab = false
|
||||||
|
vim.opt_local.shiftwidth = 0
|
||||||
|
vim.opt_local.tabstop = 8
|
||||||
|
vim.opt_local.softtabstop = 0
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
'';
|
||||||
|
|
||||||
|
lisp-indent = ''
|
||||||
|
local lisp_ft = { "lisp", "scheme", "racket", "clojure" }
|
||||||
|
local lisp_augroup = vim.api.nvim_create_augroup("LispIndent", { clear = true })
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd("FileType", {
|
||||||
|
group = lisp_augroup,
|
||||||
|
pattern = lisp_ft,
|
||||||
|
callback = function()
|
||||||
|
vim.opt_local.lisp = true
|
||||||
|
vim.opt_local.lispwords:append({
|
||||||
|
"defun", "defmacro", "defvar", "defparameter",
|
||||||
|
"lambda", "let", "let*", "flet", "labels",
|
||||||
|
"progn", "when", "unless", "if", "cond"
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Reference in a new issue