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"
|
"nixpkgs": "nixpkgs"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1668806730,
|
"lastModified": 1668823439,
|
||||||
"narHash": "sha256-CfRF/O5ObRBGCQkrUBsNWzKH2OjLNtOOuVk8H2dMoxQ=",
|
"narHash": "sha256-/o0SRNf+2yqg+mCUE2UGdsDkD0BCcSPCQYUZKoZxzI0=",
|
||||||
"ref": "refs/heads/main",
|
"ref": "refs/heads/main",
|
||||||
"rev": "9666618527a63e79ccc1855beeab285cd8480727",
|
"rev": "520a06d52cbd90aa290eccac28f4f1fefee64b27",
|
||||||
"revCount": 6,
|
"revCount": 11,
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://git.pleshevski.ru/mynix/nix2lua"
|
"url": "https://git.pleshevski.ru/mynix/nix2lua"
|
||||||
},
|
},
|
||||||
|
|
67
flake.nix
67
flake.nix
|
@ -219,6 +219,7 @@
|
||||||
{ inherit neovimPlugins; };
|
{ inherit neovimPlugins; };
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
lib = nix2lua.lib;
|
||||||
overlays = {
|
overlays = {
|
||||||
default = final: prev: {
|
default = final: prev: {
|
||||||
myneovim = prev.callPackage self (mkNvimPlugins prev // nix2lua.lib);
|
myneovim = prev.callPackage self (mkNvimPlugins prev // nix2lua.lib);
|
||||||
|
@ -229,13 +230,12 @@
|
||||||
let
|
let
|
||||||
pkgs = import nixpkgs { inherit system; };
|
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;
|
enableDevIcons = true;
|
||||||
enableTabby = true;
|
enableTabby = true;
|
||||||
enableOrgMode = true;
|
grammarFileTypes = [ "nix" "lua" ];
|
||||||
grammarFileTypes = [ "nix" "lua" "org" ];
|
|
||||||
|
|
||||||
plugins = with nix2lua.lib; {
|
plugins = with nix2lua.lib; {
|
||||||
nvimTree.settings = {
|
nvimTree.settings = {
|
||||||
|
@ -245,39 +245,11 @@
|
||||||
full_name = true;
|
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 = {
|
lualine.settings = {
|
||||||
options.ignore_focus = [ "NvimTree" ];
|
options.ignore_focus = [ "NvimTree" ];
|
||||||
sections = {
|
sections = {
|
||||||
lualine_a = [
|
lualine_a = [
|
||||||
[ "filename" (mkDictItem "path" 1) ]
|
[ "filename" (mkNamedField "path" 1) ]
|
||||||
];
|
];
|
||||||
lualine_b = [ "branch" "diff" "diagnostics" ];
|
lualine_b = [ "branch" "diff" "diagnostics" ];
|
||||||
lualine_c = [ "lsp_progress" ];
|
lualine_c = [ "lsp_progress" ];
|
||||||
|
@ -286,27 +258,26 @@
|
||||||
lualine_z = [ "location" "mode" ];
|
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
|
in
|
||||||
{
|
{
|
||||||
apps.default = {
|
apps = {
|
||||||
type = "app";
|
default = mkApp recommendedNeovim;
|
||||||
program = "${neovim}/bin/nvim";
|
recommended = mkApp recommendedNeovim;
|
||||||
};
|
minimal = mkApp minimalNeovim;
|
||||||
apps.test = {
|
|
||||||
type = "app";
|
|
||||||
program = "${testNeovim}/bin/nvim";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
packages.default = neovim;
|
packages = {
|
||||||
packages.test = testNeovim;
|
default = recommendedNeovim;
|
||||||
|
recommended = recommendedNeovim;
|
||||||
|
minimal = minimalNeovim;
|
||||||
|
};
|
||||||
|
|
||||||
devShells.default = pkgs.mkShell {
|
devShells.default = pkgs.mkShell {
|
||||||
packages = [
|
packages = [
|
||||||
|
|
|
@ -6,5 +6,6 @@ vim.cmd([[
|
||||||
aug fmt
|
aug fmt
|
||||||
au!
|
au!
|
||||||
au BufWritePre * try | undojoin | Neoformat | catch /E790/ | Neoformat | endtry
|
au BufWritePre * try | undojoin | Neoformat | catch /E790/ | Neoformat | endtry
|
||||||
|
au BufWritePre *.tsx,*.ts,*.jsx,*.js EslintFixAll
|
||||||
aug END
|
aug END
|
||||||
]])
|
]])
|
||||||
|
|
Reference in a new issue