Neovim: Possibly auto-refresh neotree when closing lazygit
Currently commented out
This commit is contained in:
@ -95,7 +95,7 @@ in {
|
||||
performance.byteCompileLua = {
|
||||
enable = true;
|
||||
configs = true;
|
||||
initLua = true; # When debugging init.lua turn this off
|
||||
initLua = false; # When debugging init.lua turn this off
|
||||
nvimRuntime = true;
|
||||
plugins = true;
|
||||
};
|
||||
@ -123,6 +123,25 @@ in {
|
||||
# extraPython3Packages = p: [];
|
||||
|
||||
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";
|
||||
event = ["BufWritePost"];
|
||||
@ -239,7 +258,7 @@ in {
|
||||
event = ["InsertEnter"];
|
||||
config = mkDefaultConfig name;
|
||||
opts = {
|
||||
# mapping = ["jk"]; # NOTE: Deprecated
|
||||
# mapping = ["jk"]; # Deprecated but still the default
|
||||
default_mappings = true;
|
||||
timeout = 200; # In ms
|
||||
};
|
||||
@ -385,6 +404,35 @@ in {
|
||||
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 {
|
||||
name = "cmp";
|
||||
pkg = pkgs.vimPlugins.nvim-cmp;
|
||||
@ -1052,7 +1100,7 @@ in {
|
||||
|
||||
local __lspCapabilities = function()
|
||||
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
|
||||
end
|
||||
|
||||
@ -2037,11 +2085,10 @@ in {
|
||||
better-escape # Escape to normal mode using "jk"
|
||||
catppuccin # Colortheme (also add this here to access palettes)
|
||||
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
|
||||
|
||||
cmp # Auto completion popups
|
||||
blink-cmp # Auto completion popups # TODO: Try this instead of cmp
|
||||
# cmp # Auto completion popups
|
||||
|
||||
# colorizer # Colorize color strings # TODO: Only colorize html/css/scss/sass/js
|
||||
|
||||
@ -2093,7 +2140,7 @@ in {
|
||||
ufo # Code folding
|
||||
vimtex # LaTeX support
|
||||
wakatime # Time tracking
|
||||
web-devicons
|
||||
web-devicons # Icons for many plugins
|
||||
which-key # Live keybinding help
|
||||
winshift # Move windows around
|
||||
yanky # Clipboard history
|
||||
|
||||
Reference in New Issue
Block a user