Compare commits
4 commits
2195435753
...
26887e2f33
Author | SHA1 | Date | |
---|---|---|---|
26887e2f33 | |||
b9fe063b50 | |||
9cda7b1c76 | |||
26338a9f35 |
1 changed files with 21 additions and 8 deletions
|
@ -4,15 +4,17 @@ let
|
|||
inherit (lib.mod) ctrl;
|
||||
inherit (lib.nix2lua) pipe1 require call call0 nf var;
|
||||
|
||||
mkLineLimiterOpts = limit: {
|
||||
colorcolumn = toString (limit + 1);
|
||||
textwidth = limit;
|
||||
};
|
||||
|
||||
mkLineLimiterGroup = { limit, pattern }:
|
||||
lib.nameValuePair
|
||||
"line-limiter-${toString limit}"
|
||||
{
|
||||
inherit pattern;
|
||||
opt = {
|
||||
colorcolumn = toString limit;
|
||||
textwidth = limit - 1;
|
||||
};
|
||||
opt = mkLineLimiterOpts limit;
|
||||
};
|
||||
in
|
||||
{
|
||||
|
@ -23,11 +25,17 @@ in
|
|||
|
||||
vim.opt = {
|
||||
list = true;
|
||||
formatoptions = "tcroqwanljp";
|
||||
};
|
||||
|
||||
buffer.filetype = lib.listToAttrs [
|
||||
buffer.filetype = {
|
||||
python-options = {
|
||||
pattern = [ "python" ];
|
||||
opt = { formatoptions = "croqwaljp"; } // mkLineLimiterOpts 90;
|
||||
};
|
||||
} // lib.listToAttrs [
|
||||
(mkLineLimiterGroup {
|
||||
limit = 101;
|
||||
limit = 100;
|
||||
pattern = [
|
||||
"nix"
|
||||
"javascript,javascriptreact"
|
||||
|
@ -37,9 +45,8 @@ in
|
|||
];
|
||||
})
|
||||
(mkLineLimiterGroup {
|
||||
limit = 81;
|
||||
limit = 80;
|
||||
pattern = [
|
||||
"python"
|
||||
"json"
|
||||
"yaml"
|
||||
"markdown"
|
||||
|
@ -59,6 +66,12 @@ in
|
|||
# Enable fast navigation between windows
|
||||
vim.keymap.set = map (k: { mode = "n"; lhs = ctrl k; rhs = "${ctrl "w"}${k}"; }) [ "h" "l" "j" "k" ];
|
||||
|
||||
plugin.nlsp-settings-nvim = {
|
||||
enable = true;
|
||||
name = "nlspsettings";
|
||||
setupSettings = { };
|
||||
};
|
||||
|
||||
plugins.style.nvim-treesitter.extraGrammars = {
|
||||
tree-sitter-d2 = rec {
|
||||
language = "d2";
|
||||
|
|
Loading…
Reference in a new issue