diff --git a/flake.lock b/flake.lock index 90dc690..98834a5 100644 --- a/flake.lock +++ b/flake.lock @@ -124,6 +124,36 @@ "type": "github" } }, + "flake-utils_2": { + "locked": { + "lastModified": 1667395993, + "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_3": { + "locked": { + "lastModified": 1667395993, + "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, "flakeCompat": { "flake": false, "locked": { @@ -309,6 +339,7 @@ "cmp-luasnip": "cmp-luasnip", "cmp-nvim-lsp": "cmp-nvim-lsp", "editorconfig-nvim": "editorconfig-nvim", + "flake-utils": "flake-utils_2", "gitsigns-nvim": "gitsigns-nvim", "hop-nvim": "hop-nvim", "lspsaga-nvim": "lspsaga-nvim", @@ -316,9 +347,8 @@ "lualine-nvim": "lualine-nvim", "luasnip": "luasnip", "neoformat": "neoformat", - "nixpkgs": [ - "nixpkgs" - ], + "nix2lua": "nix2lua", + "nixpkgs": "nixpkgs_2", "nlsp-settings-nvim": "nlsp-settings-nvim", "nvim-cmp": "nvim-cmp", "nvim-lspconfig": "nvim-lspconfig", @@ -331,15 +361,14 @@ "tabby-nvim": "tabby-nvim", "telescope-live-grep-args-nvim": "telescope-live-grep-args-nvim", "telescope-nvim": "telescope-nvim", - "theme": "theme", - "utils": "utils_2" + "theme": "theme" }, "locked": { - "lastModified": 1668719024, - "narHash": "sha256-jvyAqzU84wmqVkh8K/1Waedr6BXnRXfUZTNmxtLNjBw=", + "lastModified": 1668876759, + "narHash": "sha256-XQztOU9ehm8ljrAA1K2i5QANWy5Nqr661xhAOqUAHA8=", "ref": "refs/heads/main", - "rev": "1067059290df5091d80084130388a21c281f2afb", - "revCount": 65, + "rev": "4edf3f4d64320dac228f080ca49e8c535f615a7d", + "revCount": 69, "type": "git", "url": "https://git.pleshevski.ru/mynix/neovim" }, @@ -389,18 +418,37 @@ "type": "github" } }, + "nix2lua": { + "inputs": { + "flake-utils": "flake-utils_3", + "nixpkgs": "nixpkgs" + }, + "locked": { + "lastModified": 1668823439, + "narHash": "sha256-/o0SRNf+2yqg+mCUE2UGdsDkD0BCcSPCQYUZKoZxzI0=", + "ref": "refs/heads/main", + "rev": "520a06d52cbd90aa290eccac28f4f1fefee64b27", + "revCount": 11, + "type": "git", + "url": "https://git.pleshevski.ru/mynix/nix2lua" + }, + "original": { + "type": "git", + "url": "https://git.pleshevski.ru/mynix/nix2lua" + } + }, "nixpkgs": { "locked": { - "lastModified": 1668596599, - "narHash": "sha256-rhHyZTGI31/OfgYa9xF49UTchDXTI94pEsSNa0fOkpk=", + "lastModified": 1668650906, + "narHash": "sha256-JuiYfDO23O8oxUUOmhQflmOoJovyC5G4RjcYQMQjrRE=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "b457130e8a21608675ddf12c7d85227b22a27112", + "rev": "3a86856a13c88c8c64ea32082a851fefc79aa700", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-unstable", + "ref": "nixpkgs-unstable", "repo": "nixpkgs", "type": "github" } @@ -420,6 +468,38 @@ "type": "indirect" } }, + "nixpkgs_2": { + "locked": { + "lastModified": 1667969101, + "narHash": "sha256-GL53T705HO7Q/KVfbb5STx8AxFs8YgaGY8pvAZC+O7U=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "bbf77421ac51a7c93f5f0f760da99e4dbce614fa", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { + "locked": { + "lastModified": 1668596599, + "narHash": "sha256-rhHyZTGI31/OfgYa9xF49UTchDXTI94pEsSNa0fOkpk=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "b457130e8a21608675ddf12c7d85227b22a27112", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "nlsp-settings-nvim": { "flake": false, "locked": { @@ -580,7 +660,7 @@ "mailserver": "mailserver", "myneovim": "myneovim", "nil": "nil", - "nixpkgs": "nixpkgs", + "nixpkgs": "nixpkgs_3", "vnetod": "vnetod", "wired": "wired" } @@ -694,21 +774,6 @@ } }, "utils_2": { - "locked": { - "lastModified": 1659877975, - "narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "utils_3": { "locked": { "lastModified": 1652776076, "narHash": "sha256-gzTw/v1vj4dOVbpBSJX4J0DwUR6LIyXo7/SuuTJp1kM=", @@ -752,7 +817,7 @@ "nixpkgs": [ "nixpkgs" ], - "utils": "utils_3" + "utils": "utils_2" }, "locked": { "lastModified": 1665825115, diff --git a/flake.nix b/flake.nix index 742495b..8e1698e 100644 --- a/flake.nix +++ b/flake.nix @@ -29,10 +29,7 @@ }; # my neovim configuration - myneovim = { - url = "git+https://git.pleshevski.ru/mynix/neovim"; - inputs.nixpkgs.follows = "nixpkgs"; - }; + myneovim.url = "git+https://git.pleshevski.ru/mynix/neovim"; # tool to change .env faster vnetod = { diff --git a/users/modules/editor.nix b/users/modules/editor.nix index 002df44..3961d65 100644 --- a/users/modules/editor.nix +++ b/users/modules/editor.nix @@ -24,6 +24,62 @@ let "ledger" "org" ]; + plugins = with pkgs.myneovim.nix2lua; { + nvimTree.settings = { + open_on_setup = true; + renderer = { + group_empty = true; + full_name = true; + }; + }; + lspSaga.settings = { + border_style = "rounded"; + symbol_in_winbar.enable = false; + code_action_lightbulb.enable = false; + code_action_keys = { quit = ""; }; + definition_action_keys = { quit = ""; }; + rename_action_quit = ""; + }; + lspConfig = { + servers = { + nil_ls = { }; + tsserver = { }; + eslint = { }; + denols = { + root_dir = mkLuaRaw "root_pattern(\"deno.json\", \"deno.jsonc\")"; + }; + rust_analyzer = { + settings.rust-analyzer = { + "server.path" = "rust-analyzer"; + "updates.prompt" = false; + "updates.checkOnStartup" = false; + "checkOnSave.enable" = true; + "checkOnSave.command" = "clippy"; + "cargo.autoreload" = true; + }; + }; + }; + lualine.settings = { + options.ignore_focus = [ "NvimTree" ]; + sections = { + lualine_a = [ + [ "filename" (mkNamedField "path" 1) ] + ]; + lualine_b = [ "branch" "diff" "diagnostics" ]; + lualine_c = [ "lsp_progress" ]; + lualine_x = [ "filesize" "filetype" ]; + lualine_y = [ "progress" ]; + lualine_z = [ "location" "mode" ]; + }; + }; + orgmode.settings = { + org_agenda_files = [ "~/orgs/**/*" ]; + org_default_notes_file = "~/orgs/refile.org"; + win_split_mode = "tabnew"; + org_hide_leading_stars = true; + }; + }; + }; }; in {