Compare commits
No commits in common. "ee0fcad06f78da9335c0f49bffa5741758e4bf85" and "113e44cb04858feed13286384d578dbd9a0f20d3" have entirely different histories.
ee0fcad06f
...
113e44cb04
1 changed files with 14 additions and 29 deletions
|
@ -1,17 +1,9 @@
|
|||
{ config, modulesPath, lib, pkgs, ... }:
|
||||
{ config, modulesPath, lib, ... }:
|
||||
|
||||
let
|
||||
inherit (lib.mod) ctrl;
|
||||
inherit (lib.nix2lua) lambda0 set pipe1 require call call0;
|
||||
|
||||
mkFiletypeDetect = ft: pattern: {
|
||||
"filetype-detect-${ft}" = {
|
||||
event = [ "BufNewFile" "BufRead" ];
|
||||
inherit pattern;
|
||||
command = "setfiletype ${ft}";
|
||||
};
|
||||
};
|
||||
|
||||
mkLineLimiterGroup = { limit, pattern }: {
|
||||
"line-limiter-${toString limit}" = {
|
||||
event = [ "BufNewFile" "BufRead" ];
|
||||
|
@ -25,14 +17,19 @@ in
|
|||
"${modulesPath}/profiles/recommended.nix"
|
||||
];
|
||||
|
||||
vim.namedCmd.extra-ftdetect = ''
|
||||
aug extra_ftdetect
|
||||
au!
|
||||
au BufNewFile,BufRead *.d2 setfiletype d2
|
||||
au BufNewFile,BufRead *.ncl setfiletype nickel
|
||||
au BufNewFile,BufRead *.psql setfiletype psql
|
||||
aug END
|
||||
'';
|
||||
|
||||
# Enable fast navigation between windows
|
||||
vim.keymap.set = map (k: { mode = "n"; lhs = ctrl k; rhs = "${ctrl "w"}${k}"; }) [ "h" "l" "j" "k" ];
|
||||
|
||||
vim.augroup = lib.mkMerge [
|
||||
(mkFiletypeDetect "d2" "*.d2")
|
||||
(mkFiletypeDetect "nickel" "*.ncl")
|
||||
(mkFiletypeDetect "psql" "*.psql")
|
||||
|
||||
(mkLineLimiterGroup {
|
||||
limit = 101;
|
||||
pattern = [
|
||||
|
@ -60,22 +57,6 @@ in
|
|||
})
|
||||
];
|
||||
|
||||
plugins.style.nvim-treesitter.extraGrammars = {
|
||||
tree-sitter-d2 = rec {
|
||||
language = "d2";
|
||||
version = "8a9d50043d58eedf1e375b0e2059e43efd856902";
|
||||
# version = "e7507ddd983427cb71b4bd96b039c382c73d65c5";
|
||||
src = pkgs.fetchFromGitea {
|
||||
domain = "git.pleshevski.ru";
|
||||
owner = "pleshevskiy";
|
||||
repo = "tree-sitter-d2";
|
||||
rev = version;
|
||||
sha256 = "sha256-ZhVjxo7Xi7DaHN3qabUcykflY74bUqPcOA410fA3zRk=";
|
||||
# sha256 = "sha256-m7ZCxnW4Q1bQp1GhntUF7l+p6DV1p/2AJXhVeRy8Rec=";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
plugins.style.neoformat.autoformat.enable = true;
|
||||
|
||||
plugins.navigation = {
|
||||
|
@ -131,12 +112,16 @@ in
|
|||
init_options = {
|
||||
typescript.tsdk = "./node_modules/typescript/lib";
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
ltex = {
|
||||
language = "en-US";
|
||||
languageToolHttpServerUri = "http://localhost:8081";
|
||||
};
|
||||
|
||||
pylsp = { };
|
||||
|
||||
denols = {
|
||||
root_dir = call "${config.plugin.nvim-lspconfig.varName}.util.root_pattern" [ "deno.json" "deno.jsonc" ];
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue