Neovim: Possibly auto-refresh neotree when closing lazygit
Currently commented out
This commit is contained in:
@ -95,7 +95,7 @@ in {
|
|||||||
performance.byteCompileLua = {
|
performance.byteCompileLua = {
|
||||||
enable = true;
|
enable = true;
|
||||||
configs = true;
|
configs = true;
|
||||||
initLua = true; # When debugging init.lua turn this off
|
initLua = false; # When debugging init.lua turn this off
|
||||||
nvimRuntime = true;
|
nvimRuntime = true;
|
||||||
plugins = true;
|
plugins = true;
|
||||||
};
|
};
|
||||||
@ -123,6 +123,25 @@ in {
|
|||||||
# extraPython3Packages = p: [];
|
# extraPython3Packages = p: [];
|
||||||
|
|
||||||
autoCmd = [
|
autoCmd = [
|
||||||
|
# TODO: This only works if neotree has been opened before...
|
||||||
|
# {
|
||||||
|
# desc = "Refresh neotree when closing lazygit";
|
||||||
|
# event = ["BufLeave"];
|
||||||
|
# pattern = ["*lazygit*"];
|
||||||
|
# callback.__raw = ''
|
||||||
|
# function()
|
||||||
|
# local manager = require("neo-tree.sources.manager")
|
||||||
|
# local renderer = require("neo-tree.ui.renderer")
|
||||||
|
# local state = manager.get_state("filesystem")
|
||||||
|
# local window_exists = renderer.window_exists(state)
|
||||||
|
|
||||||
|
# if window_exists then
|
||||||
|
# require("neo-tree.sources.filesystem.commands").refresh(state)
|
||||||
|
# end
|
||||||
|
# end
|
||||||
|
# '';
|
||||||
|
# }
|
||||||
|
|
||||||
{
|
{
|
||||||
desc = "Lint the file if autolint is enabled";
|
desc = "Lint the file if autolint is enabled";
|
||||||
event = ["BufWritePost"];
|
event = ["BufWritePost"];
|
||||||
@ -239,7 +258,7 @@ in {
|
|||||||
event = ["InsertEnter"];
|
event = ["InsertEnter"];
|
||||||
config = mkDefaultConfig name;
|
config = mkDefaultConfig name;
|
||||||
opts = {
|
opts = {
|
||||||
# mapping = ["jk"]; # NOTE: Deprecated
|
# mapping = ["jk"]; # Deprecated but still the default
|
||||||
default_mappings = true;
|
default_mappings = true;
|
||||||
timeout = 200; # In ms
|
timeout = 200; # In ms
|
||||||
};
|
};
|
||||||
@ -385,6 +404,35 @@ in {
|
|||||||
lazy = true;
|
lazy = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# TODO: Check if plugin landed in repos
|
||||||
|
blink-cmp = let
|
||||||
|
tag = "0.3.1";
|
||||||
|
in rec {
|
||||||
|
name = "blink.cmp";
|
||||||
|
pkg = pkgs.vimUtils.buildVimPlugin {
|
||||||
|
name = "blink.cmp";
|
||||||
|
src = pkgs.fetchFromGitHub {
|
||||||
|
owner = "Saghen";
|
||||||
|
repo = "blink.cmp";
|
||||||
|
rev = "v${tag}"; # v0.3.1
|
||||||
|
sha256 = "sha256-bvhLOM0NMx5S069uX2OecEpzYaR3hV4r8nCIPD0f0XQ=";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
lazy = true;
|
||||||
|
event = ["InsertEnter"];
|
||||||
|
config = mkDefaultConfig name;
|
||||||
|
opts = {
|
||||||
|
highlight = {
|
||||||
|
use_nvim_cmp_as_default = true;
|
||||||
|
};
|
||||||
|
nerd_font_variant = "mono";
|
||||||
|
fuzzy = {
|
||||||
|
download = true;
|
||||||
|
forceVersion = tag;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
cmp = rec {
|
cmp = rec {
|
||||||
name = "cmp";
|
name = "cmp";
|
||||||
pkg = pkgs.vimPlugins.nvim-cmp;
|
pkg = pkgs.vimPlugins.nvim-cmp;
|
||||||
@ -1052,7 +1100,7 @@ in {
|
|||||||
|
|
||||||
local __lspCapabilities = function()
|
local __lspCapabilities = function()
|
||||||
capabilities = vim.lsp.protocol.make_client_capabilities()
|
capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||||
capabilities = vim.tbl_deep_extend("force", capabilities, require("cmp_nvim_lsp").default_capabilities())
|
capabilities = vim.tbl_deep_extend("force", capabilities, require("_nvim_lsp").default_capabilities())
|
||||||
return capabilities
|
return capabilities
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -2037,11 +2085,10 @@ in {
|
|||||||
better-escape # Escape to normal mode using "jk"
|
better-escape # Escape to normal mode using "jk"
|
||||||
catppuccin # Colortheme (also add this here to access palettes)
|
catppuccin # Colortheme (also add this here to access palettes)
|
||||||
cellular-automaton # Procrastinate better by watching animations
|
cellular-automaton # Procrastinate better by watching animations
|
||||||
clangd-extensions
|
clangd-extensions # Improved clang LSP support
|
||||||
|
|
||||||
# blink-cmp # Auto completion popups # TODO: Try this instead of cmp
|
blink-cmp # Auto completion popups # TODO: Try this instead of cmp
|
||||||
|
# cmp # Auto completion popups
|
||||||
cmp # Auto completion popups
|
|
||||||
|
|
||||||
# colorizer # Colorize color strings # TODO: Only colorize html/css/scss/sass/js
|
# colorizer # Colorize color strings # TODO: Only colorize html/css/scss/sass/js
|
||||||
|
|
||||||
@ -2093,7 +2140,7 @@ in {
|
|||||||
ufo # Code folding
|
ufo # Code folding
|
||||||
vimtex # LaTeX support
|
vimtex # LaTeX support
|
||||||
wakatime # Time tracking
|
wakatime # Time tracking
|
||||||
web-devicons
|
web-devicons # Icons for many plugins
|
||||||
which-key # Live keybinding help
|
which-key # Live keybinding help
|
||||||
winshift # Move windows around
|
winshift # Move windows around
|
||||||
yanky # Clipboard history
|
yanky # Clipboard history
|
||||||
|
|||||||
Reference in New Issue
Block a user