update neovim
This commit is contained in:
parent
ea2231f615
commit
465f27ac0c
3 changed files with 24 additions and 52 deletions
|
@ -206,11 +206,11 @@
|
|||
"nixpkgs": "nixpkgs"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1668806730,
|
||||
"narHash": "sha256-CfRF/O5ObRBGCQkrUBsNWzKH2OjLNtOOuVk8H2dMoxQ=",
|
||||
"lastModified": 1668823439,
|
||||
"narHash": "sha256-/o0SRNf+2yqg+mCUE2UGdsDkD0BCcSPCQYUZKoZxzI0=",
|
||||
"ref": "refs/heads/main",
|
||||
"rev": "9666618527a63e79ccc1855beeab285cd8480727",
|
||||
"revCount": 6,
|
||||
"rev": "520a06d52cbd90aa290eccac28f4f1fefee64b27",
|
||||
"revCount": 11,
|
||||
"type": "git",
|
||||
"url": "https://git.pleshevski.ru/mynix/nix2lua"
|
||||
},
|
||||
|
|
67
flake.nix
67
flake.nix
|
@ -219,6 +219,7 @@
|
|||
{ inherit neovimPlugins; };
|
||||
in
|
||||
{
|
||||
lib = nix2lua.lib;
|
||||
overlays = {
|
||||
default = final: prev: {
|
||||
myneovim = prev.callPackage self (mkNvimPlugins prev // nix2lua.lib);
|
||||
|
@ -229,13 +230,12 @@
|
|||
let
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
|
||||
neovim = pkgs.callPackage self (mkNvimPlugins pkgs // nix2lua.lib);
|
||||
minimalNeovim = pkgs.callPackage self (mkNvimPlugins pkgs // nix2lua.lib);
|
||||
|
||||
testNeovim = (neovim.override {
|
||||
recommendedNeovim = (minimalNeovim.override {
|
||||
enableDevIcons = true;
|
||||
enableTabby = true;
|
||||
enableOrgMode = true;
|
||||
grammarFileTypes = [ "nix" "lua" "org" ];
|
||||
grammarFileTypes = [ "nix" "lua" ];
|
||||
|
||||
plugins = with nix2lua.lib; {
|
||||
nvimTree.settings = {
|
||||
|
@ -245,39 +245,11 @@
|
|||
full_name = true;
|
||||
};
|
||||
};
|
||||
lspSaga.settings = {
|
||||
border_style = "rounded";
|
||||
symbol_in_winbar.enable = false;
|
||||
code_action_lightbulb.enable = false;
|
||||
code_action_keys = { quit = "<Esc>"; };
|
||||
definition_action_keys = { quit = "<Esc>"; };
|
||||
rename_action_quit = "<C-c>";
|
||||
};
|
||||
lspConfig = {
|
||||
servers = {
|
||||
nix = { };
|
||||
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" (mkDictItem "path" 1) ]
|
||||
[ "filename" (mkNamedField "path" 1) ]
|
||||
];
|
||||
lualine_b = [ "branch" "diff" "diagnostics" ];
|
||||
lualine_c = [ "lsp_progress" ];
|
||||
|
@ -286,27 +258,26 @@
|
|||
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;
|
||||
};
|
||||
};
|
||||
});
|
||||
|
||||
mkApp = drv: {
|
||||
type = "app";
|
||||
program = "${drv}/bin/nvim";
|
||||
};
|
||||
in
|
||||
{
|
||||
apps.default = {
|
||||
type = "app";
|
||||
program = "${neovim}/bin/nvim";
|
||||
};
|
||||
apps.test = {
|
||||
type = "app";
|
||||
program = "${testNeovim}/bin/nvim";
|
||||
apps = {
|
||||
default = mkApp recommendedNeovim;
|
||||
recommended = mkApp recommendedNeovim;
|
||||
minimal = mkApp minimalNeovim;
|
||||
};
|
||||
|
||||
packages.default = neovim;
|
||||
packages.test = testNeovim;
|
||||
packages = {
|
||||
default = recommendedNeovim;
|
||||
recommended = recommendedNeovim;
|
||||
minimal = minimalNeovim;
|
||||
};
|
||||
|
||||
devShells.default = pkgs.mkShell {
|
||||
packages = [
|
||||
|
|
|
@ -6,5 +6,6 @@ vim.cmd([[
|
|||
aug fmt
|
||||
au!
|
||||
au BufWritePre * try | undojoin | Neoformat | catch /E790/ | Neoformat | endtry
|
||||
au BufWritePre *.tsx,*.ts,*.jsx,*.js EslintFixAll
|
||||
aug END
|
||||
]])
|
||||
|
|
Reference in a new issue