Compare commits
128 Commits
75098bcba0
...
aa1271c42c
| Author | SHA1 | Date | |
|---|---|---|---|
| aa1271c42c | |||
| 1743764e48 | |||
| 903107a441 | |||
| e4a8c96c7e | |||
| d9fdc3dde2 | |||
| 3fc8bb2931 | |||
| 25cfcf2941 | |||
| 07409c223d | |||
| 001c41a903 | |||
| 0846fb0860 | |||
| d878c984a8 | |||
| 357fcecee7 | |||
| 476da8757c | |||
| dd67e2b7f9 | |||
| f5af8e2b28 | |||
| 64b51cf53a | |||
| 0a9018a3d6 | |||
| dd2ebf0c19 | |||
| b0d11daefb | |||
| 3b52313c29 | |||
| 85b6ead156 | |||
| 8a38450c20 | |||
| 00464e0e65 | |||
| f215ce2ab5 | |||
| 75b22a9223 | |||
| a9a438ab6f | |||
| 063c23441e | |||
| 3a15a7cdaf | |||
| dd1839b31e | |||
| c04190c4cd | |||
| 52b8725a1a | |||
| 91914058c0 | |||
| 01b9fbc444 | |||
| 4ee6bb7875 | |||
| 5aaab167fa | |||
| b02ce3942f | |||
| 3a45aa3d76 | |||
| ffbb81947e | |||
| e615048e8c | |||
| c5590838e2 | |||
| b2b37cb5ad | |||
| 28410d287f | |||
| 7b03697ca4 | |||
| 54f62cdd98 | |||
| f2c652f5ae | |||
| 987ca9177a | |||
| 15cd70b09e | |||
| 30034e91c8 | |||
| c4575e1de0 | |||
| 489675c32c | |||
| f0fadf6d12 | |||
| 67ae09d87f | |||
| 075fe5f587 | |||
| 859ee3a2ba | |||
| 89942efaf6 | |||
| 10771b5b00 | |||
| bbcc7f34a3 | |||
| c9bb45dfc4 | |||
| 3c36b5fea4 | |||
| 772fea6c51 | |||
| 96f09869b7 | |||
| a89c51865c | |||
| aeec0fe400 | |||
| fa0d2d57b9 | |||
| 35131b13ec | |||
| 8fed729bf9 | |||
| b8e666b0a3 | |||
| c116d41be7 | |||
| 290a3f1414 | |||
| 2f7abfbed8 | |||
| dbba1a0757 | |||
| 576a1cf32a | |||
| e2bf299ee3 | |||
| 50723ef645 | |||
| fd506d4921 | |||
| 1b2a8cf4c8 | |||
| efe471d8ba | |||
| 83e285850f | |||
| 8c55c21341 | |||
| 7ade9269cf | |||
| 33a21a63ed | |||
| 03cb4ecd83 | |||
| f30077f307 | |||
| 3932d24fab | |||
| dd49360ebc | |||
| a07101f8d3 | |||
| 037bfab3ee | |||
| 32dc25e4c3 | |||
| f9fd59d00e | |||
| 85a05f54ad | |||
| b0aa76760e | |||
| 58a2312529 | |||
| 927e564e90 | |||
| eeba2a0f5b | |||
| 847a34c6b9 | |||
| afa21f2fae | |||
| 44fdd68894 | |||
| 410a9182bf | |||
| de94d7f695 | |||
| dc532b1c7a | |||
| 9097c7952b | |||
| d711189a52 | |||
| 80275141a4 | |||
| 48b469f6b5 | |||
| 2f2f929066 | |||
| 0a6070c717 | |||
| fd494fafc5 | |||
| 2396bd4fea | |||
| 34a80fac0e | |||
| 5e8c7c52d9 | |||
| ef2e28883d | |||
| 75eea0c030 | |||
| 640de35260 | |||
| 0afbaeaca3 | |||
| a56ba1dbe1 | |||
| 05ed0caab9 | |||
| 49d769cad2 | |||
| adcc104f8f | |||
| 0abf1fc657 | |||
| 2bcbe365c1 | |||
| 033a4196d0 | |||
| 9c0bbe8214 | |||
| f02bd07fea | |||
| 33d409db6a | |||
| 9986cedddc | |||
| 1b896b996b | |||
| 7326a669e5 | |||
| dc4b451540 |
8
.gitignore
vendored
8
.gitignore
vendored
@ -1,8 +1,10 @@
|
|||||||
.owncloudsync.log
|
.owncloudsync.log
|
||||||
|
.nextcloudsync.log
|
||||||
.sync_*
|
.sync_*
|
||||||
result
|
.directory
|
||||||
.direnv
|
.direnv
|
||||||
.idea
|
.idea
|
||||||
/.directory
|
|
||||||
.nextcloudsync.log
|
|
||||||
.docs
|
.docs
|
||||||
|
result
|
||||||
|
|
||||||
|
config/neovim/store
|
||||||
|
|||||||
BIN
NixVim.png
Normal file
BIN
NixVim.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.2 MiB |
40
README.md
40
README.md
@ -1,44 +1,42 @@
|
|||||||
# NixOS Configuration
|
# NixOS Configuration
|
||||||
|
|
||||||
This is my modular NixOS configuration, using Hyprland for a lightweight desktop.
|
Modular NixOS configuration, using Hyprland for a lightweight desktop.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
To install, run ``nixos-rebuild`` with the ``--flake`` parameter from the ``NixFlake`` directory: ``nixos-rebuild switch --flake .#nixinator``.
|

|
||||||
|
|
||||||
|
To install, run `nixos-rebuild` with the `--flake` parameter from the `NixFlake` directory: `nixos-rebuild switch --flake .#nixinator`.
|
||||||
|
|
||||||
## NixFlake/system
|
## NixFlake/system
|
||||||
|
|
||||||
This folder contains all the system configurations.
|
Contains all the system configurations.
|
||||||
|
|
||||||
- There is a common configuration used for all systems: ``NixFlake/system/default.nix``
|
- There is a common configuration used for all systems: `NixFlake/system/default.nix`
|
||||||
- Every system has its own special configuration: ``NixFlake/system/<hostname>/default.nix``
|
- Every system has its own special configuration: `NixFlake/system/<hostname>/default.nix`
|
||||||
- System modules are located in ``NixFlake/system/modules``
|
- System modules are located in `NixFlake/system/modules`
|
||||||
|
|
||||||
When creating a NixOS configuration inside the ``NixFlake/flake.nix`` the common configuration is imported.
|
When creating a NixOS configuration inside the `NixFlake/flake.nix` the common configuration is imported.
|
||||||
Because the hostname is propagated to the common configuration, it can import the host-specific config by itself.
|
Because the hostname is propagated to the common configuration, it can import the host-specific config by itself.
|
||||||
|
|
||||||
## NixFlake/home
|
## NixFlake/home
|
||||||
|
|
||||||
This folder contains all the home-manager configurations.
|
Contains all the home-manager configurations.
|
||||||
|
|
||||||
- There is a common configuration for each user: ``NixFlake/home/<username>/default.nix``
|
- There is a common configuration for each user: `NixFlake/home/<username>/default.nix`
|
||||||
- There is a configuration for a single system of this user: ``NixFlake/home/<username>/<hostname>/default.nix``
|
- There is a configuration for a single system of this user: `NixFlake/home/<username>/<hostname>/default.nix`
|
||||||
- Home-Manager modules are located in ``NixFlake/home/modules``
|
- Home-Manager modules are located in `NixFlake/home/modules`
|
||||||
|
|
||||||
When creating a NixOS configuration inside the ``NixFlake/flake.nix`` the common configuration is imported.
|
When creating a NixOS configuration inside the `NixFlake/flake.nix` the common configuration is imported.
|
||||||
Because the hostname is propagated to the common configuration, it can import the host-specific config by itself.
|
Because the hostname is propagated to the common configuration, it can import the host-specific config by itself.
|
||||||
|
|
||||||
## NixFlake/derivations
|
## NixFlake/derivations
|
||||||
|
|
||||||
This folder contains all the stuff I packaged.
|
Contains all the stuff I packaged.
|
||||||
Each derivation is loaded into ``NixFlake/derivations/default.nix``.
|
Each derivation is loaded into `NixFlake/derivations/default.nix`.
|
||||||
|
|
||||||
## NixFlake/overlays
|
## NixFlake/overlays
|
||||||
|
|
||||||
This folder contains (not at the moment) all overlays.
|
Contains (not at the moment) all overlays.
|
||||||
The ``NixFlake/overlays/default.nix`` imports all of the overlays and all of the derivations.
|
The `NixFlake/overlays/default.nix` imports all of the overlays and all of the derivations.
|
||||||
It is then imported by the toplevel ``NixFlake/flake.nix``, to make everything available to the system/home configurations.
|
It is then imported by the toplevel `NixFlake/flake.nix`, to make everything available to the system/home configurations.
|
||||||
|
|
||||||
## NixFlake/docs
|
|
||||||
|
|
||||||
This folder contains automatically generated static documentation sites for my Home-Manager modules.
|
|
||||||
|
|||||||
@ -77,7 +77,7 @@ dwindle {
|
|||||||
}
|
}
|
||||||
|
|
||||||
master {
|
master {
|
||||||
new_is_master = true
|
new_status = master
|
||||||
}
|
}
|
||||||
|
|
||||||
gestures {
|
gestures {
|
||||||
@ -130,16 +130,16 @@ bind = $mainMod SHIFT, 9, movetoworkspace, 9
|
|||||||
bind = $mainMod SHIFT, 0, movetoworkspace, 10
|
bind = $mainMod SHIFT, 0, movetoworkspace, 10
|
||||||
|
|
||||||
# Reset the workspace positions after disabling and reenabling a monitor
|
# Reset the workspace positions after disabling and reenabling a monitor
|
||||||
bind = CTRL ALT, R, moveworkspacetomonitor, 1 DP-1
|
bind = CTRL ALT, R, moveworkspacetomonitor, 1 HDMI-A-1
|
||||||
bind = CTRL ALT, R, moveworkspacetomonitor, 2 DP-1
|
bind = CTRL ALT, R, moveworkspacetomonitor, 2 HDMI-A-1
|
||||||
bind = CTRL ALT, R, moveworkspacetomonitor, 3 DP-1
|
bind = CTRL ALT, R, moveworkspacetomonitor, 3 HDMI-A-1
|
||||||
bind = CTRL ALT, R, moveworkspacetomonitor, 4 DP-1
|
bind = CTRL ALT, R, moveworkspacetomonitor, 4 HDMI-A-1
|
||||||
bind = CTRL ALT, R, moveworkspacetomonitor, 5 DP-1
|
bind = CTRL ALT, R, moveworkspacetomonitor, 5 HDMI-A-1
|
||||||
bind = CTRL ALT, R, moveworkspacetomonitor, 6 DP-1
|
bind = CTRL ALT, R, moveworkspacetomonitor, 6 HDMI-A-1
|
||||||
bind = CTRL ALT, R, moveworkspacetomonitor, 7 DP-1
|
bind = CTRL ALT, R, moveworkspacetomonitor, 7 HDMI-A-1
|
||||||
bind = CTRL ALT, R, moveworkspacetomonitor, 8 DP-1
|
bind = CTRL ALT, R, moveworkspacetomonitor, 8 HDMI-A-1
|
||||||
bind = CTRL ALT, R, moveworkspacetomonitor, 9 DP-1
|
bind = CTRL ALT, R, moveworkspacetomonitor, 9 HDMI-A-1
|
||||||
bind = CTRL ALT, R, moveworkspacetomonitor, 10 HDMI-A-1
|
bind = CTRL ALT, R, moveworkspacetomonitor, 10 DP-1
|
||||||
|
|
||||||
# Move/resize windows with mainMod + LMB/RMB and dragging
|
# Move/resize windows with mainMod + LMB/RMB and dragging
|
||||||
bindm = $mainMod, mouse:272, movewindow
|
bindm = $mainMod, mouse:272, movewindow
|
||||||
|
|||||||
16
config/neovim/bootstrap.lua
Normal file
16
config/neovim/bootstrap.lua
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
-- Bootstrap lazy.nvim
|
||||||
|
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||||
|
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
||||||
|
vim.fn.system({
|
||||||
|
"git",
|
||||||
|
"clone",
|
||||||
|
"--filter=blob:none",
|
||||||
|
"https://github.com/folke/lazy.nvim.git",
|
||||||
|
"--branch=stable", -- latest stable release
|
||||||
|
lazypath,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
vim.opt.rtp:prepend(lazypath)
|
||||||
|
|
||||||
|
-- Setup lazy.nvim
|
||||||
|
-- require("lazy").setup(plugins, opts) -- Do in config.lua
|
||||||
1710
config/neovim/config.lua
Normal file
1710
config/neovim/config.lua
Normal file
File diff suppressed because it is too large
Load Diff
1710
config/neovim/config_nix.lua
Normal file
1710
config/neovim/config_nix.lua
Normal file
File diff suppressed because it is too large
Load Diff
11
config/neovim/init.lua
Normal file
11
config/neovim/init.lua
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
local addRelPath = function(dir)
|
||||||
|
local spath = debug.getinfo(1, "S").source:sub(2):gsub("^([^/])", "./%1"):gsub("[^/]*$", "")
|
||||||
|
dir = dir and (dir .. "/") or ""
|
||||||
|
spath = spath .. dir
|
||||||
|
package.path = spath .. "?.lua;" .. spath .. "?/init.lua" .. package.path
|
||||||
|
end
|
||||||
|
|
||||||
|
addRelPath()
|
||||||
|
|
||||||
|
require("bootstrap")
|
||||||
|
require("config")
|
||||||
60
config/neovim/refresh_config.sh
Executable file
60
config/neovim/refresh_config.sh
Executable file
@ -0,0 +1,60 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Copy init.lua
|
||||||
|
INIT_PATH="$(readlink -f ~/.config/nvim/init.lua)"
|
||||||
|
cp -f "$INIT_PATH" ./config.lua
|
||||||
|
cp -f "$INIT_PATH" ./config_nix.lua
|
||||||
|
echo "Copied $INIT_PATH to ./config.lua and ./config_nix.lua"
|
||||||
|
|
||||||
|
chmod +w ./config.lua
|
||||||
|
chmod +w ./config_nix.lua
|
||||||
|
echo "Fixed permission for ./config.lua and ./config_nix.lua"
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
# Copy all plugins
|
||||||
|
rm -rf ./store/* # TODO: Check if ./store even exists
|
||||||
|
echo "Cleared ./store/"
|
||||||
|
|
||||||
|
STORE_PATHS=$(rg -oN "\"/nix/store/.*?(lazy-plugins|vimplugin-nvim-treesitter-.*?|treesitter-parsers)\"" config.lua | uniq | sd "\"" "")
|
||||||
|
for STORE_PATH in $STORE_PATHS
|
||||||
|
do
|
||||||
|
cp -Lr "$STORE_PATH" ./store/
|
||||||
|
echo "Copied $STORE_PATH to ./store/"
|
||||||
|
done
|
||||||
|
|
||||||
|
chmod -R +w ./store/*
|
||||||
|
echo "Fixed permissions for ./store"
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
# Fix plugin paths
|
||||||
|
for IDENTIFIER in "treesitter-parsers" "lazy-plugins" "nvim-treesitter"
|
||||||
|
do
|
||||||
|
CURRENT_PATH=$(eza -1 ./store | grep $IDENTIFIER)
|
||||||
|
mv "./store/$CURRENT_PATH" "./store/$IDENTIFIER"
|
||||||
|
echo "Moved ./store/$CURRENT_PATH to ./store/$IDENTIFIER"
|
||||||
|
done
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
BASE_PATH="/home/lab/smchurla/Downloads/flake-nixinator/config/neovim/store"
|
||||||
|
for IDENTIFIER in "treesitter-parsers" "lazy-plugins" "nvim-treesitter"
|
||||||
|
do
|
||||||
|
REPLACE_STRINGS=$(rg -oN "\"/nix/store/.*?$IDENTIFIER.*?\"" ./config.lua | uniq | sd "\"" "")
|
||||||
|
for REPLACE_STRING in $REPLACE_STRINGS
|
||||||
|
do
|
||||||
|
if [[ $REPLACE_STRING =~ .*$IDENTIFIER/.* ]];
|
||||||
|
then
|
||||||
|
# Trailing / means not the entire string can be replaced
|
||||||
|
REPLACE_STRING=$(dirname "$REPLACE_STRING")
|
||||||
|
sd "$REPLACE_STRING" "$BASE_PATH/$IDENTIFIER" ./config.lua
|
||||||
|
echo "Substituted $REPLACE_STRING with $BASE_PATH/$IDENTIFIER"
|
||||||
|
else
|
||||||
|
# No trailing / means the entire string can be replaced
|
||||||
|
sd "$REPLACE_STRING" "$BASE_PATH/$IDENTIFIER" ./config.lua
|
||||||
|
echo "Substituted $REPLACE_STRING with $BASE_PATH/$IDENTIFIER"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
done
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
sd "/home/christoph" "/home/lab/smchurla" ./config.lua
|
||||||
|
echo "Substituted /home/christoph with /home/lab/smchurla"
|
||||||
12
config/neovim/store/lazy-plugins/NrrwRgn/.gitignore
vendored
Normal file
12
config/neovim/store/lazy-plugins/NrrwRgn/.gitignore
vendored
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
post.pl
|
||||||
|
vim_passfile
|
||||||
|
.*.un~
|
||||||
|
.*.sw*
|
||||||
|
# ignore vimballs
|
||||||
|
*.vba
|
||||||
|
*.vmb
|
||||||
|
# ignore *.orig files
|
||||||
|
*.orig
|
||||||
|
doc/tags
|
||||||
|
# ignore test files
|
||||||
|
*.mod
|
||||||
48
config/neovim/store/lazy-plugins/NrrwRgn/Makefile
Normal file
48
config/neovim/store/lazy-plugins/NrrwRgn/Makefile
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
SCRIPT=$(wildcard plugin/*.vim)
|
||||||
|
AUTOL =$(wildcard autoload/*.vim)
|
||||||
|
DOC=$(wildcard doc/*.txt)
|
||||||
|
PLUGIN=$(shell basename "$$PWD")
|
||||||
|
VERSION=$(shell sed -n '/Version:/{s/^.*\(\S\.\S\+\)$$/\1/;p}' $(SCRIPT))
|
||||||
|
|
||||||
|
.PHONY: $(PLUGIN).vmb README test
|
||||||
|
|
||||||
|
all: uninstall vimball install
|
||||||
|
|
||||||
|
vimball: $(PLUGIN).vmb
|
||||||
|
|
||||||
|
clean:
|
||||||
|
find . -type f \( -name "*.vba" -o -name "*.orig" -o -name "*.~*" \
|
||||||
|
-o -name ".VimballRecord" -o -name ".*.un~" -o -name "*.sw*" -o \
|
||||||
|
-name tags -o -name "*.vmb" \) -delete
|
||||||
|
|
||||||
|
dist-clean: clean
|
||||||
|
|
||||||
|
install:
|
||||||
|
vim -N -i NONE -u NONE -c 'ru! plugin/vimballPlugin.vim' -c':so %' -c':q!' $(PLUGIN)-$(VERSION).vmb
|
||||||
|
|
||||||
|
uninstall:
|
||||||
|
vim -N -i NONE -u NONE -c 'ru! plugin/vimballPlugin.vim' -c':RmVimball' -c':q!' $(PLUGIN)-$(VERSION).vmb
|
||||||
|
|
||||||
|
undo:
|
||||||
|
for i in */*.orig; do mv -f "$$i" "$${i%.*}"; done
|
||||||
|
|
||||||
|
README:
|
||||||
|
cp -f $(DOC) README
|
||||||
|
|
||||||
|
$(PLUGIN).vmb:
|
||||||
|
rm -f $(PLUGIN)-$(VERSION).vmb
|
||||||
|
vim -N -i NONE -u NONE -c 'ru! plugin/vimballPlugin.vim' -c ':call append("0", [ "$(SCRIPT)", "$(AUTOL)", "$(DOC)"])' -c '$$d' -c ":%MkVimball $(PLUGIN)-$(VERSION) ." -c':q!'
|
||||||
|
ln -f $(PLUGIN)-$(VERSION).vmb $(PLUGIN).vmb
|
||||||
|
|
||||||
|
release: version all README
|
||||||
|
|
||||||
|
test:
|
||||||
|
cd test && ./runtest.sh
|
||||||
|
|
||||||
|
version:
|
||||||
|
perl -i.orig -pne 'if (/Version:/) {s/\.(\d*)/sprintf(".%d", 1+$$1)/e}' ${SCRIPT} ${AUTOL}
|
||||||
|
perl -i -pne 'if (/GetLatestVimScripts:/) {s/(\d+)\s+:AutoInstall:/sprintf("%d :AutoInstall:", 1+$$1)/e}' ${SCRIPT} ${AUTOL}
|
||||||
|
#perl -i -pne 'if (/Last Change:/) {s/\d+\.\d+\.\d\+$$/sprintf("%s", `date -R`)/e}' ${SCRIPT}
|
||||||
|
perl -i -pne 'if (/Last Change:/) {s/(:\s+).*\n/sprintf(": %s", `date -R`)/e}' ${SCRIPT} ${AUTOL}
|
||||||
|
perl -i.orig -pne 'if (/Version:/) {s/\.(\d+).*\n/sprintf(".%d %s", 1+$$1, `date -R`)/e}' ${DOC}
|
||||||
|
VERSION=$(shell sed -n '/Version:/{s/^.*\(\S\.\S\+\)$$/\1/;p}' $(SCRIPT))
|
||||||
2463
config/neovim/store/lazy-plugins/NrrwRgn/NrrwRgn.vmb
Normal file
2463
config/neovim/store/lazy-plugins/NrrwRgn/NrrwRgn.vmb
Normal file
File diff suppressed because it is too large
Load Diff
60
config/neovim/store/lazy-plugins/NrrwRgn/README.md
Normal file
60
config/neovim/store/lazy-plugins/NrrwRgn/README.md
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
# NrrwRgn plugin [](https://saythanks.io/to/cb%40256bit.org)
|
||||||
|
|
||||||
|
> A Vim plugin for focussing on a selected region
|
||||||
|
|
||||||
|
This plugin is inspired by the [Narrowing feature of Emacs](http://www.emacswiki.org/emacs/Narrowing) and means to focus on a selected region while making the rest inaccessible. You simply select the region, call `:NR` and the selected part will open in a new split window while the rest of the buffer will be protected. Once you are finished, simply write the narrowed window (`:w`) and all the changes will be moved back to the original buffer.
|
||||||
|
|
||||||
|
See also the following screencast, that shows several features available:
|
||||||
|

|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
Use the plugin manager of your choice. Or download the [stable][] version of the plugin, edit it with Vim (`vim NrrwRgn-XXX.vmb`) and simply source it (`:so %`). Restart and take a look at the help (`:h NrrwRgn.txt`)
|
||||||
|
|
||||||
|
[stable]: http://www.vim.org/scripts/script.php?script_id=3075
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
Once installed, take a look at the help at `:h NarrowRegion`.
|
||||||
|
|
||||||
|
Here is a short overview of the functionality provided by the plugin:
|
||||||
|
|
||||||
|
### Ex commands:
|
||||||
|
|
||||||
|
:NR - Open the selected region in a new narrowed window
|
||||||
|
:NW - Open the current visual window in a new narrowed window
|
||||||
|
:WR - (In the narrowed window) write the changes back to the original buffer.
|
||||||
|
:NRV - Open the narrowed window for the region that was last visually selected.
|
||||||
|
:NUD - (In a unified diff) open the selected diff in 2 Narrowed windows
|
||||||
|
:NRP - Mark a region for a Multi narrowed window
|
||||||
|
:NRM - Create a new Multi narrowed window (after :NRP) - experimental!
|
||||||
|
:NRS - Enable Syncing the buffer content back (default on)
|
||||||
|
:NRN - Disable Syncing the buffer content back
|
||||||
|
:NRL - Reselect the last selected region and open it again in a narrowed window
|
||||||
|
|
||||||
|
You can append `!` to most commands to open the narrowed part in the current window instead of a new window. In the case of `:WR`, appending `!` closes the narrowed window in addition to writing to the original buffer.
|
||||||
|
|
||||||
|
### Visual mode commands:
|
||||||
|
|
||||||
|
<Leader>nr - Open the current visual selection in a new narrowed window
|
||||||
|
|
||||||
|
### Scripting Functions:
|
||||||
|
|
||||||
|
nrrwrgn#NrrwRgnStatus() - Return a dict with all the status information for the current window
|
||||||
|
|
||||||
|
### Attention
|
||||||
|
|
||||||
|
:NRM is currently experimental
|
||||||
|
|
||||||
|
## Similar Work
|
||||||
|
|
||||||
|
Andreas Politz' [narrow_region](http://www.vim.org/scripts/script.php?script_id=2038)<br/>
|
||||||
|
Kana Natsunos [narrow](http://www.vim.org/scripts/script.php?script_id=2097)<br/>
|
||||||
|
Jonas Kramers [narrow](http://www.vim.org/scripts/script.php?script_id=2446)<br/>
|
||||||
|
Marcin Szamotulskis [ViewPort](http://www.vim.org/scripts/script.php?script_id=4296)<br/>
|
||||||
|
|
||||||
|
## License & Copyright
|
||||||
|
|
||||||
|
© 2009-2014 by Christian Brabandt. The Vim License applies. See `:h license`
|
||||||
|
|
||||||
|
__NO WARRANTY, EXPRESS OR IMPLIED. USE AT-YOUR-OWN-RISK__
|
||||||
1637
config/neovim/store/lazy-plugins/NrrwRgn/autoload/nrrwrgn.vim
Executable file
1637
config/neovim/store/lazy-plugins/NrrwRgn/autoload/nrrwrgn.vim
Executable file
File diff suppressed because it is too large
Load Diff
818
config/neovim/store/lazy-plugins/NrrwRgn/doc/NarrowRegion.txt
Normal file
818
config/neovim/store/lazy-plugins/NrrwRgn/doc/NarrowRegion.txt
Normal file
@ -0,0 +1,818 @@
|
|||||||
|
*NrrwRgn.txt* A Narrow Region Plugin (similar to Emacs)
|
||||||
|
|
||||||
|
Author: Christian Brabandt <cb@256bit.org>
|
||||||
|
Version: 0.33 Thu, 15 Jan 2015 20:52:29 +0100
|
||||||
|
Copyright: (c) 2009-2015 by Christian Brabandt
|
||||||
|
The VIM LICENSE applies to NrrwRgnPlugin.vim and NrrwRgnPlugin.txt
|
||||||
|
(see |copyright|) except use NrrwRgnPlugin instead of "Vim".
|
||||||
|
NO WARRANTY, EXPRESS OR IMPLIED. USE AT-YOUR-OWN-RISK.
|
||||||
|
|
||||||
|
==============================================================================
|
||||||
|
1. Contents *NarrowRegion* *NrrwRgnPlugin*
|
||||||
|
|
||||||
|
1. Contents.....................................: |NrrwRgnPlugin|
|
||||||
|
2. NrrwRgn Manual...............................: |NrrwRgn-manual|
|
||||||
|
2.1 NrrwRgn Howto..............................: |NR-HowTo|
|
||||||
|
2.2 NrrwRgn Multi..............................: |NR-multi-example|
|
||||||
|
2.3 NrrwRgn Configuration......................: |NrrwRgn-config|
|
||||||
|
2.4 NrrwRgn public functions...................: |NrrwRgn-func|
|
||||||
|
3. NrrwRgn Tips.................................: |NrrwRgn-tips|
|
||||||
|
4. NrrwRgn Feedback.............................: |NrrwRgn-feedback|
|
||||||
|
5. NrrwRgn History..............................: |NrrwRgn-history|
|
||||||
|
|
||||||
|
==============================================================================
|
||||||
|
2. NrrwRgn Manual *NrrwRgn-manual*
|
||||||
|
|
||||||
|
Functionality
|
||||||
|
|
||||||
|
This plugin is based on a discussion in comp.editors (see the thread at
|
||||||
|
http://groups.google.com/group/comp.editors/browse_frm/thread/0f562d97f80dde13)
|
||||||
|
|
||||||
|
Narrowing means focussing on a region and making the rest inaccessible. You
|
||||||
|
simply select the region, call |:NarrowRegion| and the selected part will open
|
||||||
|
in a new scratch buffer. The rest of the file will be protected, so you won't
|
||||||
|
accidentally modify that buffer. In the new buffer, you can do a global
|
||||||
|
replace, search or anything else to modify that part. When you are finished,
|
||||||
|
simply write that buffer (e.g. by |:w|) and your modifications will be put in
|
||||||
|
the original buffer making it accessible again. Use |:q!| or |:bw!| to abort
|
||||||
|
your changes and return back to the original window.
|
||||||
|
|
||||||
|
NrrwRgn allows you to either select a line based selection using an Ex-command
|
||||||
|
or you can simply use any visual selected region and press your preferred key
|
||||||
|
combination to open that selection in a new buffer.
|
||||||
|
|
||||||
|
This plugin defines the following commands:
|
||||||
|
|
||||||
|
*:NarrowRegion* *:NR*
|
||||||
|
:[range]NR[!]
|
||||||
|
:[range]NarrowRegion[!] When [range] is omitted, select only the current
|
||||||
|
line, else use the lines in the range given and
|
||||||
|
open it in a new Scratch Window.
|
||||||
|
If the current line is selected and is on a folded
|
||||||
|
region, select the whole folded text.
|
||||||
|
Whenever you are finished modifying that region
|
||||||
|
simply write the buffer.
|
||||||
|
If ! is given, open the narrowed buffer not in a
|
||||||
|
split buffer but in the current window. However
|
||||||
|
when 'hidden' is not set, will open a new split
|
||||||
|
window.
|
||||||
|
|
||||||
|
*:NarrowWindow* *:NW*
|
||||||
|
:NW[!]
|
||||||
|
:NarrowWindow[!] Select only the range that is visible the current
|
||||||
|
window and open it in a new Scratch Window.
|
||||||
|
Whenever you are finished modifying that region
|
||||||
|
simply write the buffer.
|
||||||
|
If ! is given, open the narrowed buffer not in a
|
||||||
|
split buffer but in the current window (works best
|
||||||
|
with 'hidden' set).
|
||||||
|
|
||||||
|
*:WidenRegion* *:WR*
|
||||||
|
:WR[!]
|
||||||
|
:WidenRegion[!] This command is only available in the narrowed
|
||||||
|
scratch window. If the buffer has been modified,
|
||||||
|
the contents will be put back on the original
|
||||||
|
buffer. If ! is specified, the window will be
|
||||||
|
closed, otherwise it will remain open.
|
||||||
|
|
||||||
|
*:NRV*
|
||||||
|
:NRV[!] Opened the narrowed window for the region that was
|
||||||
|
last selected in visual mode
|
||||||
|
If ! is given, open the narrowed buffer not in a
|
||||||
|
split buffer but in the current window (works best
|
||||||
|
with 'hidden' set).
|
||||||
|
|
||||||
|
*:NUD*
|
||||||
|
|
||||||
|
:NUD When viewing unified diffs, this command opens
|
||||||
|
the current chunk in 2 Narrowed Windows in
|
||||||
|
|diff-mode| The current chunk is determined as the
|
||||||
|
one, that the cursor is at.
|
||||||
|
For filetypes other than diffs, it will try to
|
||||||
|
create a diff mode for a merge conflict.
|
||||||
|
|
||||||
|
*:NRPrepare*
|
||||||
|
:[range]NRPrepare[!]
|
||||||
|
:[range]NRP[!] You can use this command, to mark several lines
|
||||||
|
that will later be put into a Narrowed Window
|
||||||
|
using |:NRM|.
|
||||||
|
Using '!' clears the selection and does not add
|
||||||
|
any lines.
|
||||||
|
Use |:NRUnprepare| to remove a line again.
|
||||||
|
|
||||||
|
*:NRUnprepare*
|
||||||
|
:[range]NRUnprepare[!]
|
||||||
|
This command will remove the current line and
|
||||||
|
remove it from the lines marked for use with |:NRM|.
|
||||||
|
If the current line was not previously selected
|
||||||
|
for a multi narrowed window, it is ignored.
|
||||||
|
|
||||||
|
*:NRMulti*
|
||||||
|
:NRMulti
|
||||||
|
:NRM[!] This command takes all lines, that have been
|
||||||
|
marked by |:NRP| and puts them together in a new
|
||||||
|
narrowed buffer.
|
||||||
|
When you write your changes back, all separate
|
||||||
|
lines will be put back at their origin.
|
||||||
|
This command also clears the list of marked lines,
|
||||||
|
that was created with |NRP|.
|
||||||
|
See also |NR-multi-example|.
|
||||||
|
If ! is given, open the narrowed buffer not in a
|
||||||
|
split buffer but in the current window (works best
|
||||||
|
with 'hidden' set).
|
||||||
|
|
||||||
|
*:NRSyncOnWrite* *:NRS*
|
||||||
|
:NRSyncOnWrite
|
||||||
|
:NRS Enable synching the buffer content back to the
|
||||||
|
original buffer when writing.
|
||||||
|
(this is the default).
|
||||||
|
|
||||||
|
*:NRNoSyncOnWrite* *:NRN*
|
||||||
|
:NRNoSyncOnWrite
|
||||||
|
:NRN Disable synching the buffer content back to the
|
||||||
|
original buffer when writing. When set, the
|
||||||
|
narrowed buffer behaves like an ordinary buffer
|
||||||
|
that you can write in the filesystem.
|
||||||
|
Note: You can still use |:WidenRegion| to write
|
||||||
|
the changes back to the original buffer.
|
||||||
|
|
||||||
|
*:NRL*
|
||||||
|
|
||||||
|
:NRL[!] Reselect the last selected region again and open
|
||||||
|
in a narrowed window.
|
||||||
|
If ! is given, open the narrowed buffer not in a
|
||||||
|
split buffer but in the current window (works best
|
||||||
|
with 'hidden' set).
|
||||||
|
|
||||||
|
|
||||||
|
2.1 NrrwRgn HowTo *NR-HowTo*
|
||||||
|
-----------------
|
||||||
|
|
||||||
|
Use the commands provided above to select a certain region to narrow. You can
|
||||||
|
also start visual mode and have the selected region being narrowed. In this
|
||||||
|
mode, NarrowRegion allows you to block select |CTRL-V| , character select |v|
|
||||||
|
or linewise select |V| a region. Then press <Leader>nr where <Leader> by
|
||||||
|
default is set to '\', unless you have set it to something different (see
|
||||||
|
|<Leader>| for information how to change this) and the selected range will
|
||||||
|
open in a new scratch buffer. This key combination only works in |Visual-mode|
|
||||||
|
If instead of <Leader>nr you use <Leader>Nr in visual mode, the selection will
|
||||||
|
be opened in the current window, replacing the original buffer.
|
||||||
|
|
||||||
|
(Alternatively, you can use the normal mode mapping <Leader>nr and the region
|
||||||
|
over which you move will be opened in a new Narrowed window).
|
||||||
|
|
||||||
|
When finished, simply write that Narrowed Region window, from which you want
|
||||||
|
to take the modifications in your original file.
|
||||||
|
|
||||||
|
It is possible, to recursively open a Narrowed Window on top of an already
|
||||||
|
narrowed window. This sounds a little bit silly, but this makes it possible,
|
||||||
|
to have several narrowed windows, which you can use for several different
|
||||||
|
things, e.g. If you have 2 different buffers opened and you want to diff a
|
||||||
|
certain region of each of those 2 buffers, simply open a Narrowed Window for
|
||||||
|
each buffer, and execute |:diffthis| in each narrowed window.
|
||||||
|
|
||||||
|
You can then interactively merge those 2 windows. And when you are finished,
|
||||||
|
simply write the narrowed window and the changes will be taken back into the
|
||||||
|
original buffer.
|
||||||
|
|
||||||
|
When viewing unified diffs, you can use the provided |:NUD| command to open 2
|
||||||
|
Narrowed Windows side by side viewing the current chunk in |diff-mode|. Those
|
||||||
|
2 Narrowed windows will be marked 'modified', since there was some post
|
||||||
|
processing involved when opening the narrowed windows. Be careful, when
|
||||||
|
quitting the windows, not to write unwanted changes into your patch file! In
|
||||||
|
the window that contains the unified buffer, you can move to a different
|
||||||
|
chunk, run |:NUD| and the 2 Narrowed Windows in diff mode will update.
|
||||||
|
|
||||||
|
2.2 NrrwRgn Multi *NR-multi-example*
|
||||||
|
-----------------
|
||||||
|
|
||||||
|
Using the commands |:NRP| and |:NRM| allows to select a range of lines, that
|
||||||
|
will be put into a narrowed buffer together. This might sound confusing, but
|
||||||
|
this allows to apply a filter before making changes. For example before
|
||||||
|
editing your config file, you decide to strip all comments for making big
|
||||||
|
changes but when you write your changes back, these comments will stay in your
|
||||||
|
file. You would do it like this: >
|
||||||
|
:v/^#/NRP
|
||||||
|
:NRMulti
|
||||||
|
<
|
||||||
|
Now a Narrowed Window will open, that contains only the configuration lines.
|
||||||
|
Each block of independent region will be separated by a string like
|
||||||
|
|
||||||
|
# Start NarrowRegion1
|
||||||
|
.....
|
||||||
|
# End NarrowRegion1
|
||||||
|
|
||||||
|
This is needed, so the plugin later knows, which region belongs where in the
|
||||||
|
original place. Blocks you don't want to change, you can safely delete, they
|
||||||
|
won't be written back into your original file. But other than that, you
|
||||||
|
shouldn't change those separating lines.
|
||||||
|
|
||||||
|
When you are finished, simply write your changes back.
|
||||||
|
|
||||||
|
==============================================================================
|
||||||
|
|
||||||
|
2.3 NrrwRgn Configuration *NrrwRgn-config*
|
||||||
|
-------------------------
|
||||||
|
|
||||||
|
NarrowRegion can be customized by setting some global variables. If you'd
|
||||||
|
like to open the narrowed window as a vertical split buffer, simply set the
|
||||||
|
variable *g:nrrw_rgn_vert* to 1 in your |.vimrc| >
|
||||||
|
|
||||||
|
let g:nrrw_rgn_vert = 1
|
||||||
|
<
|
||||||
|
(default: 0)
|
||||||
|
------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
If you'd like to specify a certain width/height for you scratch buffer, then
|
||||||
|
set the variable *g:nrrw_rgn_wdth* in your |.vimrc| . This variable defines the
|
||||||
|
height or the nr of columns, if you have also set g:nrrw_rgn_vert. >
|
||||||
|
|
||||||
|
let g:nrrw_rgn_wdth = 30
|
||||||
|
<
|
||||||
|
(default: 20)
|
||||||
|
|
||||||
|
Note: if the newly created narrowed window is smaller than this, it will be
|
||||||
|
resized to fit (plus an additional padding that can be specified using the
|
||||||
|
g:nrrw_rgn_pad variable (default: 0), to not leave unwanted space around (not
|
||||||
|
for single narrowed windows, e.g. when the '!' attribute was used).
|
||||||
|
|
||||||
|
------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Resizing the narrowed window can happen either by some absolute values or by a
|
||||||
|
relative percentage. The variable *g:nrrw_rgn_resize_window* determines what
|
||||||
|
kind of resize will occur. If it is set to "absolute", the resizing will be
|
||||||
|
done by absolute lines or columns (depending on whether a horizontal or
|
||||||
|
vertical split has been done). If it is set to "relative" the window will be
|
||||||
|
resized by a percentage. Set it like this in your |.vimrc| >
|
||||||
|
|
||||||
|
let g:nrrw_rgn_resize_window = 'absolute'
|
||||||
|
<
|
||||||
|
(default: absolute)
|
||||||
|
|
||||||
|
The percentages for increasing the window size can further be specified by
|
||||||
|
seting the following variables:
|
||||||
|
|
||||||
|
default:
|
||||||
|
g:nrrw_rgn_rel_min: 10 (50 for vertical splits)
|
||||||
|
g:nrrw_rgn_rel_max: 80
|
||||||
|
|
||||||
|
------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
It is possible to specify an increment value, by which the narrowed window can
|
||||||
|
be increased. This is allows to easily toggle between the normal narrowed
|
||||||
|
window size and an even increased size (think of zooming).
|
||||||
|
|
||||||
|
You can either specify a relative or absolute zooming value. An absolute
|
||||||
|
resize will happen, if the variable |g:nrrw_rgn_resize_window| is set to
|
||||||
|
"absolute" or it is unset (see above).
|
||||||
|
|
||||||
|
If absolute resizing should happen you have to either specify columns, if the
|
||||||
|
Narrowed window is a vertical split window or lines, if a horizontal split has
|
||||||
|
been done.
|
||||||
|
|
||||||
|
Example, to increase the narrowed window by 30 lines or columns if
|
||||||
|
(g:nrrw_rgn_vert is also set [see above]), set in your |.vimrc| >
|
||||||
|
|
||||||
|
let g:nrrw_rgn_incr = 30
|
||||||
|
<
|
||||||
|
(default: 10, if |g:nrrw_rgn_resize_window| is "absolute")
|
||||||
|
|
||||||
|
Note: When using the '!' attribute for narrowing (e.g. the selection will be
|
||||||
|
opened in a new window that takes the complete screen size), no resizeing will
|
||||||
|
happen
|
||||||
|
------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
If you'd like to change the key combination that toggles incrementing the
|
||||||
|
Narrowed Window size, map *<Plug>NrrwrgnWinIncr* by putting this in your |.vimrc| >
|
||||||
|
|
||||||
|
nmap <F3> <Plug>NrrwrgnWinIncr
|
||||||
|
<
|
||||||
|
(default: <Leader><Space>)
|
||||||
|
|
||||||
|
This will let you use the <F3> key to toggle the window size of the Narrowed
|
||||||
|
Window. Note: This mapping is only in the narrowed window active.
|
||||||
|
|
||||||
|
The amount of how much to increase can be further refined by setting the
|
||||||
|
*g:nrrw_rgn_incr* for an absolute increase of by setting the variables
|
||||||
|
*g:nrrw_rgn_rel_min* and *g:nrrw_rgn_rel_max*
|
||||||
|
|
||||||
|
Whether an absolute or relative increase will be performed, is determined by
|
||||||
|
the |g:nrrw_rgn_resize_window| variable (see above).
|
||||||
|
------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
By default, NarrowRegion highlights the region that has been selected
|
||||||
|
using the WildMenu highlighting (see |hl-WildMenu|). If you'd like to use a
|
||||||
|
different highlighting, set the variable g:nrrw_rgn_hl to your preferred
|
||||||
|
highlighting Group. For example to have the region highlighted like a search
|
||||||
|
result, you could set *g:nrrw_rgn_hl* in your |.vimrc| >
|
||||||
|
|
||||||
|
let g:nrrw_rgn_hl = 'Search'
|
||||||
|
<
|
||||||
|
(default: WildMenu)
|
||||||
|
|
||||||
|
If you want to turn off the highlighting (because this can be distracting), you
|
||||||
|
can set the global variable *g:nrrw_rgn_nohl* to 1 in your |.vimrc| >
|
||||||
|
|
||||||
|
let g:nrrw_rgn_nohl = 1
|
||||||
|
<
|
||||||
|
(default: 0)
|
||||||
|
------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
If you'd like to change the key combination that starts the Narrowed Window
|
||||||
|
for your selected range, you could map *<Plug>NrrwrgnDo* in your |.vimrc| >
|
||||||
|
|
||||||
|
xmap <F3> <Plug>NrrwrgnDo
|
||||||
|
<
|
||||||
|
This will let <F3> open the Narrow-Window, but only if you have pressed it in
|
||||||
|
Visual Mode. It doesn't really make sense to map this combination to any other
|
||||||
|
mode, unless you want it to Narrow your last visually selected range.
|
||||||
|
|
||||||
|
(default: <Leader>nr)
|
||||||
|
------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
If you'd like to specify the options that you want to have set for the
|
||||||
|
narrowed window, you can set the *g:nrrw_custom_options* setting, in your
|
||||||
|
|.vimrc| e.g. >
|
||||||
|
|
||||||
|
let g:nrrw_custom_options={}
|
||||||
|
let g:nrrw_custom_options['filetype'] = 'python'
|
||||||
|
>
|
||||||
|
This will only apply those options to the narrowed buffer. You need to take
|
||||||
|
care that all options you need will apply.
|
||||||
|
|
||||||
|
------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
If you don't like that your narrowed window opens above the current window,
|
||||||
|
define the *g:nrrw_topbot_leftright* variable to your taste, e.g. >
|
||||||
|
|
||||||
|
let g:nrrw_topbot_leftright = 'botright'
|
||||||
|
<
|
||||||
|
Now, all narrowed windows will appear below the original window. If not
|
||||||
|
specified, the narrowed window will appear above/left of the original window.
|
||||||
|
|
||||||
|
(default: topleft)
|
||||||
|
------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
If you want to use several independent narrowed regions of the same buffer
|
||||||
|
that you want to write at the same time, protecting the original buffer is not
|
||||||
|
really useful. Therefore, set the *g:nrrw_rgn_protect* variable, e.g. in your
|
||||||
|
|.vimrc| >
|
||||||
|
|
||||||
|
let g:nrrw_rgn_protect = 'n'
|
||||||
|
<
|
||||||
|
This can be useful if you diff different regions of the same file, and want
|
||||||
|
to be able to put back the changes at different positions. Please note that
|
||||||
|
you should take care not to change any part that will later be influenced
|
||||||
|
when writing the narrowed region back.
|
||||||
|
|
||||||
|
Note: Don't use overlapping regions! Your changes will probably not be put
|
||||||
|
back correctly and there is no guard against losing data accidentally. NrrwRgn
|
||||||
|
tries hard to adjust the highlighting and regions as you write your changes
|
||||||
|
back into the original buffer, but it can't guarantee that this will work and
|
||||||
|
might fail silently. Therefore, this feature is experimental!
|
||||||
|
|
||||||
|
(default: y)
|
||||||
|
------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
If you are using the |:NRMulti| command and want to have the original window
|
||||||
|
update to the position of where the cursor is in the narrowed window, you can
|
||||||
|
set the variable *g:nrrw_rgn_update_orig_win,* e.g. in your |.vimrc| >
|
||||||
|
|
||||||
|
let g:nrrw_rgn_update_orig_win = 1
|
||||||
|
<
|
||||||
|
Now the cursor in the original window will always update when the position
|
||||||
|
changes in the narrowed window (using a |CursorMoved| autocommand).
|
||||||
|
Note: that this might slow down scrolling and cursor movement a bit.
|
||||||
|
|
||||||
|
(default: 0)
|
||||||
|
------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
By default, NarrowRegion plugin defines the two mappings <Leader>nr in visual
|
||||||
|
mode and normal mode and <Leader>Nr only in visual mode. If you have your own
|
||||||
|
mappings defined, than NarrowRegion will complain about the key already being
|
||||||
|
defined. Chances are, this will be quite annoying to you, so you can disable
|
||||||
|
mappings those keys by defining the variables *g:nrrw_rgn_nomap_nr* and
|
||||||
|
*g:nrrw_rgn_nomap_Nr* in your |.vimr| >
|
||||||
|
|
||||||
|
:let g:nrrw_rgn_nomap_nr = 1
|
||||||
|
:let g:nrrw_rgn_nomap_Nr = 1
|
||||||
|
|
||||||
|
(default: 0)
|
||||||
|
----------------------------------------------------------------------------
|
||||||
|
*NrrwRgn-hook* *NR-hooks*
|
||||||
|
|
||||||
|
NarrowRegion can execute certain commands, when creating the narrowed window
|
||||||
|
and when closing the narrowed window. For this, you can set 2 buffer-local
|
||||||
|
variables that specify what commands to execute, which will hook into the
|
||||||
|
execution of the Narrow Region plugin.
|
||||||
|
|
||||||
|
For example, suppose you have a file, containing columns separated data (CSV
|
||||||
|
format) which you want to modify and you also have the CSV filetype plugin
|
||||||
|
(http://www.vim.org/scripts/script.php?script_id=2830) installed and you want
|
||||||
|
to modify the CSV data which should be visually arranged like a table in the
|
||||||
|
narrowed window.
|
||||||
|
|
||||||
|
Therefore you want the command |:ArrangeColumn| to be executed in the new
|
||||||
|
narrowed window upon entering it, and when writing the changes back, you want
|
||||||
|
the command |:UnArrangeColumn| to be executed just before putting the
|
||||||
|
changes back. So you set the two variables *b:nrrw_aucmd_create* and
|
||||||
|
*b:nrrw_aucmd_close* in your original buffer: >
|
||||||
|
|
||||||
|
let b:nrrw_aucmd_create = "set ft=csv|%ArrangeCol"
|
||||||
|
let b:nrrw_aucmd_close = "%UnArrangeColumn"
|
||||||
|
<
|
||||||
|
This will execute the commands in the narrowed window: >
|
||||||
|
|
||||||
|
:set ft=csv
|
||||||
|
:%ArrangeCol
|
||||||
|
|
||||||
|
and before writing the changes back, it'll execute: >
|
||||||
|
|
||||||
|
:%UnArrangeCol
|
||||||
|
|
||||||
|
Note: These hooks are executed in the narrowed window (i.e. after creating the
|
||||||
|
narrowed window and its content and before writing the changes back to the
|
||||||
|
original buffer).
|
||||||
|
|
||||||
|
Additional hooks *b:nrrw_aucmd_writepost* and *b:nrrw_aucmd_written* are
|
||||||
|
provided, when the data is written back in the original window: the first one
|
||||||
|
is executed in the narrowed window, while the second one in the original one
|
||||||
|
(the one where the narrowed region was created from). For example, consider
|
||||||
|
you want the execute the command |:make| in the narrowed window, and also write
|
||||||
|
the original buffer, whenever the narrowed window is written back to the
|
||||||
|
original window. You therefore set: >
|
||||||
|
|
||||||
|
:let b:nrrw_aucmd_writepost = ':make'
|
||||||
|
:let b:nrrw_aucmd_written = ':update'
|
||||||
|
<
|
||||||
|
This will run |:make| in the narrowed window and also |:update| the original
|
||||||
|
buffer, whenever it was modified after writing the changes from the narrowed
|
||||||
|
window back.
|
||||||
|
|
||||||
|
2.4 NrrwRgn functions *NrrwRgn-func*
|
||||||
|
---------------------
|
||||||
|
The NrrwRgn plugin defines a public function in its namespace that can be used
|
||||||
|
to query its status.
|
||||||
|
*nrrwrgn#NrrwRgnStatus()*
|
||||||
|
nrrwrgn#NrrwRgnStatus()
|
||||||
|
Returns a dict with the following keys:
|
||||||
|
'shortname': The displayed buffer name
|
||||||
|
'fullname': The complete buffer name of the original buffer
|
||||||
|
'multi': 1 if it is a multi narrowed window (|:NRMulti|),
|
||||||
|
0 otherwise.
|
||||||
|
'startl': List of start lines for a multi narrowed window
|
||||||
|
(only present, if 'multi' is 1)
|
||||||
|
'endl': List of end lines for a multi narrowed window
|
||||||
|
(only present, if 'multi' is 1)
|
||||||
|
'start': Start position (only present if 'multi' is 0)
|
||||||
|
'end': End position (only present if 'multi' is 0)
|
||||||
|
'visual': Visual Mode, if it the narrowed window was started
|
||||||
|
from a visual selected region (empty otherwise).
|
||||||
|
'enabled': Whether syncing the buffer is enabled (|:NRS|)
|
||||||
|
|
||||||
|
If not executed in a narrowed window, returns an empty dict.
|
||||||
|
=============================================================================
|
||||||
|
3. NrrwRgn Tips *NrrwRgn-tips*
|
||||||
|
|
||||||
|
To have the filetype in the narrowed window set, you can use this function: >
|
||||||
|
|
||||||
|
command! -nargs=* -bang -range -complete=filetype NN
|
||||||
|
\ :<line1>,<line2> call nrrwrgn#NrrwRgn('',<q-bang>)
|
||||||
|
\ | set filetype=<args>
|
||||||
|
<
|
||||||
|
This lets you select a region, call :NN sql and the selected region will get
|
||||||
|
the sql filetype set.
|
||||||
|
|
||||||
|
(Contributed by @fourjay, thanks!)
|
||||||
|
|
||||||
|
=============================================================================
|
||||||
|
4. NrrwRgn Feedback *NrrwRgn-feedback*
|
||||||
|
|
||||||
|
Feedback is always welcome. If you like the plugin, please rate it at the
|
||||||
|
vim-page:
|
||||||
|
http://www.vim.org/scripts/script.php?script_id=3075
|
||||||
|
|
||||||
|
You can also follow the development of the plugin at github:
|
||||||
|
http://github.com/chrisbra/NrrwRgn
|
||||||
|
|
||||||
|
Please don't hesitate to report any bugs to the maintainer, mentioned in the
|
||||||
|
third line of this document.
|
||||||
|
|
||||||
|
If you like the plugin, write me an email (look in the third line for my mail
|
||||||
|
address). And if you are really happy, vote for the plugin and consider
|
||||||
|
looking at my Amazon whishlist: http://www.amazon.de/wishlist/2BKAHE8J7Z6UW
|
||||||
|
|
||||||
|
=============================================================================
|
||||||
|
5. NrrwRgn History *NrrwRgn-history*
|
||||||
|
|
||||||
|
0.34: (unreleased) {{{1
|
||||||
|
- merge Github Pull #34 (https://github.com/chrisbra/NrrwRgn/pull/34, by
|
||||||
|
Pyrohh, thanks!)
|
||||||
|
- resize narrowed window to actual size, this won't leave the a lot of
|
||||||
|
empty lines in the narrowed window.
|
||||||
|
- don't switch erroneously to the narrowed window on writing
|
||||||
|
(https://github.com/chrisbra/NrrwRgn/issues/35, reported by Yclept Nemo
|
||||||
|
thanks!)
|
||||||
|
- Always write the narrowed scratch window back on |:w| instead of only when
|
||||||
|
it was modified (https://github.com/chrisbra/NrrwRgn/issues/37, reported by
|
||||||
|
Konfekt, thanks!)
|
||||||
|
- Do not resize window, if :NR! was used (patch by leonidborisenko from
|
||||||
|
https://github.com/chrisbra/NrrwRgn/pull/38 thanks!)
|
||||||
|
- Various improvements for Window resizing, partly by Yclept Nemo, thanks!
|
||||||
|
- Fixed error for undefined function and cursor movement in wrong window
|
||||||
|
(issue https://github.com/chrisbra/NrrwRgn/issues/42 reported by adelarsq,
|
||||||
|
thanks!)
|
||||||
|
- Don't set the original buffer to be modified in single-window mode (issue
|
||||||
|
https://github.com/chrisbra/NrrwRgn/issues/43, reported by agguser, thanks!)
|
||||||
|
- Don't clean up on BufWinLeave autocommand, so that switching buffers will
|
||||||
|
not destroy the BufWriteCmd (issue https://github.com/chrisbra/NrrwRgn/issues/44,
|
||||||
|
reported by agguser, thanks!)
|
||||||
|
- remove highlighting after closing narrowed buffer
|
||||||
|
(also issue https://github.com/chrisbra/NrrwRgn/issues/45,
|
||||||
|
reported by Serabe, thanks!)
|
||||||
|
- do not map <Leader>nr and <Leader>Nr if g:nrrw_rgn_nomap_<key> is set
|
||||||
|
(issue https://github.com/chrisbra/NrrwRgn/issues/52, reported by
|
||||||
|
digitalronin, thanks!)
|
||||||
|
- correctly highlight in block-wise visual mode, if '$' has been pressed.
|
||||||
|
- do not set bufhidden=delete for single narrowed windows
|
||||||
|
https://github.com/chrisbra/NrrwRgn/issues/62
|
||||||
|
- Make :NUD able to handle git like merge conflicts
|
||||||
|
https://github.com/chrisbra/NrrwRgn/issues/68
|
||||||
|
- Correctly jump to the original window when closing
|
||||||
|
https://github.com/chrisbra/NrrwRgn/issues/70
|
||||||
|
- Allow to Unremove lines from |:NRP| command
|
||||||
|
https://github.com/chrisbra/NrrwRgn/issues/72
|
||||||
|
- Clarify documentation about |:NRP| command
|
||||||
|
https://github.com/chrisbra/NrrwRgn/issues/71
|
||||||
|
|
||||||
|
0.33: Jan 16, 2015 {{{1
|
||||||
|
- set local options later, so that FileType autocommands don't trigger to
|
||||||
|
early
|
||||||
|
- make sure, shortening the buffer name handles multibyte characters
|
||||||
|
correctly.
|
||||||
|
- new public function |nrrwrgn#NrrwRgnStatus()|
|
||||||
|
- <Leader>nr also mapped as operator function (so the region over which you
|
||||||
|
move will be opened in the narrowed window
|
||||||
|
- highlighting wrong when char-selecting within a line
|
||||||
|
- needs Vim 7.4
|
||||||
|
- mention how to abort the narrowed window (suggested by David Fishburn,
|
||||||
|
thanks!)
|
||||||
|
- Execute hooks after the options for the narrowed window have been set
|
||||||
|
(issue #29, reported by fmorales, thanks!)
|
||||||
|
- <Leader><Space> Toggles the Narrowed Window Size (idea by David Fishburn,
|
||||||
|
thanks!)
|
||||||
|
- New hook b:nrrw_aucmd_written, to be executed, whenever the narrowed info
|
||||||
|
has been written back into the original buffer.
|
||||||
|
- g:nrrw_rgn_write_on_sync is being deprecated in favor of using the newly
|
||||||
|
"written" hook
|
||||||
|
- error on writing back multi narrowed window (issue #30, reported by
|
||||||
|
aleprovencio https://github.com/chrisbra/NrrwRgn/issues/30, thanks!)
|
||||||
|
- document autoresize function (g:nrrw_rgn_autoresize_win)
|
||||||
|
- error when calling Incr Function, Make it override over global mapping.
|
||||||
|
(issue #31, reported by zc he https://github.com/chrisbra/NrrwRgn/issues/31, thanks!)
|
||||||
|
- |:NRP| didn't work as documented (reported by David Fishburn, thanks!)
|
||||||
|
- fix small syntax error in autoload file (issue #32, reported by itchyny
|
||||||
|
(https://github.com/chrisbra/NrrwRgn/issues/32, thanks!)
|
||||||
|
- check, that dict key is available before accessing it (issue #33, reported by SirCorion
|
||||||
|
(https://github.com/chrisbra/NrrwRgn/issues/33, thanks!)
|
||||||
|
|
||||||
|
0.32: Mar 27, 2014 {{{1
|
||||||
|
- hooks could corrupt the narrowed buffer, if it wasn't closed (reported by
|
||||||
|
jszakemeister https://github.com/chrisbra/NrrwRgn/issues/19, thanks!)
|
||||||
|
- Don't parse $VIMRUNTIME/doc/options.txt for finding out buffer-local options
|
||||||
|
(reported by AguirreIF https://github.com/chrisbra/NrrwRgn/issues/21,
|
||||||
|
thanks!), instead include a fix set of option names to set when opening the
|
||||||
|
narrowed buffer.
|
||||||
|
- Switching buffers in the original narrowed buffer, may confuse NrrwRgn.
|
||||||
|
- Code cleanup (no more separate functions for visual and normal mode)
|
||||||
|
- fix issue 22 (characterwise narrowing was brocken in last commit, reported
|
||||||
|
by Matthew Boehm in https://github.com/chrisbra/NrrwRgn/issues/22, thanks!)
|
||||||
|
- in characterwise visual selection, trailing \n is not stripped when writing
|
||||||
|
(reported by Matthew Boehm in https://github.com/chrisbra/NrrwRgn/23,
|
||||||
|
thanks!)
|
||||||
|
- highlighting was wrong for characterwise visual selections
|
||||||
|
- update original window for multi narrowed regions (
|
||||||
|
https://github.com/chrisbra/NrrwRgn/24, reported by Dane Summers, thanks!),
|
||||||
|
use the g:nrrw_rgn_update_orig_win variable to enable
|
||||||
|
- error when narrowed window was moved to new tab and trying to quit
|
||||||
|
(https://github.com/chrisbra/NrrwRgn/2, reported by Mario Ricalde, thanks!)
|
||||||
|
- better default names for the narrowed window
|
||||||
|
(https://github.com/chrisbra/Nrrwrgn/28, reported by Mario Ricalde, thanks!)
|
||||||
|
- when setting g:nrrw_rgn_write_on_sync the original file will be saved,
|
||||||
|
whenever the narrowed window is written back
|
||||||
|
(https://github.com/chrisbra/26, reported by Mario Ricalde, thanks!)
|
||||||
|
- Some more error handling when using |:WidenRegion|
|
||||||
|
- Make sure highlighting is removed when using |:WidenRegion|
|
||||||
|
|
||||||
|
0.31: Feb 16, 2013 {{{1
|
||||||
|
- NRM threw some errors (reported by pydave in
|
||||||
|
https://github.com/chrisbra/NrrwRgn/issues/17, thanks!)
|
||||||
|
- don't create swapfiles (reported by ping, thanks!)
|
||||||
|
|
||||||
|
0.30: Jan 25, 2013 {{{1
|
||||||
|
- |NRL| throws erros, when used without having first narrowed a region
|
||||||
|
- |NRV!| not allowed (reported by ping, thanks!)
|
||||||
|
- when using single window narrowing, :w would jump back to the original
|
||||||
|
window. Only do this, when 'hidden' is not set (reported by ping, thanks!)
|
||||||
|
- when narrowing a region, the last visual selected region wasn't correctly
|
||||||
|
restored (reported by ping, thanks!)
|
||||||
|
- some code cleanup
|
||||||
|
- recursive narrowing was broken, fix it (reported by ping, thanks!)
|
||||||
|
|
||||||
|
0.29: Aug 20, 2012 {{{1
|
||||||
|
- Use ! to have the narrowed buffer not opened in a new window (suggested by
|
||||||
|
Greg Sexton thanks!, issue #8
|
||||||
|
https://github.com/chrisbra/NrrwRgn/issues/8)
|
||||||
|
- Fix mappings for visual mode (https://github.com/chrisbra/NrrwRgn/issues/9,
|
||||||
|
reported by Sung Pae, thanks!)
|
||||||
|
- Fix problem with setting the filetype
|
||||||
|
(https://github.com/chrisbra/NrrwRgn/issues/10, reported by Hong Xu,
|
||||||
|
thanks!)
|
||||||
|
- Fix some minor problems, when using ! mode
|
||||||
|
0.28: Jun 03, 2012 {{{1
|
||||||
|
- Plugin did not store last narrowed region when narrowed window was moved to
|
||||||
|
another tabpage (reported by Ben Fritz, thanks!)
|
||||||
|
|
||||||
|
0.27: May 17, 2012 {{{1
|
||||||
|
- When using |:NR| on a line that is folded, include the whole folded region
|
||||||
|
in the Narrowed window.
|
||||||
|
- Better filetype detection for comments
|
||||||
|
- Error handling, when doing |:NRM| without doing |:NRP| first
|
||||||
|
- Use |:NRP!| to clear the old selection
|
||||||
|
- Don't load the autoload script when sourcing the plugin script
|
||||||
|
(reported by Sergey Khorev, thanks!)
|
||||||
|
- Vim 7.3.449 introduced E855, prevent this error.
|
||||||
|
- |:NRL|
|
||||||
|
- |NRM| did not correctly parse the list of lines provided by |:NRP|
|
||||||
|
- highlighted pattern for blockwise visual narrowed regions was wrong
|
||||||
|
- Saving blockwise visual selected regions back, could corrupt the contents
|
||||||
|
|
||||||
|
0.26: Jan 02, 2012 {{{1
|
||||||
|
|
||||||
|
- Fix issue https://github.com/chrisbra/NrrwRgn/issues/7
|
||||||
|
(reported by Alessio B., thanks!)
|
||||||
|
|
||||||
|
|
||||||
|
0.25: Nov 08, 2011 {{{1
|
||||||
|
|
||||||
|
- updated documentation (patch by Jean, thanks!)
|
||||||
|
- make it possible, to not sync the narrowed buffer back by disabling
|
||||||
|
it using |:NRSyncOnWrite| |:NRNoSyncOnWrite|
|
||||||
|
|
||||||
|
0.24: Oct 24, 2011 {{{1
|
||||||
|
|
||||||
|
- error on vim.org page, reuploaded version 0.22 as 0.24
|
||||||
|
|
||||||
|
0.23: Oct 24, 2011 {{{1
|
||||||
|
|
||||||
|
- (wrongly uploaded to vim.org)
|
||||||
|
|
||||||
|
0.22: Oct 24, 2011 {{{1
|
||||||
|
|
||||||
|
- Allow customization via the use of hooks (|NR-hooks|)
|
||||||
|
|
||||||
|
0.21: July 26, 2011 {{{1
|
||||||
|
|
||||||
|
- Fix undefined variable adjust_line_numbers
|
||||||
|
https://github.com/chrisbra/NrrwRgn/issues/5 (reported by jmcantrell,
|
||||||
|
thanks!)
|
||||||
|
|
||||||
|
0.20: July 25, 2011 {{{1
|
||||||
|
- allow customization via the g:nrrw_topbot_leftright variable (Thanks Herbert
|
||||||
|
Sitz!)
|
||||||
|
- allow what options will be applied using the g:nrrw_custom_options dict
|
||||||
|
(suggested by Herbert Sitz. Thanks!)
|
||||||
|
- NRV didn't hightlight the region that was selected (reported by Herbert
|
||||||
|
Sitz, thanks!)
|
||||||
|
- use the g:nrrw_rgn_protect variable, to prevent that the original buffer
|
||||||
|
will be protected. This is useful, if you narrow several regions of the same
|
||||||
|
buffer and want to write those changes indepentently (reported by kolyuchiy
|
||||||
|
in https://github.com/chrisbra/NrrwRgn/issues/3, Thanks!)
|
||||||
|
- fix an error with not correctly deleting the highlighted region, that was
|
||||||
|
discovered when reporting issue 3 (see above). (Reported by kolyuchiy,
|
||||||
|
thanks!)
|
||||||
|
- Catch errors, when setting window local options. (Patch by Sung Pae,
|
||||||
|
Thanks!)
|
||||||
|
|
||||||
|
0.19: May 22, 2011 {{{1
|
||||||
|
- fix issue 2 from github https://github.com/chrisbra/NrrwRgn/issues/2
|
||||||
|
(Widening does not work, if the narrowed windows have been moved to a new
|
||||||
|
tabspace). Reported by vanschelven, thanks!
|
||||||
|
|
||||||
|
0.18: December 10, 2010 {{{1
|
||||||
|
- experimental feature: Allow to Narrow several different regions at once
|
||||||
|
using :g/pattern/NRP and afterwards calling :NRM
|
||||||
|
(This only works linewise. Should that be made possible for any reagion?)
|
||||||
|
- disable folds, before writing changes back, otherwise chances are, you'll
|
||||||
|
lose more data then wanted
|
||||||
|
- code cleanup
|
||||||
|
|
||||||
|
0.17: November 23, 2010 {{{1
|
||||||
|
- cache the options, that will be set (instead of parsing
|
||||||
|
$VIMRUNTIME/doc/options.txt every time) in the Narrowed Window
|
||||||
|
- getting the options didn't work, when using an autocommand like this:
|
||||||
|
autocmd BufEnter * cd %:p:h
|
||||||
|
(reported by Xu Hong, Thanks!)
|
||||||
|
- :q didn't clean up the Narrowed Buffer correctly. Fix this
|
||||||
|
- some code cleanup
|
||||||
|
|
||||||
|
0.16: November 16, 2010 {{{1
|
||||||
|
- Bugfix: copy all local options to the narrowed window (reported by Xu Hong,
|
||||||
|
Thanks!)
|
||||||
|
|
||||||
|
0.15: August 26, 2010 {{{1
|
||||||
|
- Bugfix: minor documentation update (reported by Hong Xu, Thanks!)
|
||||||
|
|
||||||
|
0.14: August 26, 2010 {{{1
|
||||||
|
- Bugfix: :only in the original buffer resulted in errors (reported by Adam
|
||||||
|
Monsen, Thanks!)
|
||||||
|
|
||||||
|
0.13: August 22, 2010 {{{1
|
||||||
|
- Unified Diff Handling (experimental feature)
|
||||||
|
|
||||||
|
0.12: July 29, 2010 {{{1
|
||||||
|
|
||||||
|
- Version 0.11, wasn't packaged correctly and the vimball file
|
||||||
|
contained some garbage. (Thanks Dennis Hostetler!)
|
||||||
|
|
||||||
|
0.11: July 28, 2010 {{{1
|
||||||
|
|
||||||
|
- Don't set 'winfixwidth' and 'winfixheight' (suggested by Charles Campbell)
|
||||||
|
|
||||||
|
0.10: May 20, 2010 {{{1
|
||||||
|
|
||||||
|
- Restore cursor position using winrestview() and winsaveview()
|
||||||
|
- fix a bug, that prevented the use of visual narrowing
|
||||||
|
- Make sure when closing the narrowed buffer, the content will be written to
|
||||||
|
the right original region
|
||||||
|
- use topleft for opening the Narrowed window
|
||||||
|
- check, that the original buffer is still available
|
||||||
|
- If you Narrow the complete buffer using :NRV and write the changes back, an
|
||||||
|
additional trailing line is inserted. Remove that line.
|
||||||
|
- When writing the changes back, update the highlighting.
|
||||||
|
|
||||||
|
0.9: May 20, 2010 {{{1
|
||||||
|
|
||||||
|
- It is now possible to Narrow a window recursively. This allows to have
|
||||||
|
several narrowed windows, and allows for example to only diff certain
|
||||||
|
regions (as was suggested in a recent thread at the vim_use mailinglist:
|
||||||
|
http://groups.google.com/group/vim_use/msg/05d7fd9bd1556f0e) therefore, the
|
||||||
|
use for the g:nrrw_rgn_sepwin variable isn't necessary anymore.
|
||||||
|
- Small documentation updates
|
||||||
|
|
||||||
|
0.8: May 18, 2010 {{{1
|
||||||
|
|
||||||
|
- the g:nrrw_rgn_sepwin variable can be used to force separate Narrowed
|
||||||
|
Windows, so you could easily diff those windows.
|
||||||
|
- make the separating of several windows a little bit safer (look at the
|
||||||
|
bufnr(), so it should work without problems for several buffers)
|
||||||
|
- switch from script local variables to buffer local variables, so narrowing
|
||||||
|
for several buffers should work.
|
||||||
|
- set 'winfixheight' for narrowed window
|
||||||
|
- Added command :NRV (suggested by Charles Campbell, thanks!)
|
||||||
|
- added error handling, in case :NRV is called, without a selected region
|
||||||
|
- take care of beeps, when calling :NRV
|
||||||
|
- output WarningMsg
|
||||||
|
|
||||||
|
0.7: May 17, 2010 {{{1
|
||||||
|
|
||||||
|
- really use the black hole register for deleting the old buffer contents in
|
||||||
|
the narrowed buffer (suggestion by esquifit in
|
||||||
|
http://groups.google.com/group/comp.editors/msg/3eb3e3a7c68597db)
|
||||||
|
- make autocommand nesting, so the highlighting will be removed when writing
|
||||||
|
the buffer contents.
|
||||||
|
- Use g:nrrw_rgn_nohl variable to disable highlighting (as this can be
|
||||||
|
disturbing).
|
||||||
|
|
||||||
|
0.6: May 04, 2010 {{{1
|
||||||
|
|
||||||
|
- the previous version had problems restoring the orig buffer, this version
|
||||||
|
fixes it (highlighting and setl ma did not work correctly)
|
||||||
|
|
||||||
|
0.5: May 04, 2010 {{{1
|
||||||
|
|
||||||
|
- The mapping that allows for narrowing a visually selected range, did not
|
||||||
|
work. (Fixed!)
|
||||||
|
- Make :WidenRegion work as expected (close the widened window) (unreleased)
|
||||||
|
|
||||||
|
0.4: Apr 28, 2010 {{{1
|
||||||
|
|
||||||
|
- Highlight narrowed region in the original buffer
|
||||||
|
- Save and Restore search-register
|
||||||
|
- Provide shortcut commands |:NR|
|
||||||
|
- Provide command |:NW| and |:NarrowWindow|
|
||||||
|
- Make plugin autoloadable
|
||||||
|
- Enable GLVS (see |:GLVS|)
|
||||||
|
- Provide Documenation (:h NarrowRegion)
|
||||||
|
- Distribute Plugin as vimball |pi_vimball.txt|
|
||||||
|
|
||||||
|
0.3: Apr 28, 2010 {{{1
|
||||||
|
|
||||||
|
- Initial upload
|
||||||
|
- development versions are available at the github repository
|
||||||
|
- put plugin on a public repository (http://github.com/chrisbra/NrrwRgn)
|
||||||
|
|
||||||
|
}}}
|
||||||
|
==============================================================================
|
||||||
|
Modeline:
|
||||||
|
vim:tw=78:ts=8:ft=help:et:fdm=marker:fdl=0:norl
|
||||||
50
config/neovim/store/lazy-plugins/NrrwRgn/doc/tags
Normal file
50
config/neovim/store/lazy-plugins/NrrwRgn/doc/tags
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
:NR NarrowRegion.txt /*:NR*
|
||||||
|
:NRL NarrowRegion.txt /*:NRL*
|
||||||
|
:NRMulti NarrowRegion.txt /*:NRMulti*
|
||||||
|
:NRN NarrowRegion.txt /*:NRN*
|
||||||
|
:NRNoSyncOnWrite NarrowRegion.txt /*:NRNoSyncOnWrite*
|
||||||
|
:NRPrepare NarrowRegion.txt /*:NRPrepare*
|
||||||
|
:NRS NarrowRegion.txt /*:NRS*
|
||||||
|
:NRSyncOnWrite NarrowRegion.txt /*:NRSyncOnWrite*
|
||||||
|
:NRUnprepare NarrowRegion.txt /*:NRUnprepare*
|
||||||
|
:NRV NarrowRegion.txt /*:NRV*
|
||||||
|
:NUD NarrowRegion.txt /*:NUD*
|
||||||
|
:NW NarrowRegion.txt /*:NW*
|
||||||
|
:NarrowRegion NarrowRegion.txt /*:NarrowRegion*
|
||||||
|
:NarrowWindow NarrowRegion.txt /*:NarrowWindow*
|
||||||
|
:WR NarrowRegion.txt /*:WR*
|
||||||
|
:WidenRegion NarrowRegion.txt /*:WidenRegion*
|
||||||
|
<Plug>NrrwrgnDo NarrowRegion.txt /*<Plug>NrrwrgnDo*
|
||||||
|
<Plug>NrrwrgnWinIncr NarrowRegion.txt /*<Plug>NrrwrgnWinIncr*
|
||||||
|
NR-HowTo NarrowRegion.txt /*NR-HowTo*
|
||||||
|
NR-hooks NarrowRegion.txt /*NR-hooks*
|
||||||
|
NR-multi-example NarrowRegion.txt /*NR-multi-example*
|
||||||
|
NarrowRegion NarrowRegion.txt /*NarrowRegion*
|
||||||
|
NrrwRgn-config NarrowRegion.txt /*NrrwRgn-config*
|
||||||
|
NrrwRgn-feedback NarrowRegion.txt /*NrrwRgn-feedback*
|
||||||
|
NrrwRgn-func NarrowRegion.txt /*NrrwRgn-func*
|
||||||
|
NrrwRgn-history NarrowRegion.txt /*NrrwRgn-history*
|
||||||
|
NrrwRgn-hook NarrowRegion.txt /*NrrwRgn-hook*
|
||||||
|
NrrwRgn-manual NarrowRegion.txt /*NrrwRgn-manual*
|
||||||
|
NrrwRgn-tips NarrowRegion.txt /*NrrwRgn-tips*
|
||||||
|
NrrwRgn.txt NarrowRegion.txt /*NrrwRgn.txt*
|
||||||
|
NrrwRgnPlugin NarrowRegion.txt /*NrrwRgnPlugin*
|
||||||
|
b:nrrw_aucmd_close NarrowRegion.txt /*b:nrrw_aucmd_close*
|
||||||
|
b:nrrw_aucmd_create NarrowRegion.txt /*b:nrrw_aucmd_create*
|
||||||
|
b:nrrw_aucmd_writepost NarrowRegion.txt /*b:nrrw_aucmd_writepost*
|
||||||
|
b:nrrw_aucmd_written NarrowRegion.txt /*b:nrrw_aucmd_written*
|
||||||
|
g:nrrw_custom_options NarrowRegion.txt /*g:nrrw_custom_options*
|
||||||
|
g:nrrw_rgn_hl NarrowRegion.txt /*g:nrrw_rgn_hl*
|
||||||
|
g:nrrw_rgn_incr NarrowRegion.txt /*g:nrrw_rgn_incr*
|
||||||
|
g:nrrw_rgn_nohl NarrowRegion.txt /*g:nrrw_rgn_nohl*
|
||||||
|
g:nrrw_rgn_nomap_Nr NarrowRegion.txt /*g:nrrw_rgn_nomap_Nr*
|
||||||
|
g:nrrw_rgn_nomap_nr NarrowRegion.txt /*g:nrrw_rgn_nomap_nr*
|
||||||
|
g:nrrw_rgn_protect NarrowRegion.txt /*g:nrrw_rgn_protect*
|
||||||
|
g:nrrw_rgn_rel_max NarrowRegion.txt /*g:nrrw_rgn_rel_max*
|
||||||
|
g:nrrw_rgn_rel_min NarrowRegion.txt /*g:nrrw_rgn_rel_min*
|
||||||
|
g:nrrw_rgn_resize_window NarrowRegion.txt /*g:nrrw_rgn_resize_window*
|
||||||
|
g:nrrw_rgn_update_orig_win, NarrowRegion.txt /*g:nrrw_rgn_update_orig_win,*
|
||||||
|
g:nrrw_rgn_vert NarrowRegion.txt /*g:nrrw_rgn_vert*
|
||||||
|
g:nrrw_rgn_wdth NarrowRegion.txt /*g:nrrw_rgn_wdth*
|
||||||
|
g:nrrw_topbot_leftright NarrowRegion.txt /*g:nrrw_topbot_leftright*
|
||||||
|
nrrwrgn#NrrwRgnStatus() NarrowRegion.txt /*nrrwrgn#NrrwRgnStatus()*
|
||||||
91
config/neovim/store/lazy-plugins/NrrwRgn/plugin/NrrwRgn.vim
Normal file
91
config/neovim/store/lazy-plugins/NrrwRgn/plugin/NrrwRgn.vim
Normal file
@ -0,0 +1,91 @@
|
|||||||
|
" NrrwRgn.vim - Narrow Region plugin for Vim
|
||||||
|
" -------------------------------------------------------------
|
||||||
|
" Version: 0.33
|
||||||
|
" Maintainer: Christian Brabandt <cb@256bit.org>
|
||||||
|
" Last Change: Thu, 15 Jan 2015 20:52:29 +0100
|
||||||
|
" Script: http://www.vim.org/scripts/script.php?script_id=3075
|
||||||
|
" Copyright: (c) 2009-2015 by Christian Brabandt
|
||||||
|
" The VIM LICENSE applies to NrrwRgn.vim
|
||||||
|
" (see |copyright|) except use "NrrwRgn.vim"
|
||||||
|
" instead of "Vim".
|
||||||
|
" No warranty, express or implied.
|
||||||
|
" *** *** Use At-Your-Own-Risk! *** ***
|
||||||
|
" GetLatestVimScripts: 3075 33 :AutoInstall: NrrwRgn.vim
|
||||||
|
"
|
||||||
|
" Init: {{{1
|
||||||
|
let s:cpo= &cpo
|
||||||
|
if exists("g:loaded_nrrw_rgn") || &cp
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
set cpo&vim
|
||||||
|
let g:loaded_nrrw_rgn = 1
|
||||||
|
|
||||||
|
" Debug Setting
|
||||||
|
let s:debug=0
|
||||||
|
if s:debug
|
||||||
|
exe "call nrrwrgn#Debug(1)"
|
||||||
|
endif
|
||||||
|
|
||||||
|
" ----------------------------------------------------------------------------
|
||||||
|
" Public Interface: {{{1
|
||||||
|
|
||||||
|
" plugin functions "{{{2
|
||||||
|
fun! <sid>NrrwRgnOp(type, ...) " {{{3
|
||||||
|
" used for operator function mapping
|
||||||
|
let sel_save = &selection
|
||||||
|
let &selection = "inclusive"
|
||||||
|
if a:0 " Invoked from Visual mode, use '< and '> marks.
|
||||||
|
sil exe "normal! `<" . a:type . "`>y"
|
||||||
|
elseif a:type == 'line'
|
||||||
|
sil exe "normal! '[V']y"
|
||||||
|
elseif a:type == 'block'
|
||||||
|
sil exe "normal! `[\<C-V>`]y"
|
||||||
|
else
|
||||||
|
sil exe "normal! `[v`]y"
|
||||||
|
endif
|
||||||
|
call nrrwrgn#NrrwRgn(visualmode(), '')
|
||||||
|
let &selection = sel_save
|
||||||
|
endfu
|
||||||
|
|
||||||
|
" Define the Command aliases "{{{2
|
||||||
|
com! -range -bang NRPrepare :<line1>,<line2>NRP<bang>
|
||||||
|
com! -bang -range NarrowRegion :<line1>,<line2>NR
|
||||||
|
com! -bang NRMulti :NRM<bang>
|
||||||
|
com! -bang NarrowWindow :NW
|
||||||
|
com! -bang NRLast :NRL
|
||||||
|
|
||||||
|
" Define the actual Commands "{{{2
|
||||||
|
com! -range -bang NR :<line1>, <line2>call nrrwrgn#NrrwRgn('',<q-bang>)
|
||||||
|
com! -range -bang NRP :<line1>, <line2>call nrrwrgn#Prepare(<q-bang>)
|
||||||
|
com! -bang -range NRV :call nrrwrgn#NrrwRgn(visualmode(), <q-bang>)
|
||||||
|
com! -range NRUnprepare :<line1>, <line2>call nrrwrgn#Unprepare()
|
||||||
|
com! NUD :call nrrwrgn#UnifiedDiff()
|
||||||
|
com! -bang NW :exe ":" . line('w0') . ',' . line('w$') . "call nrrwrgn#NrrwRgn(0,<q-bang>)"
|
||||||
|
com! -bang NRM :call nrrwrgn#NrrwRgnDoMulti(<q-bang>)
|
||||||
|
com! -bang NRL :call nrrwrgn#LastNrrwRgn(<q-bang>)
|
||||||
|
|
||||||
|
" Define the Mapping: "{{{2
|
||||||
|
if !hasmapto('<Plug>NrrwrgnDo') && !get(g:, 'nrrw_rgn_nomap_nr', 0)
|
||||||
|
xmap <unique> <Leader>nr <Plug>NrrwrgnDo
|
||||||
|
nmap <unique> <Leader>nr <Plug>NrrwrgnDo
|
||||||
|
endif
|
||||||
|
if !hasmapto('<Plug>NrrwrgnBangDo') && !get(g:, 'nrrw_rgn_nomap_Nr', 0)
|
||||||
|
xmap <unique> <Leader>Nr <Plug>NrrwrgnBangDo
|
||||||
|
endif
|
||||||
|
if !hasmapto('VisualNrrwRgn')
|
||||||
|
xnoremap <unique> <script> <Plug>NrrwrgnDo <sid>VisualNrrwRgn
|
||||||
|
nnoremap <unique> <script> <Plug>NrrwrgnDo <sid>VisualNrrwRgn
|
||||||
|
endif
|
||||||
|
if !hasmapto('VisualNrrwRgnBang')
|
||||||
|
xnoremap <unique> <script> <Plug>NrrwrgnBangDo <sid>VisualNrrwBang
|
||||||
|
endif
|
||||||
|
xnoremap <sid>VisualNrrwRgn :<c-u>call nrrwrgn#NrrwRgn(visualmode(),'')<cr>
|
||||||
|
xnoremap <sid>VisualNrrwBang :<c-u>call nrrwrgn#NrrwRgn(visualmode(),'!')<cr>
|
||||||
|
|
||||||
|
" operator function
|
||||||
|
nnoremap <sid>VisualNrrwRgn :set opfunc=<sid>NrrwRgnOp<cr>g@
|
||||||
|
|
||||||
|
" Restore: "{{{1
|
||||||
|
let &cpo=s:cpo
|
||||||
|
unlet s:cpo
|
||||||
|
" vim: ts=4 sts=4 fdm=marker com+=l\:\"
|
||||||
58
config/neovim/store/lazy-plugins/NrrwRgn/post.pl
Executable file
58
config/neovim/store/lazy-plugins/NrrwRgn/post.pl
Executable file
@ -0,0 +1,58 @@
|
|||||||
|
#!/usr/bin/perl
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
|
||||||
|
use WWW::Mechanize;
|
||||||
|
|
||||||
|
sub GetPassword() {
|
||||||
|
my $i=0;
|
||||||
|
my @pass;
|
||||||
|
my $passfile="./vim_passfile"; # line1: username, line2: password
|
||||||
|
open(PASS, '<',$passfile) or die "Can't open passwordfile: $passfile\n";
|
||||||
|
while(<PASS>){
|
||||||
|
chomp;
|
||||||
|
$pass[$i++] = $_;
|
||||||
|
}
|
||||||
|
close(PASS);
|
||||||
|
return @pass;
|
||||||
|
}
|
||||||
|
|
||||||
|
my $sid=3075;
|
||||||
|
my $file;
|
||||||
|
my @files=glob('*.vmb');
|
||||||
|
#my $scriptversion=shift @ARGV;
|
||||||
|
my $scriptversion = 0;
|
||||||
|
my $versioncomment=shift @ARGV;
|
||||||
|
unless ($versioncomment){
|
||||||
|
print "Please enter comment!\n";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
$versioncomment.="\n(automatically uploaded)";
|
||||||
|
|
||||||
|
|
||||||
|
my @userpasswordpair = GetPassword();
|
||||||
|
for (@files) {
|
||||||
|
my $f = $_ if [ -f $_ ] && $_ =~ /\w+-[^.]+\.(\d+)\.vmb/;
|
||||||
|
if ($1 > $scriptversion) {
|
||||||
|
$scriptversion=$1;
|
||||||
|
$file = $f;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
my $mech=WWW::Mechanize->new(autocheck => 1);
|
||||||
|
$mech->get("http://www.vim.org/login.php");
|
||||||
|
$mech->submit_form(
|
||||||
|
form_name => "login",
|
||||||
|
with_fields => {
|
||||||
|
userName => $userpasswordpair[0],
|
||||||
|
password => $userpasswordpair[1],
|
||||||
|
},
|
||||||
|
);
|
||||||
|
$mech->get("http://www.vim.org/scripts/script.php?script_id=$sid");
|
||||||
|
$mech->follow_link(text => 'upload new version');
|
||||||
|
$mech->form_name("script");
|
||||||
|
$mech->field(script_file => $file);
|
||||||
|
$mech->field(vim_version => 7.4);
|
||||||
|
$mech->field(script_version => $scriptversion);
|
||||||
|
$mech->field(version_comment => $versioncomment);
|
||||||
|
$mech->click_button(value => "upload");
|
||||||
BIN
config/neovim/store/lazy-plugins/NrrwRgn/screencast.gif
Normal file
BIN
config/neovim/store/lazy-plugins/NrrwRgn/screencast.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 402 KiB |
8
config/neovim/store/lazy-plugins/NrrwRgn/test/runtest.sh
Executable file
8
config/neovim/store/lazy-plugins/NrrwRgn/test/runtest.sh
Executable file
@ -0,0 +1,8 @@
|
|||||||
|
#!/nix/store/izpf49b74i15pcr9708s3xdwyqs4jxwl-bash-5.2p32/bin/sh
|
||||||
|
|
||||||
|
for i in */; do
|
||||||
|
cd "$i"
|
||||||
|
./cmd.sh
|
||||||
|
rm -f *.mod
|
||||||
|
cd - > /dev/null
|
||||||
|
done
|
||||||
@ -0,0 +1 @@
|
|||||||
|
foobar 1.txt
|
||||||
@ -0,0 +1 @@
|
|||||||
|
foobar 1.txt some more stuff
|
||||||
@ -0,0 +1 @@
|
|||||||
|
foobar 2.txt
|
||||||
@ -0,0 +1 @@
|
|||||||
|
foobar 2.txt some more stuff
|
||||||
@ -0,0 +1 @@
|
|||||||
|
foobar 3.txt
|
||||||
@ -0,0 +1 @@
|
|||||||
|
foobar 3.txt some more stuff
|
||||||
23
config/neovim/store/lazy-plugins/NrrwRgn/test/test1/cmd.sh
Executable file
23
config/neovim/store/lazy-plugins/NrrwRgn/test/test1/cmd.sh
Executable file
@ -0,0 +1,23 @@
|
|||||||
|
#!/nix/store/izpf49b74i15pcr9708s3xdwyqs4jxwl-bash-5.2p32/bin/bash
|
||||||
|
#set -x
|
||||||
|
|
||||||
|
dir="$(realpath ../..)"
|
||||||
|
LC_ALL=C vim -u NONE -N \
|
||||||
|
--cmd ':set noswapfile hidden' \
|
||||||
|
--cmd 'argadd *.txt' \
|
||||||
|
-c "sil :so $dir/plugin/NrrwRgn.vim" \
|
||||||
|
-c 'sil :bufdo :NRP' \
|
||||||
|
-c 'sil :NRM' \
|
||||||
|
-c 'sil :g/^foobar.*/s//& some more stuff/' \
|
||||||
|
-c 'sil :wq' \
|
||||||
|
-c ':bufdo if bufname("")=~"^\\d\\.txt$"|saveas! %.mod|endif' \
|
||||||
|
-c ':qa!'
|
||||||
|
|
||||||
|
rt=$(diff -uN0 <(cat *.mod) <(cat *.ok))
|
||||||
|
if [ "$?" -ne 0 ]; then
|
||||||
|
printf "Test1 failed\n"
|
||||||
|
printf "Diff:\n%s" "$rt"
|
||||||
|
exit 2;
|
||||||
|
else
|
||||||
|
printf "Test1 successful!\n"
|
||||||
|
fi
|
||||||
@ -0,0 +1 @@
|
|||||||
|
## Test 1: Multi Narrowed Window for several distinct buffers ##
|
||||||
@ -0,0 +1,4 @@
|
|||||||
|
This is a single test.
|
||||||
|
Line 2
|
||||||
|
Line 3
|
||||||
|
Line 4
|
||||||
@ -0,0 +1,6 @@
|
|||||||
|
This is a single test.
|
||||||
|
Line 2
|
||||||
|
Line 3
|
||||||
|
Line 4
|
||||||
|
Added Line
|
||||||
|
Added after Narrowing Line
|
||||||
24
config/neovim/store/lazy-plugins/NrrwRgn/test/test2/cmd.sh
Executable file
24
config/neovim/store/lazy-plugins/NrrwRgn/test/test2/cmd.sh
Executable file
@ -0,0 +1,24 @@
|
|||||||
|
#!/nix/store/izpf49b74i15pcr9708s3xdwyqs4jxwl-bash-5.2p32/bin/bash
|
||||||
|
#set -x
|
||||||
|
|
||||||
|
Test="Test2"
|
||||||
|
|
||||||
|
dir="$(realpath ../..)"
|
||||||
|
LC_ALL=C vim -u NONE -N \
|
||||||
|
--cmd ':set noswapfile hidden' \
|
||||||
|
-c "sil :so $dir/plugin/NrrwRgn.vim" \
|
||||||
|
-c 'sil :1,$NR' \
|
||||||
|
-c 'sil :$put =\"Added Line\"' \
|
||||||
|
-c 'sil :wq' \
|
||||||
|
-c 'sil :$put =\"Added after Narrowing Line\"' \
|
||||||
|
-c ':bufdo if bufname("")=~"^\\d\\.txt$"|saveas! %.mod|endif' \
|
||||||
|
-c ':qa!' 1.txt
|
||||||
|
|
||||||
|
rt=$(diff -uN0 <(cat *.mod) <(cat *.ok))
|
||||||
|
if [ "$?" -ne 0 ]; then
|
||||||
|
printf "$Test failed\n"
|
||||||
|
printf "Diff:\n%s" "$rt"
|
||||||
|
exit 2;
|
||||||
|
else
|
||||||
|
printf "$Test successful!\n"
|
||||||
|
fi
|
||||||
@ -0,0 +1 @@
|
|||||||
|
## Test 2: Single Narrowed Window for a single buffers ##
|
||||||
@ -0,0 +1,4 @@
|
|||||||
|
This is a single test.
|
||||||
|
Line 2
|
||||||
|
Line 3
|
||||||
|
Line 4
|
||||||
@ -0,0 +1,6 @@
|
|||||||
|
This is a single test.
|
||||||
|
Line 2
|
||||||
|
Line 3
|
||||||
|
Line 4
|
||||||
|
Added Line
|
||||||
|
Added after Narrowing Line
|
||||||
26
config/neovim/store/lazy-plugins/NrrwRgn/test/test3/cmd.sh
Executable file
26
config/neovim/store/lazy-plugins/NrrwRgn/test/test3/cmd.sh
Executable file
@ -0,0 +1,26 @@
|
|||||||
|
#!/nix/store/izpf49b74i15pcr9708s3xdwyqs4jxwl-bash-5.2p32/bin/bash
|
||||||
|
#set -x
|
||||||
|
|
||||||
|
Test="Test3"
|
||||||
|
|
||||||
|
dir="$(realpath ../..)"
|
||||||
|
LC_ALL=C vim -u NONE -N \
|
||||||
|
--cmd ':set noswapfile hidden' \
|
||||||
|
-c "sil :so $dir/plugin/NrrwRgn.vim" \
|
||||||
|
-c 'sp description.md | noa wincmd p | :e 1.txt' \
|
||||||
|
-c 'sil :1,$NR' \
|
||||||
|
-c 'sil :$put =\"Added Line\"' \
|
||||||
|
-c 'sil :wq' \
|
||||||
|
-c '2wincmd w' \
|
||||||
|
-c 'sil :$put =\"Added after Narrowing Line\"' \
|
||||||
|
-c ':bufdo if bufname("")=~"^\\d\\.txt$"|saveas! %.mod|endif' \
|
||||||
|
-c ':qa!'
|
||||||
|
|
||||||
|
rt=$(diff -uN0 <(cat *.mod) <(cat *.ok))
|
||||||
|
if [ "$?" -ne 0 ]; then
|
||||||
|
printf "$Test failed\n"
|
||||||
|
printf "Diff:\n%s" "$rt"
|
||||||
|
exit 2;
|
||||||
|
else
|
||||||
|
printf "$Test successful!\n"
|
||||||
|
fi
|
||||||
@ -0,0 +1 @@
|
|||||||
|
## Test 2: Single Narrowed Window for a single buffer, but has another split window ##
|
||||||
@ -0,0 +1,4 @@
|
|||||||
|
This is a single test.
|
||||||
|
Line 2
|
||||||
|
Line 3
|
||||||
|
Line 4
|
||||||
@ -0,0 +1,6 @@
|
|||||||
|
This is a single test.
|
||||||
|
Line 2
|
||||||
|
Line 3
|
||||||
|
Line 4
|
||||||
|
Added Line
|
||||||
|
Added another Line
|
||||||
26
config/neovim/store/lazy-plugins/NrrwRgn/test/test4/cmd.sh
Executable file
26
config/neovim/store/lazy-plugins/NrrwRgn/test/test4/cmd.sh
Executable file
@ -0,0 +1,26 @@
|
|||||||
|
#!/nix/store/izpf49b74i15pcr9708s3xdwyqs4jxwl-bash-5.2p32/bin/bash
|
||||||
|
#set -x
|
||||||
|
|
||||||
|
Test="Test4"
|
||||||
|
|
||||||
|
dir="$(realpath ../..)"
|
||||||
|
LC_ALL=C vim -u NONE -N \
|
||||||
|
--cmd ':set noswapfile hidden' \
|
||||||
|
-c "sil :so $dir/plugin/NrrwRgn.vim" \
|
||||||
|
-c ':e 1.txt' \
|
||||||
|
-c 'sil :1,$NR!' \
|
||||||
|
-c 'sil :$put =\"Added Line\"' \
|
||||||
|
-c ':w|b#' \
|
||||||
|
-c ':saveas! 1.txt.mod' \
|
||||||
|
-c '2b|w|b#|b#' \
|
||||||
|
-c 'sil :$put =\"Added another Line\"' \
|
||||||
|
-c ':w|b#|wq!'
|
||||||
|
|
||||||
|
rt=$(diff -uN0 <(cat *.mod) <(cat *.ok))
|
||||||
|
if [ "$?" -ne 0 ]; then
|
||||||
|
printf "$Test failed\n"
|
||||||
|
printf "Diff:\n%s\n" "$rt"
|
||||||
|
exit 2;
|
||||||
|
else
|
||||||
|
printf "$Test successful!\n"
|
||||||
|
fi
|
||||||
@ -0,0 +1 @@
|
|||||||
|
## Test 4: Single Narrowed Window for a single buffer, switching back and forth between buffers several times (issue #44)
|
||||||
@ -0,0 +1,4 @@
|
|||||||
|
This is a single test.
|
||||||
|
Line 2
|
||||||
|
Line 3
|
||||||
|
Line 4
|
||||||
@ -0,0 +1,6 @@
|
|||||||
|
This is a single test.
|
||||||
|
Line 2
|
||||||
|
Line 3
|
||||||
|
Line 4
|
||||||
|
Added Line
|
||||||
|
[]
|
||||||
25
config/neovim/store/lazy-plugins/NrrwRgn/test/test5/cmd.sh
Executable file
25
config/neovim/store/lazy-plugins/NrrwRgn/test/test5/cmd.sh
Executable file
@ -0,0 +1,25 @@
|
|||||||
|
#!/nix/store/izpf49b74i15pcr9708s3xdwyqs4jxwl-bash-5.2p32/bin/bash
|
||||||
|
#set -x
|
||||||
|
|
||||||
|
Test=`basename $PWD`
|
||||||
|
|
||||||
|
dir="$(realpath ../..)"
|
||||||
|
LC_ALL=C vim -u NONE -N \
|
||||||
|
--cmd ':set noswapfile hidden' \
|
||||||
|
-c "sil :so $dir/plugin/NrrwRgn.vim" \
|
||||||
|
-c ':e 1.txt' \
|
||||||
|
-c ':saveas! 1.txt.mod' \
|
||||||
|
-c 'sil :1,$NR!' \
|
||||||
|
-c 'sil :$put =\"Added Line\"' \
|
||||||
|
-c ':wq' \
|
||||||
|
-c ':$put =string(getmatches())' \
|
||||||
|
-c ':wq!'
|
||||||
|
|
||||||
|
rt=$(diff -uN0 <(cat *.mod) <(cat *.ok))
|
||||||
|
if [ "$?" -ne 0 ]; then
|
||||||
|
printf "$Test failed\n"
|
||||||
|
printf "Diff:\n%s\n" "$rt"
|
||||||
|
exit 2;
|
||||||
|
else
|
||||||
|
printf "$Test successful!\n"
|
||||||
|
fi
|
||||||
@ -0,0 +1 @@
|
|||||||
|
## Test 5: Make sure, highlighting is removed after closing narrowed window
|
||||||
@ -0,0 +1,4 @@
|
|||||||
|
This is a single test.
|
||||||
|
Line 2
|
||||||
|
Line 3
|
||||||
|
Line 4
|
||||||
@ -0,0 +1,6 @@
|
|||||||
|
This is a single test.
|
||||||
|
Line 2
|
||||||
|
Line 3
|
||||||
|
Line 4
|
||||||
|
Added Line
|
||||||
|
[]
|
||||||
25
config/neovim/store/lazy-plugins/NrrwRgn/test/test6/cmd.sh
Executable file
25
config/neovim/store/lazy-plugins/NrrwRgn/test/test6/cmd.sh
Executable file
@ -0,0 +1,25 @@
|
|||||||
|
#!/nix/store/izpf49b74i15pcr9708s3xdwyqs4jxwl-bash-5.2p32/bin/bash
|
||||||
|
#set -x
|
||||||
|
|
||||||
|
Test=`basename $PWD`
|
||||||
|
|
||||||
|
dir="$(realpath ../..)"
|
||||||
|
LC_ALL=C vim -u NONE -N \
|
||||||
|
--cmd ':set noswapfile hidden' \
|
||||||
|
-c "sil :so $dir/plugin/NrrwRgn.vim" \
|
||||||
|
-c ':e 1.txt' \
|
||||||
|
-c ':saveas! 1.txt.mod' \
|
||||||
|
-c 'exe ":1norm VG"|:norm \nr' \
|
||||||
|
-c 'sil :$put =\"Added Line\"' \
|
||||||
|
-c ':wq' \
|
||||||
|
-c ':$put =string(getmatches())' \
|
||||||
|
-c ':wq!'
|
||||||
|
|
||||||
|
rt=$(diff -uN0 <(cat *.mod) <(cat *.ok))
|
||||||
|
if [ "$?" -ne 0 ]; then
|
||||||
|
printf "$Test failed\n"
|
||||||
|
printf "Diff:\n%s\n" "$rt"
|
||||||
|
exit 2;
|
||||||
|
else
|
||||||
|
printf "$Test successful!\n"
|
||||||
|
fi
|
||||||
@ -0,0 +1 @@
|
|||||||
|
## Test 6: Make sure, highlighting is removed after closing narrowed window (for visual narrowed region)
|
||||||
@ -0,0 +1,4 @@
|
|||||||
|
This is a single test.
|
||||||
|
Line 2
|
||||||
|
Line 3
|
||||||
|
Line 4
|
||||||
@ -0,0 +1,5 @@
|
|||||||
|
This is a single test.
|
||||||
|
Line 2
|
||||||
|
Line 3
|
||||||
|
Line 4
|
||||||
|
[]
|
||||||
25
config/neovim/store/lazy-plugins/NrrwRgn/test/test7/cmd.sh
Executable file
25
config/neovim/store/lazy-plugins/NrrwRgn/test/test7/cmd.sh
Executable file
@ -0,0 +1,25 @@
|
|||||||
|
#!/nix/store/izpf49b74i15pcr9708s3xdwyqs4jxwl-bash-5.2p32/bin/bash
|
||||||
|
#set -x
|
||||||
|
|
||||||
|
Test=`basename $PWD`
|
||||||
|
|
||||||
|
dir="$(realpath ../..)"
|
||||||
|
LC_ALL=C vim -u NONE -N \
|
||||||
|
--cmd ':set noswapfile hidden' \
|
||||||
|
-c "sil :so $dir/plugin/NrrwRgn.vim" \
|
||||||
|
-c ':e 1.txt' \
|
||||||
|
-c ':saveas! 1.txt.mod' \
|
||||||
|
-c ':%NR' \
|
||||||
|
-c ':q!' \
|
||||||
|
-c ':set modifiable' \
|
||||||
|
-c ':$put =string(getmatches())' \
|
||||||
|
-c ':wq!'
|
||||||
|
|
||||||
|
rt=$(diff -uN0 <(cat *.mod) <(cat *.ok))
|
||||||
|
if [ "$?" -ne 0 ]; then
|
||||||
|
printf "$Test failed\n"
|
||||||
|
printf "Diff:\n%s\n" "$rt"
|
||||||
|
exit 2;
|
||||||
|
else
|
||||||
|
printf "$Test successful!\n"
|
||||||
|
fi
|
||||||
@ -0,0 +1 @@
|
|||||||
|
## Test 6: Make sure, highlighting is removed after aborting narrowed window (issue #44)
|
||||||
31
config/neovim/store/lazy-plugins/NrrwRgn/todo.txt
Normal file
31
config/neovim/store/lazy-plugins/NrrwRgn/todo.txt
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
(issues to work on, in the order of importance):
|
||||||
|
|
||||||
|
- clean up does not work? (instn data isn't removed after :wq in narrowed window)
|
||||||
|
|
||||||
|
- When disabling Narrowing using :NRN and one quits the buffer,
|
||||||
|
should the highlighting be removed? (it doesn't yet)
|
||||||
|
|
||||||
|
- I really need some tests, like:
|
||||||
|
* Visual Narrowing
|
||||||
|
* Narrowing 1 Region
|
||||||
|
* Narrowing several independent regions with setting the g:nrrw_rgn_protect
|
||||||
|
variable
|
||||||
|
* Multi line narrowing
|
||||||
|
|
||||||
|
### Resolved
|
||||||
|
- When switching buffers using :b in the window, that was narrowed, the highlighting is keept.
|
||||||
|
(should be resolved)
|
||||||
|
|
||||||
|
- highlighting wrong for char visual mode
|
||||||
|
(e.g. select a word, press \nr and the whole line will be highlighted)
|
||||||
|
|
||||||
|
- Use nrrwrgn#NrrwRgnStatus() to make a nice statusline for e.g. vim-airline
|
||||||
|
-> latest airline supports a nice statusline for narrowed window
|
||||||
|
|
||||||
|
- Implement MultiEditing for :NRM
|
||||||
|
(see https://github.com/felixr/vim-multiedit/blob/master/plugin/multiedit.vim
|
||||||
|
and http://blog.felixriedel.com/2012/06/multi-editing-in-vim/)
|
||||||
|
-> Invalid: multiple cursors is different, not part of a narrowed feature
|
||||||
|
|
||||||
|
- New Mapping. The motion over which one moves will be opened in a narrowed window.
|
||||||
|
-> <leader>nr in normal mode
|
||||||
2
config/neovim/store/lazy-plugins/better-escape.nvim/.github/FUNDING.yml
vendored
Normal file
2
config/neovim/store/lazy-plugins/better-escape.nvim/.github/FUNDING.yml
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
github: 'max397574'
|
||||||
|
custom: [ 'https://buymeacoffee.com/max397574' ]
|
||||||
17
config/neovim/store/lazy-plugins/better-escape.nvim/.github/workflows/release_please.yml
vendored
Normal file
17
config/neovim/store/lazy-plugins/better-escape.nvim/.github/workflows/release_please.yml
vendored
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
name: Release Please
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
release:
|
||||||
|
name: Release
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: google-github-actions/release-please-action@v3
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.PAT }}
|
||||||
|
release-type: simple
|
||||||
|
package-name: better-escape.nvim
|
||||||
1
config/neovim/store/lazy-plugins/better-escape.nvim/.gitignore
vendored
Normal file
1
config/neovim/store/lazy-plugins/better-escape.nvim/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
.DS_Store
|
||||||
@ -0,0 +1,43 @@
|
|||||||
|
# Changelog
|
||||||
|
|
||||||
|
## [2.3.2](https://github.com/max397574/better-escape.nvim/compare/v2.3.1...v2.3.2) (2024-07-27)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* macro regression ([25a1400](https://github.com/max397574/better-escape.nvim/commit/25a14001e587ce3068b3b2204c330fdd5a09b877))
|
||||||
|
|
||||||
|
## [2.3.1](https://github.com/max397574/better-escape.nvim/compare/v2.3.0...v2.3.1) (2024-07-20)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* change nvim_input to nvim_feedkeys ([ea38a94](https://github.com/max397574/better-escape.nvim/commit/ea38a944837e00e4a9f62614cb46bdccf3cda976))
|
||||||
|
* change nvim_input to nvim_feedkeys for function mappings ([ec832a0](https://github.com/max397574/better-escape.nvim/commit/ec832a05c1f6c7826cc209bede6fbc2d0d50b1c1))
|
||||||
|
* other plugin's feedkeys ([9cbc693](https://github.com/max397574/better-escape.nvim/commit/9cbc6934e9258dc95405fcb3f7fdab499e5606be))
|
||||||
|
* unmap after applying configuration, fixes https://github.com/max397574/better-escape.nvim/issues/89 ([975cceb](https://github.com/max397574/better-escape.nvim/commit/975cceb1d7b841f16731862132a0ffb2acda3f8b))
|
||||||
|
|
||||||
|
## [2.3.0](https://github.com/max397574/better-escape.nvim/compare/v2.2.0...v2.3.0) (2024-07-09)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* add `default_mappings` option and update docs ([7b35162](https://github.com/max397574/better-escape.nvim/commit/7b351629d4f08039977e290961915d916a985aa3))
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* clear_mappings' postion ([3dbf3e1](https://github.com/max397574/better-escape.nvim/commit/3dbf3e1626d9180c4f42e3aa39dd47a1c046cd8b))
|
||||||
|
* log the endkey not the startkey ([#74](https://github.com/max397574/better-escape.nvim/issues/74)) ([3b41a90](https://github.com/max397574/better-escape.nvim/commit/3b41a905799577e3259ead9056bcabb72dedf537))
|
||||||
|
|
||||||
|
## [2.2.0](https://github.com/max397574/better-escape.nvim/compare/v2.1.1...v2.2.0) (2024-07-08)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* add release please ([769c1e2](https://github.com/max397574/better-escape.nvim/commit/769c1e2d349731cb0d78da440a68b50485140d64))
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* make the sequence <subkey><key><subkey> work ([#70](https://github.com/max397574/better-escape.nvim/issues/70)) ([9ba7653](https://github.com/max397574/better-escape.nvim/commit/9ba7653f376da79e858dc5f413157621d0b507c7))
|
||||||
674
config/neovim/store/lazy-plugins/better-escape.nvim/LICENSE
Normal file
674
config/neovim/store/lazy-plugins/better-escape.nvim/LICENSE
Normal file
@ -0,0 +1,674 @@
|
|||||||
|
GNU GENERAL PUBLIC LICENSE
|
||||||
|
Version 3, 29 June 2007
|
||||||
|
|
||||||
|
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
Preamble
|
||||||
|
|
||||||
|
The GNU General Public License is a free, copyleft license for
|
||||||
|
software and other kinds of works.
|
||||||
|
|
||||||
|
The licenses for most software and other practical works are designed
|
||||||
|
to take away your freedom to share and change the works. By contrast,
|
||||||
|
the GNU General Public License is intended to guarantee your freedom to
|
||||||
|
share and change all versions of a program--to make sure it remains free
|
||||||
|
software for all its users. We, the Free Software Foundation, use the
|
||||||
|
GNU General Public License for most of our software; it applies also to
|
||||||
|
any other work released this way by its authors. You can apply it to
|
||||||
|
your programs, too.
|
||||||
|
|
||||||
|
When we speak of free software, we are referring to freedom, not
|
||||||
|
price. Our General Public Licenses are designed to make sure that you
|
||||||
|
have the freedom to distribute copies of free software (and charge for
|
||||||
|
them if you wish), that you receive source code or can get it if you
|
||||||
|
want it, that you can change the software or use pieces of it in new
|
||||||
|
free programs, and that you know you can do these things.
|
||||||
|
|
||||||
|
To protect your rights, we need to prevent others from denying you
|
||||||
|
these rights or asking you to surrender the rights. Therefore, you have
|
||||||
|
certain responsibilities if you distribute copies of the software, or if
|
||||||
|
you modify it: responsibilities to respect the freedom of others.
|
||||||
|
|
||||||
|
For example, if you distribute copies of such a program, whether
|
||||||
|
gratis or for a fee, you must pass on to the recipients the same
|
||||||
|
freedoms that you received. You must make sure that they, too, receive
|
||||||
|
or can get the source code. And you must show them these terms so they
|
||||||
|
know their rights.
|
||||||
|
|
||||||
|
Developers that use the GNU GPL protect your rights with two steps:
|
||||||
|
(1) assert copyright on the software, and (2) offer you this License
|
||||||
|
giving you legal permission to copy, distribute and/or modify it.
|
||||||
|
|
||||||
|
For the developers' and authors' protection, the GPL clearly explains
|
||||||
|
that there is no warranty for this free software. For both users' and
|
||||||
|
authors' sake, the GPL requires that modified versions be marked as
|
||||||
|
changed, so that their problems will not be attributed erroneously to
|
||||||
|
authors of previous versions.
|
||||||
|
|
||||||
|
Some devices are designed to deny users access to install or run
|
||||||
|
modified versions of the software inside them, although the manufacturer
|
||||||
|
can do so. This is fundamentally incompatible with the aim of
|
||||||
|
protecting users' freedom to change the software. The systematic
|
||||||
|
pattern of such abuse occurs in the area of products for individuals to
|
||||||
|
use, which is precisely where it is most unacceptable. Therefore, we
|
||||||
|
have designed this version of the GPL to prohibit the practice for those
|
||||||
|
products. If such problems arise substantially in other domains, we
|
||||||
|
stand ready to extend this provision to those domains in future versions
|
||||||
|
of the GPL, as needed to protect the freedom of users.
|
||||||
|
|
||||||
|
Finally, every program is threatened constantly by software patents.
|
||||||
|
States should not allow patents to restrict development and use of
|
||||||
|
software on general-purpose computers, but in those that do, we wish to
|
||||||
|
avoid the special danger that patents applied to a free program could
|
||||||
|
make it effectively proprietary. To prevent this, the GPL assures that
|
||||||
|
patents cannot be used to render the program non-free.
|
||||||
|
|
||||||
|
The precise terms and conditions for copying, distribution and
|
||||||
|
modification follow.
|
||||||
|
|
||||||
|
TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
0. Definitions.
|
||||||
|
|
||||||
|
"This License" refers to version 3 of the GNU General Public License.
|
||||||
|
|
||||||
|
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||||
|
works, such as semiconductor masks.
|
||||||
|
|
||||||
|
"The Program" refers to any copyrightable work licensed under this
|
||||||
|
License. Each licensee is addressed as "you". "Licensees" and
|
||||||
|
"recipients" may be individuals or organizations.
|
||||||
|
|
||||||
|
To "modify" a work means to copy from or adapt all or part of the work
|
||||||
|
in a fashion requiring copyright permission, other than the making of an
|
||||||
|
exact copy. The resulting work is called a "modified version" of the
|
||||||
|
earlier work or a work "based on" the earlier work.
|
||||||
|
|
||||||
|
A "covered work" means either the unmodified Program or a work based
|
||||||
|
on the Program.
|
||||||
|
|
||||||
|
To "propagate" a work means to do anything with it that, without
|
||||||
|
permission, would make you directly or secondarily liable for
|
||||||
|
infringement under applicable copyright law, except executing it on a
|
||||||
|
computer or modifying a private copy. Propagation includes copying,
|
||||||
|
distribution (with or without modification), making available to the
|
||||||
|
public, and in some countries other activities as well.
|
||||||
|
|
||||||
|
To "convey" a work means any kind of propagation that enables other
|
||||||
|
parties to make or receive copies. Mere interaction with a user through
|
||||||
|
a computer network, with no transfer of a copy, is not conveying.
|
||||||
|
|
||||||
|
An interactive user interface displays "Appropriate Legal Notices"
|
||||||
|
to the extent that it includes a convenient and prominently visible
|
||||||
|
feature that (1) displays an appropriate copyright notice, and (2)
|
||||||
|
tells the user that there is no warranty for the work (except to the
|
||||||
|
extent that warranties are provided), that licensees may convey the
|
||||||
|
work under this License, and how to view a copy of this License. If
|
||||||
|
the interface presents a list of user commands or options, such as a
|
||||||
|
menu, a prominent item in the list meets this criterion.
|
||||||
|
|
||||||
|
1. Source Code.
|
||||||
|
|
||||||
|
The "source code" for a work means the preferred form of the work
|
||||||
|
for making modifications to it. "Object code" means any non-source
|
||||||
|
form of a work.
|
||||||
|
|
||||||
|
A "Standard Interface" means an interface that either is an official
|
||||||
|
standard defined by a recognized standards body, or, in the case of
|
||||||
|
interfaces specified for a particular programming language, one that
|
||||||
|
is widely used among developers working in that language.
|
||||||
|
|
||||||
|
The "System Libraries" of an executable work include anything, other
|
||||||
|
than the work as a whole, that (a) is included in the normal form of
|
||||||
|
packaging a Major Component, but which is not part of that Major
|
||||||
|
Component, and (b) serves only to enable use of the work with that
|
||||||
|
Major Component, or to implement a Standard Interface for which an
|
||||||
|
implementation is available to the public in source code form. A
|
||||||
|
"Major Component", in this context, means a major essential component
|
||||||
|
(kernel, window system, and so on) of the specific operating system
|
||||||
|
(if any) on which the executable work runs, or a compiler used to
|
||||||
|
produce the work, or an object code interpreter used to run it.
|
||||||
|
|
||||||
|
The "Corresponding Source" for a work in object code form means all
|
||||||
|
the source code needed to generate, install, and (for an executable
|
||||||
|
work) run the object code and to modify the work, including scripts to
|
||||||
|
control those activities. However, it does not include the work's
|
||||||
|
System Libraries, or general-purpose tools or generally available free
|
||||||
|
programs which are used unmodified in performing those activities but
|
||||||
|
which are not part of the work. For example, Corresponding Source
|
||||||
|
includes interface definition files associated with source files for
|
||||||
|
the work, and the source code for shared libraries and dynamically
|
||||||
|
linked subprograms that the work is specifically designed to require,
|
||||||
|
such as by intimate data communication or control flow between those
|
||||||
|
subprograms and other parts of the work.
|
||||||
|
|
||||||
|
The Corresponding Source need not include anything that users
|
||||||
|
can regenerate automatically from other parts of the Corresponding
|
||||||
|
Source.
|
||||||
|
|
||||||
|
The Corresponding Source for a work in source code form is that
|
||||||
|
same work.
|
||||||
|
|
||||||
|
2. Basic Permissions.
|
||||||
|
|
||||||
|
All rights granted under this License are granted for the term of
|
||||||
|
copyright on the Program, and are irrevocable provided the stated
|
||||||
|
conditions are met. This License explicitly affirms your unlimited
|
||||||
|
permission to run the unmodified Program. The output from running a
|
||||||
|
covered work is covered by this License only if the output, given its
|
||||||
|
content, constitutes a covered work. This License acknowledges your
|
||||||
|
rights of fair use or other equivalent, as provided by copyright law.
|
||||||
|
|
||||||
|
You may make, run and propagate covered works that you do not
|
||||||
|
convey, without conditions so long as your license otherwise remains
|
||||||
|
in force. You may convey covered works to others for the sole purpose
|
||||||
|
of having them make modifications exclusively for you, or provide you
|
||||||
|
with facilities for running those works, provided that you comply with
|
||||||
|
the terms of this License in conveying all material for which you do
|
||||||
|
not control copyright. Those thus making or running the covered works
|
||||||
|
for you must do so exclusively on your behalf, under your direction
|
||||||
|
and control, on terms that prohibit them from making any copies of
|
||||||
|
your copyrighted material outside their relationship with you.
|
||||||
|
|
||||||
|
Conveying under any other circumstances is permitted solely under
|
||||||
|
the conditions stated below. Sublicensing is not allowed; section 10
|
||||||
|
makes it unnecessary.
|
||||||
|
|
||||||
|
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||||
|
|
||||||
|
No covered work shall be deemed part of an effective technological
|
||||||
|
measure under any applicable law fulfilling obligations under article
|
||||||
|
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||||
|
similar laws prohibiting or restricting circumvention of such
|
||||||
|
measures.
|
||||||
|
|
||||||
|
When you convey a covered work, you waive any legal power to forbid
|
||||||
|
circumvention of technological measures to the extent such circumvention
|
||||||
|
is effected by exercising rights under this License with respect to
|
||||||
|
the covered work, and you disclaim any intention to limit operation or
|
||||||
|
modification of the work as a means of enforcing, against the work's
|
||||||
|
users, your or third parties' legal rights to forbid circumvention of
|
||||||
|
technological measures.
|
||||||
|
|
||||||
|
4. Conveying Verbatim Copies.
|
||||||
|
|
||||||
|
You may convey verbatim copies of the Program's source code as you
|
||||||
|
receive it, in any medium, provided that you conspicuously and
|
||||||
|
appropriately publish on each copy an appropriate copyright notice;
|
||||||
|
keep intact all notices stating that this License and any
|
||||||
|
non-permissive terms added in accord with section 7 apply to the code;
|
||||||
|
keep intact all notices of the absence of any warranty; and give all
|
||||||
|
recipients a copy of this License along with the Program.
|
||||||
|
|
||||||
|
You may charge any price or no price for each copy that you convey,
|
||||||
|
and you may offer support or warranty protection for a fee.
|
||||||
|
|
||||||
|
5. Conveying Modified Source Versions.
|
||||||
|
|
||||||
|
You may convey a work based on the Program, or the modifications to
|
||||||
|
produce it from the Program, in the form of source code under the
|
||||||
|
terms of section 4, provided that you also meet all of these conditions:
|
||||||
|
|
||||||
|
a) The work must carry prominent notices stating that you modified
|
||||||
|
it, and giving a relevant date.
|
||||||
|
|
||||||
|
b) The work must carry prominent notices stating that it is
|
||||||
|
released under this License and any conditions added under section
|
||||||
|
7. This requirement modifies the requirement in section 4 to
|
||||||
|
"keep intact all notices".
|
||||||
|
|
||||||
|
c) You must license the entire work, as a whole, under this
|
||||||
|
License to anyone who comes into possession of a copy. This
|
||||||
|
License will therefore apply, along with any applicable section 7
|
||||||
|
additional terms, to the whole of the work, and all its parts,
|
||||||
|
regardless of how they are packaged. This License gives no
|
||||||
|
permission to license the work in any other way, but it does not
|
||||||
|
invalidate such permission if you have separately received it.
|
||||||
|
|
||||||
|
d) If the work has interactive user interfaces, each must display
|
||||||
|
Appropriate Legal Notices; however, if the Program has interactive
|
||||||
|
interfaces that do not display Appropriate Legal Notices, your
|
||||||
|
work need not make them do so.
|
||||||
|
|
||||||
|
A compilation of a covered work with other separate and independent
|
||||||
|
works, which are not by their nature extensions of the covered work,
|
||||||
|
and which are not combined with it such as to form a larger program,
|
||||||
|
in or on a volume of a storage or distribution medium, is called an
|
||||||
|
"aggregate" if the compilation and its resulting copyright are not
|
||||||
|
used to limit the access or legal rights of the compilation's users
|
||||||
|
beyond what the individual works permit. Inclusion of a covered work
|
||||||
|
in an aggregate does not cause this License to apply to the other
|
||||||
|
parts of the aggregate.
|
||||||
|
|
||||||
|
6. Conveying Non-Source Forms.
|
||||||
|
|
||||||
|
You may convey a covered work in object code form under the terms
|
||||||
|
of sections 4 and 5, provided that you also convey the
|
||||||
|
machine-readable Corresponding Source under the terms of this License,
|
||||||
|
in one of these ways:
|
||||||
|
|
||||||
|
a) Convey the object code in, or embodied in, a physical product
|
||||||
|
(including a physical distribution medium), accompanied by the
|
||||||
|
Corresponding Source fixed on a durable physical medium
|
||||||
|
customarily used for software interchange.
|
||||||
|
|
||||||
|
b) Convey the object code in, or embodied in, a physical product
|
||||||
|
(including a physical distribution medium), accompanied by a
|
||||||
|
written offer, valid for at least three years and valid for as
|
||||||
|
long as you offer spare parts or customer support for that product
|
||||||
|
model, to give anyone who possesses the object code either (1) a
|
||||||
|
copy of the Corresponding Source for all the software in the
|
||||||
|
product that is covered by this License, on a durable physical
|
||||||
|
medium customarily used for software interchange, for a price no
|
||||||
|
more than your reasonable cost of physically performing this
|
||||||
|
conveying of source, or (2) access to copy the
|
||||||
|
Corresponding Source from a network server at no charge.
|
||||||
|
|
||||||
|
c) Convey individual copies of the object code with a copy of the
|
||||||
|
written offer to provide the Corresponding Source. This
|
||||||
|
alternative is allowed only occasionally and noncommercially, and
|
||||||
|
only if you received the object code with such an offer, in accord
|
||||||
|
with subsection 6b.
|
||||||
|
|
||||||
|
d) Convey the object code by offering access from a designated
|
||||||
|
place (gratis or for a charge), and offer equivalent access to the
|
||||||
|
Corresponding Source in the same way through the same place at no
|
||||||
|
further charge. You need not require recipients to copy the
|
||||||
|
Corresponding Source along with the object code. If the place to
|
||||||
|
copy the object code is a network server, the Corresponding Source
|
||||||
|
may be on a different server (operated by you or a third party)
|
||||||
|
that supports equivalent copying facilities, provided you maintain
|
||||||
|
clear directions next to the object code saying where to find the
|
||||||
|
Corresponding Source. Regardless of what server hosts the
|
||||||
|
Corresponding Source, you remain obligated to ensure that it is
|
||||||
|
available for as long as needed to satisfy these requirements.
|
||||||
|
|
||||||
|
e) Convey the object code using peer-to-peer transmission, provided
|
||||||
|
you inform other peers where the object code and Corresponding
|
||||||
|
Source of the work are being offered to the general public at no
|
||||||
|
charge under subsection 6d.
|
||||||
|
|
||||||
|
A separable portion of the object code, whose source code is excluded
|
||||||
|
from the Corresponding Source as a System Library, need not be
|
||||||
|
included in conveying the object code work.
|
||||||
|
|
||||||
|
A "User Product" is either (1) a "consumer product", which means any
|
||||||
|
tangible personal property which is normally used for personal, family,
|
||||||
|
or household purposes, or (2) anything designed or sold for incorporation
|
||||||
|
into a dwelling. In determining whether a product is a consumer product,
|
||||||
|
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||||
|
product received by a particular user, "normally used" refers to a
|
||||||
|
typical or common use of that class of product, regardless of the status
|
||||||
|
of the particular user or of the way in which the particular user
|
||||||
|
actually uses, or expects or is expected to use, the product. A product
|
||||||
|
is a consumer product regardless of whether the product has substantial
|
||||||
|
commercial, industrial or non-consumer uses, unless such uses represent
|
||||||
|
the only significant mode of use of the product.
|
||||||
|
|
||||||
|
"Installation Information" for a User Product means any methods,
|
||||||
|
procedures, authorization keys, or other information required to install
|
||||||
|
and execute modified versions of a covered work in that User Product from
|
||||||
|
a modified version of its Corresponding Source. The information must
|
||||||
|
suffice to ensure that the continued functioning of the modified object
|
||||||
|
code is in no case prevented or interfered with solely because
|
||||||
|
modification has been made.
|
||||||
|
|
||||||
|
If you convey an object code work under this section in, or with, or
|
||||||
|
specifically for use in, a User Product, and the conveying occurs as
|
||||||
|
part of a transaction in which the right of possession and use of the
|
||||||
|
User Product is transferred to the recipient in perpetuity or for a
|
||||||
|
fixed term (regardless of how the transaction is characterized), the
|
||||||
|
Corresponding Source conveyed under this section must be accompanied
|
||||||
|
by the Installation Information. But this requirement does not apply
|
||||||
|
if neither you nor any third party retains the ability to install
|
||||||
|
modified object code on the User Product (for example, the work has
|
||||||
|
been installed in ROM).
|
||||||
|
|
||||||
|
The requirement to provide Installation Information does not include a
|
||||||
|
requirement to continue to provide support service, warranty, or updates
|
||||||
|
for a work that has been modified or installed by the recipient, or for
|
||||||
|
the User Product in which it has been modified or installed. Access to a
|
||||||
|
network may be denied when the modification itself materially and
|
||||||
|
adversely affects the operation of the network or violates the rules and
|
||||||
|
protocols for communication across the network.
|
||||||
|
|
||||||
|
Corresponding Source conveyed, and Installation Information provided,
|
||||||
|
in accord with this section must be in a format that is publicly
|
||||||
|
documented (and with an implementation available to the public in
|
||||||
|
source code form), and must require no special password or key for
|
||||||
|
unpacking, reading or copying.
|
||||||
|
|
||||||
|
7. Additional Terms.
|
||||||
|
|
||||||
|
"Additional permissions" are terms that supplement the terms of this
|
||||||
|
License by making exceptions from one or more of its conditions.
|
||||||
|
Additional permissions that are applicable to the entire Program shall
|
||||||
|
be treated as though they were included in this License, to the extent
|
||||||
|
that they are valid under applicable law. If additional permissions
|
||||||
|
apply only to part of the Program, that part may be used separately
|
||||||
|
under those permissions, but the entire Program remains governed by
|
||||||
|
this License without regard to the additional permissions.
|
||||||
|
|
||||||
|
When you convey a copy of a covered work, you may at your option
|
||||||
|
remove any additional permissions from that copy, or from any part of
|
||||||
|
it. (Additional permissions may be written to require their own
|
||||||
|
removal in certain cases when you modify the work.) You may place
|
||||||
|
additional permissions on material, added by you to a covered work,
|
||||||
|
for which you have or can give appropriate copyright permission.
|
||||||
|
|
||||||
|
Notwithstanding any other provision of this License, for material you
|
||||||
|
add to a covered work, you may (if authorized by the copyright holders of
|
||||||
|
that material) supplement the terms of this License with terms:
|
||||||
|
|
||||||
|
a) Disclaiming warranty or limiting liability differently from the
|
||||||
|
terms of sections 15 and 16 of this License; or
|
||||||
|
|
||||||
|
b) Requiring preservation of specified reasonable legal notices or
|
||||||
|
author attributions in that material or in the Appropriate Legal
|
||||||
|
Notices displayed by works containing it; or
|
||||||
|
|
||||||
|
c) Prohibiting misrepresentation of the origin of that material, or
|
||||||
|
requiring that modified versions of such material be marked in
|
||||||
|
reasonable ways as different from the original version; or
|
||||||
|
|
||||||
|
d) Limiting the use for publicity purposes of names of licensors or
|
||||||
|
authors of the material; or
|
||||||
|
|
||||||
|
e) Declining to grant rights under trademark law for use of some
|
||||||
|
trade names, trademarks, or service marks; or
|
||||||
|
|
||||||
|
f) Requiring indemnification of licensors and authors of that
|
||||||
|
material by anyone who conveys the material (or modified versions of
|
||||||
|
it) with contractual assumptions of liability to the recipient, for
|
||||||
|
any liability that these contractual assumptions directly impose on
|
||||||
|
those licensors and authors.
|
||||||
|
|
||||||
|
All other non-permissive additional terms are considered "further
|
||||||
|
restrictions" within the meaning of section 10. If the Program as you
|
||||||
|
received it, or any part of it, contains a notice stating that it is
|
||||||
|
governed by this License along with a term that is a further
|
||||||
|
restriction, you may remove that term. If a license document contains
|
||||||
|
a further restriction but permits relicensing or conveying under this
|
||||||
|
License, you may add to a covered work material governed by the terms
|
||||||
|
of that license document, provided that the further restriction does
|
||||||
|
not survive such relicensing or conveying.
|
||||||
|
|
||||||
|
If you add terms to a covered work in accord with this section, you
|
||||||
|
must place, in the relevant source files, a statement of the
|
||||||
|
additional terms that apply to those files, or a notice indicating
|
||||||
|
where to find the applicable terms.
|
||||||
|
|
||||||
|
Additional terms, permissive or non-permissive, may be stated in the
|
||||||
|
form of a separately written license, or stated as exceptions;
|
||||||
|
the above requirements apply either way.
|
||||||
|
|
||||||
|
8. Termination.
|
||||||
|
|
||||||
|
You may not propagate or modify a covered work except as expressly
|
||||||
|
provided under this License. Any attempt otherwise to propagate or
|
||||||
|
modify it is void, and will automatically terminate your rights under
|
||||||
|
this License (including any patent licenses granted under the third
|
||||||
|
paragraph of section 11).
|
||||||
|
|
||||||
|
However, if you cease all violation of this License, then your
|
||||||
|
license from a particular copyright holder is reinstated (a)
|
||||||
|
provisionally, unless and until the copyright holder explicitly and
|
||||||
|
finally terminates your license, and (b) permanently, if the copyright
|
||||||
|
holder fails to notify you of the violation by some reasonable means
|
||||||
|
prior to 60 days after the cessation.
|
||||||
|
|
||||||
|
Moreover, your license from a particular copyright holder is
|
||||||
|
reinstated permanently if the copyright holder notifies you of the
|
||||||
|
violation by some reasonable means, this is the first time you have
|
||||||
|
received notice of violation of this License (for any work) from that
|
||||||
|
copyright holder, and you cure the violation prior to 30 days after
|
||||||
|
your receipt of the notice.
|
||||||
|
|
||||||
|
Termination of your rights under this section does not terminate the
|
||||||
|
licenses of parties who have received copies or rights from you under
|
||||||
|
this License. If your rights have been terminated and not permanently
|
||||||
|
reinstated, you do not qualify to receive new licenses for the same
|
||||||
|
material under section 10.
|
||||||
|
|
||||||
|
9. Acceptance Not Required for Having Copies.
|
||||||
|
|
||||||
|
You are not required to accept this License in order to receive or
|
||||||
|
run a copy of the Program. Ancillary propagation of a covered work
|
||||||
|
occurring solely as a consequence of using peer-to-peer transmission
|
||||||
|
to receive a copy likewise does not require acceptance. However,
|
||||||
|
nothing other than this License grants you permission to propagate or
|
||||||
|
modify any covered work. These actions infringe copyright if you do
|
||||||
|
not accept this License. Therefore, by modifying or propagating a
|
||||||
|
covered work, you indicate your acceptance of this License to do so.
|
||||||
|
|
||||||
|
10. Automatic Licensing of Downstream Recipients.
|
||||||
|
|
||||||
|
Each time you convey a covered work, the recipient automatically
|
||||||
|
receives a license from the original licensors, to run, modify and
|
||||||
|
propagate that work, subject to this License. You are not responsible
|
||||||
|
for enforcing compliance by third parties with this License.
|
||||||
|
|
||||||
|
An "entity transaction" is a transaction transferring control of an
|
||||||
|
organization, or substantially all assets of one, or subdividing an
|
||||||
|
organization, or merging organizations. If propagation of a covered
|
||||||
|
work results from an entity transaction, each party to that
|
||||||
|
transaction who receives a copy of the work also receives whatever
|
||||||
|
licenses to the work the party's predecessor in interest had or could
|
||||||
|
give under the previous paragraph, plus a right to possession of the
|
||||||
|
Corresponding Source of the work from the predecessor in interest, if
|
||||||
|
the predecessor has it or can get it with reasonable efforts.
|
||||||
|
|
||||||
|
You may not impose any further restrictions on the exercise of the
|
||||||
|
rights granted or affirmed under this License. For example, you may
|
||||||
|
not impose a license fee, royalty, or other charge for exercise of
|
||||||
|
rights granted under this License, and you may not initiate litigation
|
||||||
|
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||||
|
any patent claim is infringed by making, using, selling, offering for
|
||||||
|
sale, or importing the Program or any portion of it.
|
||||||
|
|
||||||
|
11. Patents.
|
||||||
|
|
||||||
|
A "contributor" is a copyright holder who authorizes use under this
|
||||||
|
License of the Program or a work on which the Program is based. The
|
||||||
|
work thus licensed is called the contributor's "contributor version".
|
||||||
|
|
||||||
|
A contributor's "essential patent claims" are all patent claims
|
||||||
|
owned or controlled by the contributor, whether already acquired or
|
||||||
|
hereafter acquired, that would be infringed by some manner, permitted
|
||||||
|
by this License, of making, using, or selling its contributor version,
|
||||||
|
but do not include claims that would be infringed only as a
|
||||||
|
consequence of further modification of the contributor version. For
|
||||||
|
purposes of this definition, "control" includes the right to grant
|
||||||
|
patent sublicenses in a manner consistent with the requirements of
|
||||||
|
this License.
|
||||||
|
|
||||||
|
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||||
|
patent license under the contributor's essential patent claims, to
|
||||||
|
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||||
|
propagate the contents of its contributor version.
|
||||||
|
|
||||||
|
In the following three paragraphs, a "patent license" is any express
|
||||||
|
agreement or commitment, however denominated, not to enforce a patent
|
||||||
|
(such as an express permission to practice a patent or covenant not to
|
||||||
|
sue for patent infringement). To "grant" such a patent license to a
|
||||||
|
party means to make such an agreement or commitment not to enforce a
|
||||||
|
patent against the party.
|
||||||
|
|
||||||
|
If you convey a covered work, knowingly relying on a patent license,
|
||||||
|
and the Corresponding Source of the work is not available for anyone
|
||||||
|
to copy, free of charge and under the terms of this License, through a
|
||||||
|
publicly available network server or other readily accessible means,
|
||||||
|
then you must either (1) cause the Corresponding Source to be so
|
||||||
|
available, or (2) arrange to deprive yourself of the benefit of the
|
||||||
|
patent license for this particular work, or (3) arrange, in a manner
|
||||||
|
consistent with the requirements of this License, to extend the patent
|
||||||
|
license to downstream recipients. "Knowingly relying" means you have
|
||||||
|
actual knowledge that, but for the patent license, your conveying the
|
||||||
|
covered work in a country, or your recipient's use of the covered work
|
||||||
|
in a country, would infringe one or more identifiable patents in that
|
||||||
|
country that you have reason to believe are valid.
|
||||||
|
|
||||||
|
If, pursuant to or in connection with a single transaction or
|
||||||
|
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||||
|
covered work, and grant a patent license to some of the parties
|
||||||
|
receiving the covered work authorizing them to use, propagate, modify
|
||||||
|
or convey a specific copy of the covered work, then the patent license
|
||||||
|
you grant is automatically extended to all recipients of the covered
|
||||||
|
work and works based on it.
|
||||||
|
|
||||||
|
A patent license is "discriminatory" if it does not include within
|
||||||
|
the scope of its coverage, prohibits the exercise of, or is
|
||||||
|
conditioned on the non-exercise of one or more of the rights that are
|
||||||
|
specifically granted under this License. You may not convey a covered
|
||||||
|
work if you are a party to an arrangement with a third party that is
|
||||||
|
in the business of distributing software, under which you make payment
|
||||||
|
to the third party based on the extent of your activity of conveying
|
||||||
|
the work, and under which the third party grants, to any of the
|
||||||
|
parties who would receive the covered work from you, a discriminatory
|
||||||
|
patent license (a) in connection with copies of the covered work
|
||||||
|
conveyed by you (or copies made from those copies), or (b) primarily
|
||||||
|
for and in connection with specific products or compilations that
|
||||||
|
contain the covered work, unless you entered into that arrangement,
|
||||||
|
or that patent license was granted, prior to 28 March 2007.
|
||||||
|
|
||||||
|
Nothing in this License shall be construed as excluding or limiting
|
||||||
|
any implied license or other defenses to infringement that may
|
||||||
|
otherwise be available to you under applicable patent law.
|
||||||
|
|
||||||
|
12. No Surrender of Others' Freedom.
|
||||||
|
|
||||||
|
If conditions are imposed on you (whether by court order, agreement or
|
||||||
|
otherwise) that contradict the conditions of this License, they do not
|
||||||
|
excuse you from the conditions of this License. If you cannot convey a
|
||||||
|
covered work so as to satisfy simultaneously your obligations under this
|
||||||
|
License and any other pertinent obligations, then as a consequence you may
|
||||||
|
not convey it at all. For example, if you agree to terms that obligate you
|
||||||
|
to collect a royalty for further conveying from those to whom you convey
|
||||||
|
the Program, the only way you could satisfy both those terms and this
|
||||||
|
License would be to refrain entirely from conveying the Program.
|
||||||
|
|
||||||
|
13. Use with the GNU Affero General Public License.
|
||||||
|
|
||||||
|
Notwithstanding any other provision of this License, you have
|
||||||
|
permission to link or combine any covered work with a work licensed
|
||||||
|
under version 3 of the GNU Affero General Public License into a single
|
||||||
|
combined work, and to convey the resulting work. The terms of this
|
||||||
|
License will continue to apply to the part which is the covered work,
|
||||||
|
but the special requirements of the GNU Affero General Public License,
|
||||||
|
section 13, concerning interaction through a network will apply to the
|
||||||
|
combination as such.
|
||||||
|
|
||||||
|
14. Revised Versions of this License.
|
||||||
|
|
||||||
|
The Free Software Foundation may publish revised and/or new versions of
|
||||||
|
the GNU General Public License from time to time. Such new versions will
|
||||||
|
be similar in spirit to the present version, but may differ in detail to
|
||||||
|
address new problems or concerns.
|
||||||
|
|
||||||
|
Each version is given a distinguishing version number. If the
|
||||||
|
Program specifies that a certain numbered version of the GNU General
|
||||||
|
Public License "or any later version" applies to it, you have the
|
||||||
|
option of following the terms and conditions either of that numbered
|
||||||
|
version or of any later version published by the Free Software
|
||||||
|
Foundation. If the Program does not specify a version number of the
|
||||||
|
GNU General Public License, you may choose any version ever published
|
||||||
|
by the Free Software Foundation.
|
||||||
|
|
||||||
|
If the Program specifies that a proxy can decide which future
|
||||||
|
versions of the GNU General Public License can be used, that proxy's
|
||||||
|
public statement of acceptance of a version permanently authorizes you
|
||||||
|
to choose that version for the Program.
|
||||||
|
|
||||||
|
Later license versions may give you additional or different
|
||||||
|
permissions. However, no additional obligations are imposed on any
|
||||||
|
author or copyright holder as a result of your choosing to follow a
|
||||||
|
later version.
|
||||||
|
|
||||||
|
15. Disclaimer of Warranty.
|
||||||
|
|
||||||
|
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||||
|
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||||
|
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||||
|
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||||
|
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||||
|
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||||
|
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||||
|
|
||||||
|
16. Limitation of Liability.
|
||||||
|
|
||||||
|
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||||
|
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||||
|
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||||
|
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||||
|
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||||
|
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||||
|
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||||
|
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||||
|
SUCH DAMAGES.
|
||||||
|
|
||||||
|
17. Interpretation of Sections 15 and 16.
|
||||||
|
|
||||||
|
If the disclaimer of warranty and limitation of liability provided
|
||||||
|
above cannot be given local legal effect according to their terms,
|
||||||
|
reviewing courts shall apply local law that most closely approximates
|
||||||
|
an absolute waiver of all civil liability in connection with the
|
||||||
|
Program, unless a warranty or assumption of liability accompanies a
|
||||||
|
copy of the Program in return for a fee.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
How to Apply These Terms to Your New Programs
|
||||||
|
|
||||||
|
If you develop a new program, and you want it to be of the greatest
|
||||||
|
possible use to the public, the best way to achieve this is to make it
|
||||||
|
free software which everyone can redistribute and change under these terms.
|
||||||
|
|
||||||
|
To do so, attach the following notices to the program. It is safest
|
||||||
|
to attach them to the start of each source file to most effectively
|
||||||
|
state the exclusion of warranty; and each file should have at least
|
||||||
|
the "copyright" line and a pointer to where the full notice is found.
|
||||||
|
|
||||||
|
<one line to give the program's name and a brief idea of what it does.>
|
||||||
|
Copyright (C) <year> <name of author>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
||||||
|
If the program does terminal interaction, make it output a short
|
||||||
|
notice like this when it starts in an interactive mode:
|
||||||
|
|
||||||
|
<program> Copyright (C) <year> <name of author>
|
||||||
|
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||||
|
This is free software, and you are welcome to redistribute it
|
||||||
|
under certain conditions; type `show c' for details.
|
||||||
|
|
||||||
|
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||||
|
parts of the General Public License. Of course, your program's commands
|
||||||
|
might be different; for a GUI interface, you would use an "about box".
|
||||||
|
|
||||||
|
You should also get your employer (if you work as a programmer) or school,
|
||||||
|
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||||
|
For more information on this, and how to apply and follow the GNU GPL, see
|
||||||
|
<https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
The GNU General Public License does not permit incorporating your program
|
||||||
|
into proprietary programs. If your program is a subroutine library, you
|
||||||
|
may consider it more useful to permit linking proprietary applications with
|
||||||
|
the library. If this is what you want to do, use the GNU Lesser General
|
||||||
|
Public License instead of this License. But first, please read
|
||||||
|
<https://www.gnu.org/licenses/why-not-lgpl.html>.
|
||||||
@ -0,0 +1,182 @@
|
|||||||
|
local M = {}
|
||||||
|
local uv = vim.uv or vim.loop
|
||||||
|
local t = function(str)
|
||||||
|
return vim.api.nvim_replace_termcodes(str, true, true, true)
|
||||||
|
end
|
||||||
|
|
||||||
|
M.waiting = false
|
||||||
|
|
||||||
|
local settings = {
|
||||||
|
timeout = vim.o.timeoutlen,
|
||||||
|
default_mappings = true,
|
||||||
|
mappings = {
|
||||||
|
i = {
|
||||||
|
-- first_key[s]
|
||||||
|
j = {
|
||||||
|
-- second_key[s]
|
||||||
|
k = "<Esc>",
|
||||||
|
j = "<Esc>",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
c = {
|
||||||
|
j = {
|
||||||
|
k = "<Esc>",
|
||||||
|
j = "<Esc>",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
t = {
|
||||||
|
j = {
|
||||||
|
k = "<C-\\><C-n>",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
v = {
|
||||||
|
j = {
|
||||||
|
k = "<Esc>",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
s = {
|
||||||
|
j = {
|
||||||
|
k = "<Esc>",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
local function unmap_keys()
|
||||||
|
for mode, keys in pairs(settings.mappings) do
|
||||||
|
for key, subkeys in pairs(keys) do
|
||||||
|
pcall(vim.keymap.del, mode, key)
|
||||||
|
for subkey, _ in pairs(subkeys) do
|
||||||
|
pcall(vim.keymap.del, mode, subkey)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- WIP: move this into recorder.lua ?
|
||||||
|
-- When a first_key is pressed, `recorded_key` is set to it
|
||||||
|
-- (e.g. if jk is a mapping, when 'j' is pressed, `recorded_key` is set to 'j')
|
||||||
|
local recorded_key = nil
|
||||||
|
local bufmodified = nil
|
||||||
|
local timeout_timer = uv.new_timer()
|
||||||
|
local has_recorded = false -- See `vim.on_key` below
|
||||||
|
local function record_key(key)
|
||||||
|
if timeout_timer:is_active() then
|
||||||
|
timeout_timer:stop()
|
||||||
|
end
|
||||||
|
bufmodified = vim.bo.modified
|
||||||
|
recorded_key = key
|
||||||
|
has_recorded = true
|
||||||
|
M.waiting = true
|
||||||
|
timeout_timer:start(settings.timeout, 0, function()
|
||||||
|
M.waiting = false
|
||||||
|
recorded_key = nil
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
|
||||||
|
vim.on_key(function(_, typed)
|
||||||
|
if typed == "" then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
if has_recorded == false then
|
||||||
|
-- If the user presses a key that doesn't get recorded, remove the previously recorded key.
|
||||||
|
recorded_key = nil
|
||||||
|
return
|
||||||
|
end
|
||||||
|
has_recorded = false
|
||||||
|
end)
|
||||||
|
|
||||||
|
-- List of keys that undo the effect of pressing first_key
|
||||||
|
local undo_key = {
|
||||||
|
i = "<bs>",
|
||||||
|
c = "<bs>",
|
||||||
|
t = "<bs>",
|
||||||
|
}
|
||||||
|
|
||||||
|
local function map_keys()
|
||||||
|
for mode, first_keys in pairs(settings.mappings) do
|
||||||
|
local map_opts = { expr = true }
|
||||||
|
for first_key, _ in pairs(first_keys) do
|
||||||
|
vim.keymap.set(mode, first_key, function()
|
||||||
|
record_key(first_key)
|
||||||
|
return first_key
|
||||||
|
end, map_opts)
|
||||||
|
end
|
||||||
|
for _, second_keys in pairs(first_keys) do
|
||||||
|
for second_key, mapping in pairs(second_keys) do
|
||||||
|
if not mapping then
|
||||||
|
goto continue
|
||||||
|
end
|
||||||
|
vim.keymap.set(mode, second_key, function()
|
||||||
|
-- If a first_key wasn't recorded, record second_key because it might be a first_key for another sequence.
|
||||||
|
-- TODO: Explicitly, check if it's a starting key. I don't think that's necessary right now.
|
||||||
|
if recorded_key == nil then
|
||||||
|
record_key(second_key)
|
||||||
|
return second_key
|
||||||
|
end
|
||||||
|
-- If a key was recorded, but it isn't the first_key for second_key, record second_key(second_key might be a first_key for another sequence)
|
||||||
|
-- Or if the recorded_key was just a second_key
|
||||||
|
if
|
||||||
|
not (
|
||||||
|
first_keys[recorded_key]
|
||||||
|
and first_keys[recorded_key][second_key]
|
||||||
|
)
|
||||||
|
then
|
||||||
|
record_key(second_key)
|
||||||
|
return second_key
|
||||||
|
end
|
||||||
|
local keys = ""
|
||||||
|
keys = keys
|
||||||
|
.. t(
|
||||||
|
(undo_key[mode] or "")
|
||||||
|
.. (
|
||||||
|
("<cmd>setlocal %smodified<cr>"):format(
|
||||||
|
bufmodified and "" or "no"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
if type(mapping) == "string" then
|
||||||
|
keys = keys .. t(mapping)
|
||||||
|
elseif type(mapping) == "function" then
|
||||||
|
keys = keys .. t(mapping() or "")
|
||||||
|
end
|
||||||
|
vim.api.nvim_feedkeys(keys, "in", false)
|
||||||
|
end, map_opts)
|
||||||
|
::continue::
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function M.setup(update)
|
||||||
|
if update and update.default_mappings == false then
|
||||||
|
settings.mappings = {}
|
||||||
|
end
|
||||||
|
settings = vim.tbl_deep_extend("force", settings, update or {})
|
||||||
|
if settings.keys or settings.clear_empty_lines then
|
||||||
|
vim.notify(
|
||||||
|
"[better-escape.nvim]: Rewrite! Check: https://github.com/max397574/better-escape.nvim",
|
||||||
|
vim.log.levels.WARN,
|
||||||
|
{}
|
||||||
|
)
|
||||||
|
end
|
||||||
|
if settings.mapping then
|
||||||
|
vim.notify(
|
||||||
|
"[better-escape.nvim]: Rewrite! Check: https://github.com/max397574/better-escape.nvim",
|
||||||
|
vim.log.levels.WARN,
|
||||||
|
{}
|
||||||
|
)
|
||||||
|
if type(settings.mapping) == "string" then
|
||||||
|
settings.mapping = { settings.mapping }
|
||||||
|
end
|
||||||
|
for _, mapping in ipairs(settings.mappings) do
|
||||||
|
settings.mappings.i[mapping:sub(1, 2)] = {}
|
||||||
|
settings.mappings.i[mapping:sub(1, 1)][mapping:sub(2, 2)] =
|
||||||
|
settings.keys
|
||||||
|
end
|
||||||
|
end
|
||||||
|
unmap_keys()
|
||||||
|
map_keys()
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
160
config/neovim/store/lazy-plugins/better-escape.nvim/readme.md
Normal file
160
config/neovim/store/lazy-plugins/better-escape.nvim/readme.md
Normal file
@ -0,0 +1,160 @@
|
|||||||
|
# better-escape.nvim
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
A lot of people have mappings like `jk` or `jj` to escape insert mode. The
|
||||||
|
problem with this mappings is that whenever you type a `j`, neovim wait about
|
||||||
|
100-500ms (depending on your timeoutlen) to see, if you type a `j` or a `k`
|
||||||
|
because these are mapped. Only after that time the `j` will be inserted. Then
|
||||||
|
you always get a delay when typing a `j`.
|
||||||
|
|
||||||
|
An example where this has a big impact is e.g. telescope. Because the characters
|
||||||
|
which are mapped aren't really inserted at first the whole filtering isn't
|
||||||
|
instant.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## ✨Features
|
||||||
|
|
||||||
|
- Write mappings in many modes without having a delay when typing
|
||||||
|
- Customizable timeout
|
||||||
|
- Map key sequences and lua functions
|
||||||
|
- Use multiple mappings
|
||||||
|
- Really small and fast
|
||||||
|
|
||||||
|
## 📦Installation
|
||||||
|
|
||||||
|
Use your favourite package manager and call the setup function.
|
||||||
|
|
||||||
|
```lua
|
||||||
|
-- lua with lazy.nvim
|
||||||
|
{
|
||||||
|
"max397574/better-escape.nvim",
|
||||||
|
config = function()
|
||||||
|
require("better_escape").setup()
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## ❗Rewrite
|
||||||
|
|
||||||
|
There was a big rewrite which allows much more flexibility now. You can now
|
||||||
|
define mappings in most modes and also use functions.
|
||||||
|
|
||||||
|
The biggest change was that the `mapping` config option was removed. Check the
|
||||||
|
default configuration below to see the new structure.
|
||||||
|
|
||||||
|
This also deprecated the `clear_empty_lines` setting. You can replicate this
|
||||||
|
behavior by setting a mapping to a function like this:
|
||||||
|
|
||||||
|
```lua
|
||||||
|
-- `k` would be the second key of a mapping
|
||||||
|
k = function()
|
||||||
|
vim.api.nvim_input("<esc>")
|
||||||
|
local current_line = vim.api.nvim_get_current_line()
|
||||||
|
if current_line:match("^%s+j$") then
|
||||||
|
vim.schedule(function()
|
||||||
|
vim.api.nvim_set_current_line("")
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
```
|
||||||
|
|
||||||
|
## ⚙️Customization
|
||||||
|
|
||||||
|
Call the setup function with your options as arguments.
|
||||||
|
|
||||||
|
After the rewrite you can also use any function. So you could for example map
|
||||||
|
`<space><tab>` to jump with luasnip like this:
|
||||||
|
|
||||||
|
```lua
|
||||||
|
i = {
|
||||||
|
[" "] = {
|
||||||
|
["<tab>"] = function()
|
||||||
|
-- Defer execution to avoid side-effects
|
||||||
|
vim.defer_fn(function()
|
||||||
|
-- set undo point
|
||||||
|
vim.o.ul = vim.o.ul
|
||||||
|
require("luasnip").expand_or_jump()
|
||||||
|
end, 1)
|
||||||
|
end
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Disable mappings
|
||||||
|
To disable keys set them to `false` in the configuration.
|
||||||
|
You can also disable all default mappings by setting the `default_mappings` option to false.
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Default Config</summary>
|
||||||
|
|
||||||
|
```lua
|
||||||
|
-- lua, default settings
|
||||||
|
require("better_escape").setup {
|
||||||
|
timeout = vim.o.timeoutlen,
|
||||||
|
default_mappings = true,
|
||||||
|
mappings = {
|
||||||
|
i = {
|
||||||
|
j = {
|
||||||
|
-- These can all also be functions
|
||||||
|
k = "<Esc>",
|
||||||
|
j = "<Esc>",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
c = {
|
||||||
|
j = {
|
||||||
|
k = "<Esc>",
|
||||||
|
j = "<Esc>",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
t = {
|
||||||
|
j = {
|
||||||
|
k = "<C-\\><C-n>",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
v = {
|
||||||
|
j = {
|
||||||
|
k = "<Esc>",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
s = {
|
||||||
|
j = {
|
||||||
|
k = "<Esc>",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
## API
|
||||||
|
|
||||||
|
`require("better_escape").waiting` is a boolean indicating that it's waiting for
|
||||||
|
a mapped sequence to complete.
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Statusline example</summary>
|
||||||
|
|
||||||
|
```lua
|
||||||
|
function escape_status()
|
||||||
|
local ok, m = pcall(require, 'better_escape')
|
||||||
|
return ok and m.waiting and '✺' or ""
|
||||||
|
end
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
## ❤️ Support
|
||||||
|
|
||||||
|
If you like the projects I do and they can help you in your life you can support
|
||||||
|
my work with [github sponsors](https://github.com/sponsors/max397574). Every
|
||||||
|
support motivates me to continue working on my open source projects.
|
||||||
|
|
||||||
|
## Similar plugins
|
||||||
|
|
||||||
|
The old version of this plugin was a lua version of
|
||||||
|
[better_escape.vim](https://github.com/jdhao/better-escape.vim), with some
|
||||||
|
additional features and optimizations. This changed with the rewrite though. Now
|
||||||
|
it has much more features.
|
||||||
@ -0,0 +1,5 @@
|
|||||||
|
column_width = 80
|
||||||
|
indent_type = "Spaces"
|
||||||
|
indent_width = 4
|
||||||
|
quote_style = "AutoPreferDouble"
|
||||||
|
no_call_parentheses = false
|
||||||
@ -0,0 +1,18 @@
|
|||||||
|
# EditorConfig helps developers define and maintain consistent
|
||||||
|
# coding styles between different editors and IDEs
|
||||||
|
# EditorConfig is awesome: https://EditorConfig.org
|
||||||
|
|
||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
end_of_line = lf
|
||||||
|
charset = utf-8
|
||||||
|
insert_final_newline = true
|
||||||
|
|
||||||
|
[*.lua]
|
||||||
|
indent_style = tab
|
||||||
|
|
||||||
|
[*.{diff,md}]
|
||||||
|
trim_trailing_whitespace = false
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 4
|
||||||
93
config/neovim/store/lazy-plugins/catppuccin-nvim/.github/ISSUE_TEMPLATE/bug_report.yml
vendored
Normal file
93
config/neovim/store/lazy-plugins/catppuccin-nvim/.github/ISSUE_TEMPLATE/bug_report.yml
vendored
Normal file
@ -0,0 +1,93 @@
|
|||||||
|
name: Bug report
|
||||||
|
description: Report a problem with Catppuccin
|
||||||
|
labels: [bug]
|
||||||
|
body:
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: "Description"
|
||||||
|
description: "A short description of the problem you are reporting."
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: "Neovim version"
|
||||||
|
description: "Output of `nvim --version` (Catppuccin requires neovim >= 0.8)"
|
||||||
|
render: markdown
|
||||||
|
placeholder: |
|
||||||
|
NVIM v0.9.0
|
||||||
|
Build type: Release
|
||||||
|
LuaJIT 2.1.0-beta3
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: input
|
||||||
|
attributes:
|
||||||
|
label: "Terminal and multiplexer"
|
||||||
|
placeholder: "kitty 0.29.2 with tmux 3.3a"
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: markdown
|
||||||
|
attributes:
|
||||||
|
value: |
|
||||||
|
# FOR TMUX USERS
|
||||||
|
FOLLOW THESE GIST BEFORE OPENING THE ISSUE
|
||||||
|
- [Enable true color support](https://gist.github.com/andersevenrud/015e61af2fd264371032763d4ed965b6) to fix the [abnormal colors](https://github.com/catppuccin/nvim/issues/415)
|
||||||
|
- [Enable italic font support](https://gist.github.com/gyribeiro/4192af1aced7a1b555df06bd3781a722) to fix the [incorrect if, then, else, end highlights](https://github.com/catppuccin/nvim/issues/428)
|
||||||
|
- type: input
|
||||||
|
attributes:
|
||||||
|
label: "Catppuccin version / branch / rev"
|
||||||
|
placeholder: "catppuccin v1.4.0"
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: "Steps to reproduce"
|
||||||
|
description: "Steps to reproduce using the minimal config provided below."
|
||||||
|
placeholder: |
|
||||||
|
1. `nvim -u repro.lua`
|
||||||
|
2. ...
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: "Expected behavior"
|
||||||
|
description: "A description of the behavior you expected:"
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: "Actual behavior"
|
||||||
|
description: "Observed behavior (may optionally include logs, images, or videos)."
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: Repro
|
||||||
|
description: Minimal `init.lua` to reproduce this issue. Save as `repro.lua` and run with `nvim -u repro.lua`
|
||||||
|
value: |
|
||||||
|
-- DO NOT change the paths and don't remove the colorscheme
|
||||||
|
local root = vim.fn.fnamemodify("./.repro", ":p")
|
||||||
|
|
||||||
|
-- set stdpaths to use .repro
|
||||||
|
for _, name in ipairs({ "config", "data", "state", "cache" }) do
|
||||||
|
vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
|
||||||
|
end
|
||||||
|
|
||||||
|
-- bootstrap lazy
|
||||||
|
local lazypath = root .. "/plugins/lazy.nvim"
|
||||||
|
if not vim.loop.fs_stat(lazypath) then
|
||||||
|
vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", lazypath })
|
||||||
|
end
|
||||||
|
vim.opt.runtimepath:prepend(lazypath)
|
||||||
|
|
||||||
|
-- install plugins
|
||||||
|
local plugins = {
|
||||||
|
"catppuccin/nvim",
|
||||||
|
-- add any other plugins here
|
||||||
|
}
|
||||||
|
require("lazy").setup(plugins, {
|
||||||
|
root = root .. "/plugins",
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.cmd.colorscheme("catppuccin")
|
||||||
|
-- add anything else here
|
||||||
|
render: Lua
|
||||||
5
config/neovim/store/lazy-plugins/catppuccin-nvim/.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
5
config/neovim/store/lazy-plugins/catppuccin-nvim/.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
blank_issues_enabled: false
|
||||||
|
contact_links:
|
||||||
|
- name: Question
|
||||||
|
url: https://discord.com/servers/catppuccin-907385605422448742
|
||||||
|
about: Join our discord server for real-time answers and more!
|
||||||
20
config/neovim/store/lazy-plugins/catppuccin-nvim/.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
20
config/neovim/store/lazy-plugins/catppuccin-nvim/.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
---
|
||||||
|
name: Feature request
|
||||||
|
about: "Suggest an idea for the project"
|
||||||
|
title: ""
|
||||||
|
labels: enhancement
|
||||||
|
assignees: ""
|
||||||
|
---
|
||||||
|
|
||||||
|
**Is your feature request related to a problem? Please describe.**
|
||||||
|
A clear and concise description of what the problem is.
|
||||||
|
Ex. I'm always frustrated when [...]. My workflow is like this [...]
|
||||||
|
|
||||||
|
**Describe the solution you'd like**
|
||||||
|
A clear and concise description of what you want to happen.
|
||||||
|
|
||||||
|
**Describe alternatives you've considered**
|
||||||
|
A clear and concise description of any alternative solutions or features you've considered.
|
||||||
|
|
||||||
|
**Additional context**
|
||||||
|
Add any other context or screenshots about the feature request here.
|
||||||
16
config/neovim/store/lazy-plugins/catppuccin-nvim/.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
16
config/neovim/store/lazy-plugins/catppuccin-nvim/.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
🎉 First off, thanks for taking the time to contribute! 🎉
|
||||||
|
|
||||||
|
Here are some guidelines:
|
||||||
|
- Format code using [stylua](https://github.com/johnnymorganz/stylua).
|
||||||
|
- New plugin integration should be added in alphabetical order:
|
||||||
|
- to the [README](https://github.com/catppuccin/nvim#integrations) (vimdoc is auto-generated).
|
||||||
|
- to [types.lua](https://github.com/catppuccin/nvim/blob/main/lua/catppuccin/types.lua)
|
||||||
|
- Create a topic branch on your fork for your specific PR.
|
||||||
|
- Use [conventionalcommits.org's](https://www.conventionalcommits.org/en/v1.0.0/)
|
||||||
|
rules for explicit and meaningful commit messages.
|
||||||
|
- If it's your first time contributing to a project, then read
|
||||||
|
[About pull requests](https://docs.github.com/en/github/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests)
|
||||||
|
on Github's docs.
|
||||||
|
|
||||||
|
Here are some tips:
|
||||||
|
- Use `vim.g.catppuccin_debug = true` to get live config re-loading
|
||||||
14
config/neovim/store/lazy-plugins/catppuccin-nvim/.github/scripts/update-palette.py
vendored
Normal file
14
config/neovim/store/lazy-plugins/catppuccin-nvim/.github/scripts/update-palette.py
vendored
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
import json
|
||||||
|
import urllib.request
|
||||||
|
|
||||||
|
url = "https://github.com/catppuccin/palette/raw/main/palette.json"
|
||||||
|
|
||||||
|
with urllib.request.urlopen(url) as response:
|
||||||
|
flavors = json.loads(response.read().decode())
|
||||||
|
|
||||||
|
for flavor in flavors:
|
||||||
|
with open(f"lua/catppuccin/palettes/{flavor}.lua", "w") as f:
|
||||||
|
f.write("return {\n")
|
||||||
|
for color in flavors[flavor]["colors"]:
|
||||||
|
f.write(f'\t{color} = "{flavors[flavor]["colors"][color]["hex"]}",\n')
|
||||||
|
f.write("}\n")
|
||||||
20
config/neovim/store/lazy-plugins/catppuccin-nvim/.github/workflows/formatting.yml
vendored
Normal file
20
config/neovim/store/lazy-plugins/catppuccin-nvim/.github/workflows/formatting.yml
vendored
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
name: StyLua
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
push:
|
||||||
|
paths-ignore:
|
||||||
|
- "*.md"
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
stylua:
|
||||||
|
name: StyLua
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: JohnnyMorganz/stylua-action@v4
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
version: latest
|
||||||
|
args: --check --config-path=stylua.toml .
|
||||||
55
config/neovim/store/lazy-plugins/catppuccin-nvim/.github/workflows/neovim.yml
vendored
Normal file
55
config/neovim/store/lazy-plugins/catppuccin-nvim/.github/workflows/neovim.yml
vendored
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
---
|
||||||
|
name: Neovim
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
push:
|
||||||
|
paths-ignore:
|
||||||
|
- "*.md"
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
ubuntu:
|
||||||
|
name: Ubuntu
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Install Neovim
|
||||||
|
uses: MunifTanjim/setup-neovim-action@v1
|
||||||
|
with:
|
||||||
|
tag: nightly
|
||||||
|
- name: Run neovim
|
||||||
|
run: |
|
||||||
|
nvim --version
|
||||||
|
nvim --headless -u tests/init.lua +q
|
||||||
|
macos:
|
||||||
|
name: Macos
|
||||||
|
runs-on: macos-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Install Neovim
|
||||||
|
run: |
|
||||||
|
wget -q https://github.com/neovim/neovim/releases/download/nightly/nvim-macos-x86_64.tar.gz
|
||||||
|
xattr -c ./nvim-macos-x86_64.tar.gz
|
||||||
|
tar xzvf nvim-macos-x86_64.tar.gz &> /dev/null
|
||||||
|
ln -s $(pwd)/nvim-macos-x86_64/bin/nvim /usr/local/bin/nvim
|
||||||
|
- name: Run neovim
|
||||||
|
run: |
|
||||||
|
nvim --version
|
||||||
|
nvim --headless -u tests/init.lua +q
|
||||||
|
windows:
|
||||||
|
name: Windows
|
||||||
|
runs-on: windows-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Install Neovim
|
||||||
|
run: |
|
||||||
|
C:\msys64\usr\bin\wget.exe -q https://github.com/neovim/neovim/releases/download/nightly/nvim-win64.zip
|
||||||
|
7z x nvim-win64.zip
|
||||||
|
Add-Content $env:GITHUB_PATH ".\nvim-win64\bin\"
|
||||||
|
- name: Run neovim
|
||||||
|
run: |
|
||||||
|
nvim --version
|
||||||
|
nvim --headless -u tests/init.lua +q
|
||||||
30
config/neovim/store/lazy-plugins/catppuccin-nvim/.github/workflows/palette.yml
vendored
Normal file
30
config/neovim/store/lazy-plugins/catppuccin-nvim/.github/workflows/palette.yml
vendored
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
name: Palette
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
workflow_dispatch:
|
||||||
|
schedule:
|
||||||
|
- cron: '0 0 * * *' # Run every day at midnight UTC
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
createPullRequest:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Make changes to pull request
|
||||||
|
run: python3 ./.github/scripts/update-palette.py
|
||||||
|
|
||||||
|
- name: Create Pull Request
|
||||||
|
id: cpr
|
||||||
|
uses: peter-evans/create-pull-request@v6
|
||||||
|
with:
|
||||||
|
commit-message: 'feat: auto-sync upstream palettes'
|
||||||
|
committer: GitHub <noreply@github.com>
|
||||||
|
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
|
||||||
|
signoff: false
|
||||||
|
branch: new-palettes
|
||||||
|
delete-branch: true
|
||||||
|
title: 'feat: auto-sync upstream palettes'
|
||||||
|
body: |
|
||||||
|
Auto-update `lua/catppuccin/palettes/` based on https://github.com/catppuccin/palette/blob/main/palette.json
|
||||||
26
config/neovim/store/lazy-plugins/catppuccin-nvim/.github/workflows/pandocvim.yml
vendored
Normal file
26
config/neovim/store/lazy-plugins/catppuccin-nvim/.github/workflows/pandocvim.yml
vendored
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
name: panvimdoc
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
paths:
|
||||||
|
- '**.md'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
docs:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
name: pandoc to vimdoc
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: panvimdoc
|
||||||
|
uses: kdheepak/panvimdoc@main
|
||||||
|
with:
|
||||||
|
vimdoc: catppuccin
|
||||||
|
description: "Soothing pastel theme for NeoVim"
|
||||||
|
pandoc: "README.md"
|
||||||
|
toc: true
|
||||||
|
version: "nvim >= 0.8.0"
|
||||||
|
treesitter: true
|
||||||
|
- uses: stefanzweifel/git-auto-commit-action@v5
|
||||||
|
with:
|
||||||
|
commit_message: "docs: auto generate vimdoc"
|
||||||
|
branch: ${{ github.head_ref }}
|
||||||
29
config/neovim/store/lazy-plugins/catppuccin-nvim/.github/workflows/release.yml
vendored
Normal file
29
config/neovim/store/lazy-plugins/catppuccin-nvim/.github/workflows/release.yml
vendored
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
name: release
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
pull_request:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
release:
|
||||||
|
name: release
|
||||||
|
if: ${{ github.ref == 'refs/heads/main' }}
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: google-github-actions/release-please-action@v3
|
||||||
|
id: release
|
||||||
|
with:
|
||||||
|
release-type: simple
|
||||||
|
package-name: catppuccin
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: tag stable versions
|
||||||
|
if: ${{ steps.release.outputs.release_created }}
|
||||||
|
run: |
|
||||||
|
git config user.name github-actions[bot]
|
||||||
|
git config user.email github-actions[bot]@users.noreply.github.com
|
||||||
|
git remote add gh-token "https://${{ secrets.GITHUB_TOKEN }}@github.com/google-github-actions/release-please-action.git"
|
||||||
|
git tag -d stable || true
|
||||||
|
git push origin :stable || true
|
||||||
|
git tag -a stable -m "Last Stable Release"
|
||||||
|
git push origin stable
|
||||||
42
config/neovim/store/lazy-plugins/catppuccin-nvim/.github/workflows/tests.yml
vendored
Normal file
42
config/neovim/store/lazy-plugins/catppuccin-nvim/.github/workflows/tests.yml
vendored
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
---
|
||||||
|
name: Tests
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
push:
|
||||||
|
paths-ignore:
|
||||||
|
- "*.md"
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
workflow_dispatch:
|
||||||
|
schedule:
|
||||||
|
- cron: '0 0 * * *' # Run every day at midnight UTC
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
ubuntu:
|
||||||
|
name: Plenary
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
path: nvim
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
ref: user-configs
|
||||||
|
path: user-configs
|
||||||
|
- run: |
|
||||||
|
mv user-configs/tests/* nvim/tests/
|
||||||
|
- name: Install Neovim
|
||||||
|
uses: MunifTanjim/setup-neovim-action@v1
|
||||||
|
with:
|
||||||
|
tag: nightly
|
||||||
|
- name: Fetch dependencies
|
||||||
|
run: |
|
||||||
|
git clone --depth 1 https://github.com/nvim-lua/plenary.nvim ~/.local/share/nvim/site/pack/vendor/start/plenary.nvim
|
||||||
|
ln -s $(pwd) ~/.local/share/nvim/site/pack/vendor/start
|
||||||
|
- name: Run tests
|
||||||
|
working-directory: ./nvim
|
||||||
|
run: |
|
||||||
|
nvim --version
|
||||||
|
[ ! -d tests ] && exit 0
|
||||||
|
nvim --headless -u tests/minimal_init.vim -c "PlenaryBustedDirectory tests/ {minimal_init = 'tests/minimal_init.vim', sequential = true}"
|
||||||
58
config/neovim/store/lazy-plugins/catppuccin-nvim/.github/workflows/vim.yml
vendored
Normal file
58
config/neovim/store/lazy-plugins/catppuccin-nvim/.github/workflows/vim.yml
vendored
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
---
|
||||||
|
name: Vim
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
push:
|
||||||
|
paths-ignore:
|
||||||
|
- "*.md"
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
ubuntu:
|
||||||
|
name: Ubuntu
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Install Vim
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install vim-gtk lua5.4
|
||||||
|
curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
||||||
|
- name: Run vim
|
||||||
|
run: |
|
||||||
|
vim --version
|
||||||
|
vim -u tests/init.vim
|
||||||
|
macos:
|
||||||
|
name: Macos
|
||||||
|
runs-on: macos-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Install Vim
|
||||||
|
run: |
|
||||||
|
brew install vim
|
||||||
|
curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
||||||
|
- name: Run vim
|
||||||
|
run: |
|
||||||
|
vim --version
|
||||||
|
vim -u tests/init.vim
|
||||||
|
windows:
|
||||||
|
name: Windows
|
||||||
|
runs-on: windows-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Install Vim
|
||||||
|
run: |
|
||||||
|
choco install vim
|
||||||
|
C:\msys64\usr\bin\wget.exe -q https://downloads.sourceforge.net/project/luabinaries/5.4.2/Tools%20Executables/lua-5.4.2_Win64_bin.zip
|
||||||
|
7z x lua-5.4.2_Win64_bin.zip
|
||||||
|
move lua54.dll C:\Windows\System32\
|
||||||
|
iwr -useb https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim |`
|
||||||
|
ni $HOME/vimfiles/autoload/plug.vim -Force
|
||||||
|
- name: Run vim
|
||||||
|
run: |
|
||||||
|
vim --version
|
||||||
|
gvim -u tests/init.vim
|
||||||
4
config/neovim/store/lazy-plugins/catppuccin-nvim/.gitignore
vendored
Normal file
4
config/neovim/store/lazy-plugins/catppuccin-nvim/.gitignore
vendored
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
doc/tags
|
||||||
|
.vscode/
|
||||||
|
.DS_Store
|
||||||
|
.repro
|
||||||
205
config/neovim/store/lazy-plugins/catppuccin-nvim/CHANGELOG.md
Normal file
205
config/neovim/store/lazy-plugins/catppuccin-nvim/CHANGELOG.md
Normal file
@ -0,0 +1,205 @@
|
|||||||
|
# Changelog
|
||||||
|
|
||||||
|
## [1.9.0](https://github.com/catppuccin/nvim/compare/v1.8.0...v1.9.0) (2024-08-09)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* add fzf-lua integration ([#746](https://github.com/catppuccin/nvim/issues/746)) ([05206bb](https://github.com/catppuccin/nvim/commit/05206bbb6d500a339cd55a9486532c3871a4455e))
|
||||||
|
* add lir.nvim and lir-git-status.nvim integration ([#705](https://github.com/catppuccin/nvim/issues/705)) ([d3907de](https://github.com/catppuccin/nvim/commit/d3907deedf74d1d5bd3bb990bff2db2ebc916c56))
|
||||||
|
* add markdown.nvim integration ([ba41328](https://github.com/catppuccin/nvim/commit/ba413282677e1027a42d6ff585115d3e1df12b66))
|
||||||
|
* add vim-dadbod-ui integration ([#747](https://github.com/catppuccin/nvim/issues/747)) ([4db4c77](https://github.com/catppuccin/nvim/commit/4db4c77cc17d23aa90b393f3e550ce99b9e903d5))
|
||||||
|
* **render-markdown:** add highlights for callouts ([03a2f35](https://github.com/catppuccin/nvim/commit/03a2f354456373c199eb7829fd14120cc2099108))
|
||||||
|
* **terminal:** highlight `TermCursor` and `TermCursorNC` ([#749](https://github.com/catppuccin/nvim/issues/749)) ([548b2a2](https://github.com/catppuccin/nvim/commit/548b2a25415bb60e05c536b7658aa8ffbfeb3e45))
|
||||||
|
|
||||||
|
## [1.8.0](https://github.com/catppuccin/nvim/compare/v1.7.0...v1.8.0) (2024-07-25)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* add `grug-far.nvim` integration ([#735](https://github.com/catppuccin/nvim/issues/735)) ([07f1ee8](https://github.com/catppuccin/nvim/commit/07f1ee861394c163d1f1d3e1926eb309e0c81027))
|
||||||
|
* **bufferline:** add `indicator_visible` and `modified_visible` ([#716](https://github.com/catppuccin/nvim/issues/716)) ([cc8e290](https://github.com/catppuccin/nvim/commit/cc8e290d4c0d572171243087f8541e49be2c8764))
|
||||||
|
* **csv:** built-in rainbow highlighting ([#720](https://github.com/catppuccin/nvim/issues/720)) ([67565cd](https://github.com/catppuccin/nvim/commit/67565cd353fa543fa30cb738570c2e4c87da3e9c))
|
||||||
|
* **diffview:** add diffview integrations ([#700](https://github.com/catppuccin/nvim/issues/700)) ([182f256](https://github.com/catppuccin/nvim/commit/182f25640f85a3da2f1f22b088848d896a50fcce))
|
||||||
|
* **feline:** add lazy.nvim updates module, replace deprecated API ([#725](https://github.com/catppuccin/nvim/issues/725)) ([47bd419](https://github.com/catppuccin/nvim/commit/47bd419c0cb776cb0a67ebb525891eca44020b59))
|
||||||
|
* **feline:** allow to hide lazy.nvim updates ([#731](https://github.com/catppuccin/nvim/issues/731)) ([7946d1a](https://github.com/catppuccin/nvim/commit/7946d1a195c66fed38b3e34f9fa8e0c5a2da0700))
|
||||||
|
* **integration:** add colorful-winsep.nvim ([#701](https://github.com/catppuccin/nvim/issues/701)) ([30481d6](https://github.com/catppuccin/nvim/commit/30481d659b6524e6bcae0756201d737e5bc1f209))
|
||||||
|
* **mini:** add new highlight groups ([#721](https://github.com/catppuccin/nvim/issues/721)) ([6827a67](https://github.com/catppuccin/nvim/commit/6827a6763888f73df686f32c0e5ffb5b6b754d7b))
|
||||||
|
* **nvim-surround:** add integration ([#733](https://github.com/catppuccin/nvim/issues/733)) ([3f16c6d](https://github.com/catppuccin/nvim/commit/3f16c6d1f25bcb641f7b59f7108b9f4533974c41))
|
||||||
|
* support new "Ok" diagnostics ([5215ea5](https://github.com/catppuccin/nvim/commit/5215ea59df6d0a7e27da9a5cd1165e06d1b04cbe))
|
||||||
|
* **treesitter-content:** highlight line number ([#709](https://github.com/catppuccin/nvim/issues/709)) ([4edca6b](https://github.com/catppuccin/nvim/commit/4edca6bed2ccc2715317725985c692ef0a992a50))
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **dapui:** border match bg color ([#727](https://github.com/catppuccin/nvim/issues/727)) ([4ea0173](https://github.com/catppuccin/nvim/commit/4ea01738dc7b872f0081e7093e46d418d8d4c5a1))
|
||||||
|
* **defaults:** Enable mini integration by default ([894efb5](https://github.com/catppuccin/nvim/commit/894efb557728e532aa98b98029d16907a214ec05))
|
||||||
|
* **leap:** highlight group for LeapLabel ([2d3419c](https://github.com/catppuccin/nvim/commit/2d3419c2aead379b7d1854d32458f20ffaa58562))
|
||||||
|
* **neogit:** link WinSeparator ([#713](https://github.com/catppuccin/nvim/issues/713)) ([afccb3d](https://github.com/catppuccin/nvim/commit/afccb3d2377a3d6f0f65405899c9c23b1fd7cc28))
|
||||||
|
* small typo in feline.lua file ([#719](https://github.com/catppuccin/nvim/issues/719)) ([c0bea77](https://github.com/catppuccin/nvim/commit/c0bea773a09e49e123136b099bce9ddc1bf395d2))
|
||||||
|
* **treesitter:** highlight paths in `.gitignore` as text ([#736](https://github.com/catppuccin/nvim/issues/736)) ([4374588](https://github.com/catppuccin/nvim/commit/4374588df4e99d403a359cda2ddececcf645d8a9))
|
||||||
|
|
||||||
|
## [1.7.0](https://github.com/catppuccin/nvim/compare/v1.6.0...v1.7.0) (2024-04-13)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* add ability to toggle default integrations ([#687](https://github.com/catppuccin/nvim/issues/687)) ([e60e400](https://github.com/catppuccin/nvim/commit/e60e400c411519f29e203185ddda121d4ec8ef57))
|
||||||
|
* add support for `outline.nvim` plugin ([#647](https://github.com/catppuccin/nvim/issues/647)) ([048c18f](https://github.com/catppuccin/nvim/commit/048c18fc531703815f5e10765ea46ce9b2c75ae4))
|
||||||
|
* **defaults:** enable neotree ([c536623](https://github.com/catppuccin/nvim/commit/c536623eac60f8443c93ae4ca0e03b51574b5f50))
|
||||||
|
* **defaults:** enable treesitter context ([dc392c0](https://github.com/catppuccin/nvim/commit/dc392c067739326c3cff380a8c52b0f31319e6dd)), closes [#683](https://github.com/catppuccin/nvim/issues/683)
|
||||||
|
* **feline:** fix feline integration ([#685](https://github.com/catppuccin/nvim/issues/685)) ([07679af](https://github.com/catppuccin/nvim/commit/07679af1af4f446655682ee2557b5840ac551504))
|
||||||
|
* **feline:** improve feline lsp display ([#688](https://github.com/catppuccin/nvim/issues/688)) ([f66654d](https://github.com/catppuccin/nvim/commit/f66654d5d5190865333e8e46474c1593302c558e))
|
||||||
|
* **integration:** add reactive.nvim integration ([#654](https://github.com/catppuccin/nvim/issues/654)) ([151e478](https://github.com/catppuccin/nvim/commit/151e478edf8108cfd451a3cbd44d0a20503e7b42))
|
||||||
|
* **lsp:** add highlight for `LspCodeLensSeparator` ([#693](https://github.com/catppuccin/nvim/issues/693)) ([02bdd74](https://github.com/catppuccin/nvim/commit/02bdd749931a5d739063562e57531c118e081882))
|
||||||
|
* set `[@comment](https://github.com/comment).warning` that does not affect readability in gitcommit ([#675](https://github.com/catppuccin/nvim/issues/675)) ([045e349](https://github.com/catppuccin/nvim/commit/045e3499d9ec8d84635fb08877ae44fd33f6a38d))
|
||||||
|
* **treesitter:** add styles.miscs to disable hardcoded italics ([#659](https://github.com/catppuccin/nvim/issues/659)) ([c0de3b4](https://github.com/catppuccin/nvim/commit/c0de3b46811fe1ce3912e2245a9dfbea6b41c300))
|
||||||
|
* **treesitter:** follow upstream captures ([#630](https://github.com/catppuccin/nvim/issues/630)) ([f288876](https://github.com/catppuccin/nvim/commit/f288876c6d05d3bb91b0e72b8031fe9e26ef05b8))
|
||||||
|
* **treesitter:** follow upstream captures ([#694](https://github.com/catppuccin/nvim/issues/694)) ([08c6417](https://github.com/catppuccin/nvim/commit/08c6417bdc3b29e5f8c53e2cfe4067f288d49a54))
|
||||||
|
* use a more distinguishable color for todos ([#645](https://github.com/catppuccin/nvim/issues/645)) ([657cc4f](https://github.com/catppuccin/nvim/commit/657cc4f35cf193cadac7e5471eb802c97e7a1b59))
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **compile:** string.dump isn't deterministic ([836de8b](https://github.com/catppuccin/nvim/commit/836de8bc1898250b69332e66cbe993058870f849)), closes [#664](https://github.com/catppuccin/nvim/issues/664)
|
||||||
|
* **dropbar:** correct keyword highlight link ([#652](https://github.com/catppuccin/nvim/issues/652)) ([afab7ec](https://github.com/catppuccin/nvim/commit/afab7ec2a79c7127627dede79c0018b6e45663d0))
|
||||||
|
* ensure consistency between JSX and HTML markup ([#660](https://github.com/catppuccin/nvim/issues/660)) ([9703f22](https://github.com/catppuccin/nvim/commit/9703f227bfab20d04bcee62d2f08f1795723b4ae))
|
||||||
|
* **flavour:** g:catppuccin_flavour backwards compatibility ([fc98570](https://github.com/catppuccin/nvim/commit/fc98570d85ae772e56dc42cf8d7d6a497a909bdb))
|
||||||
|
* **flavour:** respect terminal's background ([#696](https://github.com/catppuccin/nvim/issues/696)) ([d5760c5](https://github.com/catppuccin/nvim/commit/d5760c53ae3b48f0f539298ec4165adc5c0afb19))
|
||||||
|
* **illuminate:** update type ([#690](https://github.com/catppuccin/nvim/issues/690)) ([30930f9](https://github.com/catppuccin/nvim/commit/30930f9656cffd068bcf52ced70cdfffd1e83a44))
|
||||||
|
* **integrations:** respect default options ([c2e6f8e](https://github.com/catppuccin/nvim/commit/c2e6f8e7eb8d0ebf55700c89bdf842809aeecf09))
|
||||||
|
* **neotree:** add `NeoTreeModified` ([#642](https://github.com/catppuccin/nvim/issues/642)) ([6853cc8](https://github.com/catppuccin/nvim/commit/6853cc8e6efc76e85e10ec153d05fc2520653508))
|
||||||
|
* **neotree:** blend sidebar with win separator ([56fb982](https://github.com/catppuccin/nvim/commit/56fb98218d22d5c326387bf9e4076227e7372e6b)), closes [#670](https://github.com/catppuccin/nvim/issues/670)
|
||||||
|
* repair treesitter underlined text (`Underline` -> `Underlined`) ([#663](https://github.com/catppuccin/nvim/issues/663)) ([42b687c](https://github.com/catppuccin/nvim/commit/42b687c42a35633366ed45e562bf921fb914048b))
|
||||||
|
* respect background variable on startup ([6b7a4df](https://github.com/catppuccin/nvim/commit/6b7a4dfdf241c8be0af6ec691b302e85cce03cab))
|
||||||
|
* **semantic_tokens:** namespace -> module ([196f301](https://github.com/catppuccin/nvim/commit/196f301de06090c40d7f98297675ac38ae7d6675))
|
||||||
|
* **treesitter:** some captures missing leading `@` ([#650](https://github.com/catppuccin/nvim/issues/650)) ([bc1f215](https://github.com/catppuccin/nvim/commit/bc1f2151f23227ba02ac203c2c59ad693352a741))
|
||||||
|
* use external index for lsp counting ([c3572a9](https://github.com/catppuccin/nvim/commit/c3572a968a79b64bd0ef16f2c3e93014f112e66d))
|
||||||
|
* wrong color shown when using color_overrides ([#658](https://github.com/catppuccin/nvim/issues/658)) ([b76ada8](https://github.com/catppuccin/nvim/commit/b76ada82bf2019d5e343018b4104cc9266900c16)), closes [#657](https://github.com/catppuccin/nvim/issues/657)
|
||||||
|
|
||||||
|
## [1.6.0](https://github.com/catppuccin/nvim/compare/v1.5.0...v1.6.0) (2023-12-28)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* add `WinSeparator` highlight group ([#623](https://github.com/catppuccin/nvim/issues/623)) ([988c0b2](https://github.com/catppuccin/nvim/commit/988c0b2dde4140572ed37c6b8b5d5deac0219f9f))
|
||||||
|
* **bufferline:** support `no_underline` option ([#601](https://github.com/catppuccin/nvim/issues/601)) ([f7638a1](https://github.com/catppuccin/nvim/commit/f7638a1a65cbffdd01a9ddac0018a20ec4be29e2))
|
||||||
|
* **dashboard:** add highlight groups for `doom` theme ([#593](https://github.com/catppuccin/nvim/issues/593)) ([3bdd5e8](https://github.com/catppuccin/nvim/commit/3bdd5e8296971f8c7ba5e499dac8247c3d621508))
|
||||||
|
* **integrations:** enable dap & dap_ui by default ([64dc309](https://github.com/catppuccin/nvim/commit/64dc309bc157779691be38bbfc5123584e0a4a85))
|
||||||
|
* **lualine:** darken lualine `b` section for better readability ([#606](https://github.com/catppuccin/nvim/issues/606)) ([32ee05d](https://github.com/catppuccin/nvim/commit/32ee05d014a4611555c7f56a73283efb4718d9c5))
|
||||||
|
* **mini.indentscope:** add scope color ([#592](https://github.com/catppuccin/nvim/issues/592)) ([795f639](https://github.com/catppuccin/nvim/commit/795f639ac50d6b8400c1d5868fca54844d579f37))
|
||||||
|
* **neogit:** support new highlight groups ([#610](https://github.com/catppuccin/nvim/issues/610)) ([f90c7c0](https://github.com/catppuccin/nvim/commit/f90c7c0c467722dc7acacbae3c3904720e09efb6))
|
||||||
|
* **notify:** add `NotifyBackground` hl group ([#637](https://github.com/catppuccin/nvim/issues/637)) ([c7cf3af](https://github.com/catppuccin/nvim/commit/c7cf3afe2eb6d9058eec4abb3ace2c1da006478a))
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **airline:** missing refresh function ([dcef0a0](https://github.com/catppuccin/nvim/commit/dcef0a062de380885193fb0f919217d58b979753)), closes [#594](https://github.com/catppuccin/nvim/issues/594)
|
||||||
|
* **dashboard:** `orange` -> `peach` ([54002a1](https://github.com/catppuccin/nvim/commit/54002a1adfd543f54352b3ec79d4e62c4163e9ee))
|
||||||
|
* **flash:** link `FlashPrompt` to `NormalFloat` ([#605](https://github.com/catppuccin/nvim/issues/605)) ([40dc9f0](https://github.com/catppuccin/nvim/commit/40dc9f0621c55bd40da4ad0731fac44d15bb393a))
|
||||||
|
* **lualine:** match lualine mode colors for insert and terminal ([#597](https://github.com/catppuccin/nvim/issues/597)) ([ea52fe8](https://github.com/catppuccin/nvim/commit/ea52fe8a0b1e4a820df0d0cf9a6a5a0e18c3eaa0))
|
||||||
|
* **neogit:** remove `NeogitCursorLine` from integration ([#613](https://github.com/catppuccin/nvim/issues/613)) ([5e4be43](https://github.com/catppuccin/nvim/commit/5e4be43e1a6acb044d5c55cd10f22461c40656ed))
|
||||||
|
* **neogit:** remove diff context highlight fg ([1b40f07](https://github.com/catppuccin/nvim/commit/1b40f072305be71b73c730ff5c7d881e638fd040)), closes [#627](https://github.com/catppuccin/nvim/issues/627)
|
||||||
|
* **neogit:** tweak diff context highlighting ([#614](https://github.com/catppuccin/nvim/issues/614)) ([cc717ac](https://github.com/catppuccin/nvim/commit/cc717acba29259d578548973c41448b092453c52))
|
||||||
|
* **neotree:** change color of untracked files ([#608](https://github.com/catppuccin/nvim/issues/608)) ([d7521f6](https://github.com/catppuccin/nvim/commit/d7521f6050b94cb0e23067f63829d86886f870fe))
|
||||||
|
* **neotree:** make popup titlebar text visible ([#618](https://github.com/catppuccin/nvim/issues/618)) ([919d1f7](https://github.com/catppuccin/nvim/commit/919d1f786338ebeced798afbf28cd085cd54542a))
|
||||||
|
* **noice:** respect transparency ([#632](https://github.com/catppuccin/nvim/issues/632)) ([4fbab1f](https://github.com/catppuccin/nvim/commit/4fbab1f01488718c3d54034a473d0346346b90e3))
|
||||||
|
* **selene:** allow mixed tables ([#611](https://github.com/catppuccin/nvim/issues/611)) ([9f3c13b](https://github.com/catppuccin/nvim/commit/9f3c13bbcf16fcaec3a429c03743a13e5923f3e3))
|
||||||
|
* sync focused and unfocused winbars ([#628](https://github.com/catppuccin/nvim/issues/628)) ([079500a](https://github.com/catppuccin/nvim/commit/079500a625f3ae5aa6efb758f1a17fe4c7a57e52))
|
||||||
|
* **vim:** resolve deprecation of nested [[ ([7a4bcda](https://github.com/catppuccin/nvim/commit/7a4bcdadafc59a5bedbd866c643fa486d8cca4a1))
|
||||||
|
|
||||||
|
## [1.5.0](https://github.com/catppuccin/nvim/compare/v1.4.0...v1.5.0) (2023-09-29)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* add kitty detection ([d3da439](https://github.com/catppuccin/nvim/commit/d3da43907d1896ba3e68a62f18820d1d12574317))
|
||||||
|
* add ufo integration ([1f53686](https://github.com/catppuccin/nvim/commit/1f536869b1a2ca1710fc892db84d7e8bbc6ad8d9))
|
||||||
|
* add workaround for kitty transparent issue ([#579](https://github.com/catppuccin/nvim/issues/579)) ([f36fa5c](https://github.com/catppuccin/nvim/commit/f36fa5cdce162450df88298a16631eeed16b68a3))
|
||||||
|
* **compile:** use indexed cmd ([85e9360](https://github.com/catppuccin/nvim/commit/85e93601e0f0b48aa2c6bbfae4d0e9d7a1898280))
|
||||||
|
* **illuminate:** enabled by default and optional lsp option ([5b44baa](https://github.com/catppuccin/nvim/commit/5b44baa4aff0ff45c042620ee960d283a79807a1)), closes [#571](https://github.com/catppuccin/nvim/issues/571)
|
||||||
|
* **indent-blankline:** update to v3, add scope color ([#585](https://github.com/catppuccin/nvim/issues/585)) ([f04336b](https://github.com/catppuccin/nvim/commit/f04336ba4a2400ee2c5250068b39541652c0962f))
|
||||||
|
* **integrations:** add NormalNvim ([0e3c128](https://github.com/catppuccin/nvim/commit/0e3c128eea8a7de692778d52b8429817df5c9040)), closes [#580](https://github.com/catppuccin/nvim/issues/580)
|
||||||
|
* **integrations:** add notifier.nvim ([d029098](https://github.com/catppuccin/nvim/commit/d029098e124f6201a07298c0c1c499ed8d5aef76)), closes [#574](https://github.com/catppuccin/nvim/issues/574)
|
||||||
|
* **lib:** soft deprecate highlighter ([8202348](https://github.com/catppuccin/nvim/commit/82023485fec1703d6f700a4b2a92fd431d4882f4))
|
||||||
|
* **syntax:** respect style guide part 3 ([#576](https://github.com/catppuccin/nvim/issues/576)) ([81096ca](https://github.com/catppuccin/nvim/commit/81096cabe67f360acb06d64c0f7db8dd840afeba))
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **coc:** improve inlay hints ([#582](https://github.com/catppuccin/nvim/issues/582)) ([3d9a5ed](https://github.com/catppuccin/nvim/commit/3d9a5ed556e289bce6c1fb0af89ec838360641b2))
|
||||||
|
* **editor:** invisible fold with transparent ([1c15c5e](https://github.com/catppuccin/nvim/commit/1c15c5e51a998c9198d63c6d2b75e9d1e4a84541)), closes [#577](https://github.com/catppuccin/nvim/issues/577)
|
||||||
|
* **template:** broken tmux italic gist link ([128e0d2](https://github.com/catppuccin/nvim/commit/128e0d27946491da979e2e04f5a4acf330ccdefd))
|
||||||
|
* **treesitter:** invalid string in type builtin ([135f9b0](https://github.com/catppuccin/nvim/commit/135f9b01386fa18da6d75c16ceb83e1aa3669430))
|
||||||
|
* **ufo:** use folded ellipsis ([846388d](https://github.com/catppuccin/nvim/commit/846388d137590e653390ce2f84fea5351a7516ac))
|
||||||
|
* **vim:** add vim.env index ([1786287](https://github.com/catppuccin/nvim/commit/17862877792db104d48c3260aec0ace92d55f863))
|
||||||
|
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* **compile:** reduce else statement ([a937d54](https://github.com/catppuccin/nvim/commit/a937d546f4783a1ff67f84043d2d7871ad4ecd83))
|
||||||
|
|
||||||
|
## [1.4.0](https://github.com/catppuccin/nvim/compare/v1.3.0...v1.4.0) (2023-08-21)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* add ability to enable/disable all integrations by default ([#552](https://github.com/catppuccin/nvim/issues/552)) ([737f60a](https://github.com/catppuccin/nvim/commit/737f60a3a25c79d9bb9574092f6c6c958a3d747a))
|
||||||
|
* add flash.nvim integration ([#550](https://github.com/catppuccin/nvim/issues/550)) ([381eddd](https://github.com/catppuccin/nvim/commit/381edddc4ad12126cfa7276818bca07c3d5606ed))
|
||||||
|
* enable neogit by default ([91f9f6f](https://github.com/catppuccin/nvim/commit/91f9f6fb413caff2bd06e326ec174deee1c1b7a9)), closes [#568](https://github.com/catppuccin/nvim/issues/568)
|
||||||
|
* **flash:** enable by default ([#551](https://github.com/catppuccin/nvim/issues/551)) ([a84ee18](https://github.com/catppuccin/nvim/commit/a84ee1848bfac4601771805396552bdbaa0a0e91))
|
||||||
|
* **gitsigns:** Support GitSignsCurrentLineBlame highlights ([#567](https://github.com/catppuccin/nvim/issues/567)) ([3fdd394](https://github.com/catppuccin/nvim/commit/3fdd3942567503d23b65ccc21e7d7757334defd5))
|
||||||
|
* **lspsaga:** support v0.3 ([#543](https://github.com/catppuccin/nvim/issues/543)) ([3ffd2f5](https://github.com/catppuccin/nvim/commit/3ffd2f511f3dc6c01258923d7170ccaf1445634b))
|
||||||
|
* **lspsaga:** upstream new hl groups ([#544](https://github.com/catppuccin/nvim/issues/544)) ([e0dd3f9](https://github.com/catppuccin/nvim/commit/e0dd3f9bb1513c98ab4ef9404ea26e18babf858a))
|
||||||
|
* **neogit:** update highlights ([#545](https://github.com/catppuccin/nvim/issues/545)) ([#549](https://github.com/catppuccin/nvim/issues/549)) ([371430f](https://github.com/catppuccin/nvim/commit/371430f32f2637d2dd5796399b3982d4cada61d8))
|
||||||
|
* **telescope:** make nvchad style great again ([#538](https://github.com/catppuccin/nvim/issues/538)) ([51961da](https://github.com/catppuccin/nvim/commit/51961da41e8189ca6f9ed73f37dfa83087b4e65c))
|
||||||
|
* **treesitter-context:** add color for normal background ([#564](https://github.com/catppuccin/nvim/issues/564)) ([b1caff9](https://github.com/catppuccin/nvim/commit/b1caff988fb395c0aae585cecff58b1ffa0a21c6))
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* don't highlight fg of `PmenuSel` ([#554](https://github.com/catppuccin/nvim/issues/554)) ([6425df1](https://github.com/catppuccin/nvim/commit/6425df128d46f2db2cccf9aa7a66ca2823c1d153))
|
||||||
|
* highlight NonText characters ([#547](https://github.com/catppuccin/nvim/issues/547)) ([bfe91df](https://github.com/catppuccin/nvim/commit/bfe91dfb3a19ffd4445e43611fcde68acbb3fed4))
|
||||||
|
* **integration_default:** hotfix for [#559](https://github.com/catppuccin/nvim/issues/559) ([4913a8b](https://github.com/catppuccin/nvim/commit/4913a8b47554a89a71ed44da39fc1f6e5c2841c3))
|
||||||
|
* **integration_default:** override `enabled` key only if integration has one ([#559](https://github.com/catppuccin/nvim/issues/559)) ([9709f82](https://github.com/catppuccin/nvim/commit/9709f8251a40e874238d6f9436cf4fba654b60e1))
|
||||||
|
* **noice:** set background blend to 0 for mini popups ([#556](https://github.com/catppuccin/nvim/issues/556)) ([2d50a4e](https://github.com/catppuccin/nvim/commit/2d50a4e3aecffea4144801bb3c0a3cf7b88fdd6b))
|
||||||
|
* **nvim-window-picker:** missing table keys ([#569](https://github.com/catppuccin/nvim/issues/569)) ([b9e4dae](https://github.com/catppuccin/nvim/commit/b9e4dae160bf9bc28d4ceb6d29a7e0134b107724))
|
||||||
|
* **options:** disable deprecated ts_rainbow and ts_rainbow2 by default ([096385d](https://github.com/catppuccin/nvim/commit/096385dd024ecd1332659916fd7f09d7d18d7374))
|
||||||
|
* **telescope:** keep consistency between the two styles ([#540](https://github.com/catppuccin/nvim/issues/540)) ([dfbc8e2](https://github.com/catppuccin/nvim/commit/dfbc8e2b478a65104d34556698067f2d40f1c227))
|
||||||
|
* **telescope:** respect transparency ([#542](https://github.com/catppuccin/nvim/issues/542)) ([f36af06](https://github.com/catppuccin/nvim/commit/f36af062e3242f333b12fe9b730053fdda36e000))
|
||||||
|
* **treesitter:** avoid possible nil ([17ae783](https://github.com/catppuccin/nvim/commit/17ae783b88bb7ae73dc004370473138d9d43ee46))
|
||||||
|
* **types:** make all options besides nested `enabled` optional ([#565](https://github.com/catppuccin/nvim/issues/565)) ([490078b](https://github.com/catppuccin/nvim/commit/490078b1593c6609e6a50ad5001e7902ea601824))
|
||||||
|
|
||||||
|
## [1.3.0](https://github.com/catppuccin/nvim/compare/v1.2.0...v1.3.0) (2023-07-10)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* auto-sync upstream palettes ([#507](https://github.com/catppuccin/nvim/issues/507)) ([8426d3b](https://github.com/catppuccin/nvim/commit/8426d3bfd55f4dc68ae451a82927d2ff88e47e95))
|
||||||
|
* **debug:** add auto compile on save ([c9cc5a9](https://github.com/catppuccin/nvim/commit/c9cc5a997f1dae3f35b4bdd62f35958fee363ab4))
|
||||||
|
* **dropbar:** add new highlight groups ([4f22a1e](https://github.com/catppuccin/nvim/commit/4f22a1e78460ae06e78a1085a8e0e6cc8027aef2)), closes [#503](https://github.com/catppuccin/nvim/issues/503)
|
||||||
|
* **integration:** add dropbar.nvim ([#499](https://github.com/catppuccin/nvim/issues/499)) ([e86aeb8](https://github.com/catppuccin/nvim/commit/e86aeb8ca0f03e97192074fba9dc6c836f953a83))
|
||||||
|
* **integrations:** accept both boolean and table config ([#534](https://github.com/catppuccin/nvim/issues/534)) ([f0b947a](https://github.com/catppuccin/nvim/commit/f0b947ab8cfdb9ca7ba6230b30bbc1ed48dd30a1))
|
||||||
|
* **integrations:** add rainbow_delimiters.nvim support ([#530](https://github.com/catppuccin/nvim/issues/530)) ([cc8d3ab](https://github.com/catppuccin/nvim/commit/cc8d3abc944d78cb6bf2a4cc88871ab383c4da62))
|
||||||
|
* **markdown:** add rainbow headlines ([#493](https://github.com/catppuccin/nvim/issues/493)) ([cc517bd](https://github.com/catppuccin/nvim/commit/cc517bdcb66a0f8dee90bab10ccdd651fa967bbe))
|
||||||
|
* **native_lsp:** add ability to disable background for inlay hints ([#518](https://github.com/catppuccin/nvim/issues/518)) ([b032ced](https://github.com/catppuccin/nvim/commit/b032cedb90c42a7bfbfbe2f91479505330f4a396))
|
||||||
|
* **native_lsp:** support inlay hints ([#516](https://github.com/catppuccin/nvim/issues/516)) ([d32b0bb](https://github.com/catppuccin/nvim/commit/d32b0bb5b1033920de5026e326869838aba856ee))
|
||||||
|
* **navic:** change text color ([278bfeb](https://github.com/catppuccin/nvim/commit/278bfeb61bd627dc2a8885180a0441a1ebe65a41))
|
||||||
|
* **semantic_tokens:** add some lsp semantic tokens ([#512](https://github.com/catppuccin/nvim/issues/512)) ([506a4aa](https://github.com/catppuccin/nvim/commit/506a4aa13443e0104ea49b99947cc09488d0791d))
|
||||||
|
* **telescope:** telescope flat style support ([#521](https://github.com/catppuccin/nvim/issues/521)) ([fc73faa](https://github.com/catppuccin/nvim/commit/fc73faa37bda393e3c4f846fb3e810a6ac8aae16))
|
||||||
|
* **types:** add type annotations ([#495](https://github.com/catppuccin/nvim/issues/495)) ([1d3eda1](https://github.com/catppuccin/nvim/commit/1d3eda15703ba70f57e94e6451db55914ff7017f))
|
||||||
|
* **workflows:** auto-sync upstream palettes ([e9fbeec](https://github.com/catppuccin/nvim/commit/e9fbeec106562475e82bae79304b6a421eee73f3))
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* calling palette before setup ([841d8ab](https://github.com/catppuccin/nvim/commit/841d8abf3be39de833d95a592a1fbbb1b9851296))
|
||||||
|
* **feline:** disable lsp status on nightly ([#510](https://github.com/catppuccin/nvim/issues/510)) ([9aaf5b4](https://github.com/catppuccin/nvim/commit/9aaf5b4ce5cd256695d8bbddb65869d19919abde))
|
||||||
|
* **feline:** use new `vim.lsp.status()` method ([#509](https://github.com/catppuccin/nvim/issues/509)) ([57ee09d](https://github.com/catppuccin/nvim/commit/57ee09dd532bd442b53d65c2b2f35550960981ed))
|
||||||
|
* **lsp:** do not link `LspInlayHint` to `Comment` directly ([#517](https://github.com/catppuccin/nvim/issues/517)) ([5dc566c](https://github.com/catppuccin/nvim/commit/5dc566c4206f383657d67500253559d3be82c421))
|
||||||
|
* **mapper:** remove unnecessary globals ([#529](https://github.com/catppuccin/nvim/issues/529)) ([c75562c](https://github.com/catppuccin/nvim/commit/c75562cbc954136f279ced91661251543b6f2a20))
|
||||||
|
* **native_lsp:** boolean logic ([#526](https://github.com/catppuccin/nvim/issues/526)) ([8d02781](https://github.com/catppuccin/nvim/commit/8d02781a638123394f9bc160aad47a9560a113f9))
|
||||||
|
* **tests:** shadowing variable ([15043d3](https://github.com/catppuccin/nvim/commit/15043d363729f1ef20e615c41bbd8b7e92c1453e))
|
||||||
|
* **treesitter_context:** underline content if `transparent_background` is true ([#519](https://github.com/catppuccin/nvim/issues/519)) ([6ecc158](https://github.com/catppuccin/nvim/commit/6ecc158dbf365d2cd290b58993296c42b3111965))
|
||||||
|
* **which-key:** wrong separator highlight group ([d438c01](https://github.com/catppuccin/nvim/commit/d438c0141609338140b18363a9a1e8eb8bb17130))
|
||||||
|
* **workflows:** stylua format ([2df7036](https://github.com/catppuccin/nvim/commit/2df7036c5c303c9184869936e40ca18935e4afcb))
|
||||||
21
config/neovim/store/lazy-plugins/catppuccin-nvim/LICENSE.md
Normal file
21
config/neovim/store/lazy-plugins/catppuccin-nvim/LICENSE.md
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2021 Catppuccin
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
1639
config/neovim/store/lazy-plugins/catppuccin-nvim/README.md
Normal file
1639
config/neovim/store/lazy-plugins/catppuccin-nvim/README.md
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,16 @@
|
|||||||
|
;; extends
|
||||||
|
[
|
||||||
|
(class_name)
|
||||||
|
] @property.class
|
||||||
|
|
||||||
|
[
|
||||||
|
(id_name)
|
||||||
|
] @property.id
|
||||||
|
|
||||||
|
[
|
||||||
|
(declaration
|
||||||
|
(plain_value) @string.plain)
|
||||||
|
]
|
||||||
|
[
|
||||||
|
(tag_name)
|
||||||
|
] @type.tag
|
||||||
@ -0,0 +1,4 @@
|
|||||||
|
;; extends
|
||||||
|
[
|
||||||
|
"export"
|
||||||
|
] @keyword.export
|
||||||
@ -0,0 +1,4 @@
|
|||||||
|
;; extends
|
||||||
|
[
|
||||||
|
"export"
|
||||||
|
] @keyword.export
|
||||||
@ -0,0 +1,72 @@
|
|||||||
|
let g:airline#themes#catppuccin#palette = {}
|
||||||
|
|
||||||
|
function! airline#themes#catppuccin#refresh()
|
||||||
|
let s:c = has("nvim") == 1 ? luaeval('require("catppuccin.palettes").get_palette()') : luaeval('vim.dict(require("catppuccin.palettes").get_palette())')
|
||||||
|
|
||||||
|
" Normal mode
|
||||||
|
" (Dark)
|
||||||
|
let s:N1 = [ s:c.mantle, s:c.blue, 59, 149 ] " guifg guibg ctermfg ctermbg
|
||||||
|
let s:N2 = [ s:c.blue, s:c.surface0, 149, 59 ] " guifg guibg ctermfg ctermbg
|
||||||
|
let s:N3 = [ s:c.text, s:c.mantle, 145, 16 ] " guifg guibg ctermfg ctermbg
|
||||||
|
|
||||||
|
" Insert mode
|
||||||
|
let s:I1 = [ s:c.mantle, s:c.teal, 59, 74 ] " guifg guibg ctermfg ctermbg
|
||||||
|
let s:I2 = [ s:c.teal, s:c.surface0, 74, 59 ] " guifg guibg ctermfg ctermbg
|
||||||
|
let s:I3 = [ s:c.text, s:c.mantle, 145, 16 ] " guifg guibg ctermfg ctermbg
|
||||||
|
|
||||||
|
" Visual mode
|
||||||
|
let s:V1 = [ s:c.mantle, s:c.mauve, 59, 209 ] " guifg guibg ctermfg ctermbg
|
||||||
|
let s:V2 = [ s:c.mauve, s:c.surface0, 209, 59 ] " guifg guibg ctermfg ctermbg
|
||||||
|
let s:V3 = [ s:c.text, s:c.mantle, 145, 16 ] " guifg guibg ctermfg ctermbg
|
||||||
|
|
||||||
|
" Replace mode
|
||||||
|
let s:R1 = [ s:c.mantle, s:c.red, 59, 203 ] " guifg guibg ctermfg ctermbg
|
||||||
|
let s:R2 = [ s:c.red, s:c.surface0, 203, 59 ] " guifg guibg ctermfg ctermbg
|
||||||
|
|
||||||
|
" Command mode
|
||||||
|
let s:C1 = [ s:c.base, s:c.peach, 59, 166 ] " guifg guibg ctermfg ctermbg
|
||||||
|
let s:C2 = [ s:c.peach, s:c.surface0, 166, 59 ] " guifg guibg ctermfg ctermbg
|
||||||
|
|
||||||
|
" Warning section
|
||||||
|
let s:WR = [s:c.mantle, s:c.peach, 232, 166 ]
|
||||||
|
|
||||||
|
" Error section
|
||||||
|
let s:ER = [s:c.mantle, s:c.red, 232, 166 ]
|
||||||
|
|
||||||
|
|
||||||
|
let g:airline#themes#catppuccin#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3)
|
||||||
|
|
||||||
|
let g:airline#themes#catppuccin#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3)
|
||||||
|
|
||||||
|
let g:airline#themes#catppuccin#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3)
|
||||||
|
|
||||||
|
let s:IA = [ s:N1[1], s:N3[1], s:N1[3], s:N3[3], '' ]
|
||||||
|
let g:airline#themes#catppuccin#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA)
|
||||||
|
|
||||||
|
let g:airline#themes#catppuccin#palette.normal.airline_warning = s:WR
|
||||||
|
let g:airline#themes#catppuccin#palette.insert.airline_warning = s:WR
|
||||||
|
let g:airline#themes#catppuccin#palette.visual.airline_warning = s:WR
|
||||||
|
|
||||||
|
let g:airline#themes#catppuccin#palette.normal.airline_warning_to_airline_error = s:WR
|
||||||
|
let g:airline#themes#catppuccin#palette.insert.airline_warning_to_airline_error = s:WR
|
||||||
|
let g:airline#themes#catppuccin#palette.visual.airline_warning_to_airline_error = s:WR
|
||||||
|
|
||||||
|
let g:airline#themes#catppuccin#palette.normal.airline_error = s:ER
|
||||||
|
let g:airline#themes#catppuccin#palette.insert.airline_error = s:ER
|
||||||
|
let g:airline#themes#catppuccin#palette.visual.airline_error = s:ER
|
||||||
|
|
||||||
|
" Fork replace mode from insert mode
|
||||||
|
let g:airline#themes#catppuccin#palette.replace = copy(g:airline#themes#catppuccin#palette.insert)
|
||||||
|
let g:airline#themes#catppuccin#palette.replace.airline_a = [ s:R1[0], s:R1[1], s:R1[2], s:R1[3], '' ]
|
||||||
|
let g:airline#themes#catppuccin#palette.replace.airline_b = [ s:R2[0], s:R2[1], s:R2[2], s:R2[3], '' ]
|
||||||
|
|
||||||
|
" Terminal mode is same as insert mode
|
||||||
|
let g:airline#themes#catppuccin#palette.terminal = copy(g:airline#themes#catppuccin#palette.insert)
|
||||||
|
|
||||||
|
" Fork command mode from normal mode
|
||||||
|
let g:airline#themes#catppuccin#palette.commandline = copy(g:airline#themes#catppuccin#palette.normal)
|
||||||
|
let g:airline#themes#catppuccin#palette.commandline.airline_a = [ s:C1[0], s:C1[1], s:C1[2], s:C1[3], '' ]
|
||||||
|
let g:airline#themes#catppuccin#palette.commandline.airline_b = [ s:C2[0], s:C2[1], s:C2[2], s:C2[3], '' ]
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
call airline#themes#catppuccin#refresh()
|
||||||
@ -0,0 +1,20 @@
|
|||||||
|
let s:c = has("nvim") == 1 ? luaeval('require("catppuccin.palettes").get_palette()') : luaeval('vim.dict(require("catppuccin.palettes").get_palette())')
|
||||||
|
|
||||||
|
let s:p = {}
|
||||||
|
|
||||||
|
let s:p.display = { 'guibg': s:c.mantle }
|
||||||
|
|
||||||
|
let s:p.input = s:p.display
|
||||||
|
let s:p.indicator = { 'guifg': s:c.subtext1, 'guibg': s:c.mantle }
|
||||||
|
let s:p.spinner = { 'guifg': s:c.yellow, 'guibg': s:c.mantle, 'gui': "bold" }
|
||||||
|
let s:p.search_text = { 'guifg': s:c.text, 'guibg': s:c.mantle, 'gui': "bold" }
|
||||||
|
|
||||||
|
let s:p.preview = { 'guibg': s:c.base }
|
||||||
|
|
||||||
|
let s:p.selected = { 'guifg': s:c.sapphire, 'gui': "bold,underline" }
|
||||||
|
let s:p.current_selection = { 'guibg': s:c.surface0, 'gui': "bold" }
|
||||||
|
|
||||||
|
let s:p.selected_sign = { 'guifg': s:c.red }
|
||||||
|
let s:p.current_selection_sign = copy(s:p.selected_sign)
|
||||||
|
|
||||||
|
let g:clap#themes#catppuccin#palette = s:p
|
||||||
@ -0,0 +1,22 @@
|
|||||||
|
let s:c = has("nvim") == 1 ? luaeval('require("catppuccin.palettes").get_palette()') : luaeval('vim.dict(require("catppuccin.palettes").get_palette())')
|
||||||
|
|
||||||
|
let s:p = {'normal': {}, 'inactive': {}, 'insert': {}, 'replace': {}, 'visual': {}, 'tabline': {}}
|
||||||
|
let s:p.normal.left = [ [ s:c.mantle, s:c.blue ], [ s:c.blue, s:c.base ] ]
|
||||||
|
let s:p.normal.middle = [ [ s:c.blue, s:c.mantle ] ]
|
||||||
|
let s:p.normal.right = [ [ s:c.overlay0, s:c.base ], [ s:c.blue, s:c.surface0 ] ]
|
||||||
|
let s:p.insert.left = [ [ s:c.mantle, s:c.teal ], [ s:c.blue, s:c.base ] ]
|
||||||
|
let s:p.visual.left = [ [ s:c.mantle, s:c.mauve ], [ s:c.blue, s:c.base ] ]
|
||||||
|
let s:p.replace.left = [ [ s:c.mantle, s:c.red ], [ s:c.blue, s:c.base ] ]
|
||||||
|
|
||||||
|
let s:p.inactive.left = [ [ s:c.blue, s:c.base ], [ s:c.overlay0, s:c.base ] ]
|
||||||
|
let s:p.inactive.middle = [ [ s:c.surface1, s:c.base ] ]
|
||||||
|
let s:p.inactive.right = [ [ s:c.surface1, s:c.base ], [ s:c.overlay0, s:c.base ] ]
|
||||||
|
|
||||||
|
let s:p.tabline.left = [ [ s:c.overlay0, s:c.base ], [ s:c.overlay0, s:c.base ] ]
|
||||||
|
let s:p.tabline.tabsel = [ [ s:c.blue, s:c.surface1 ], [ s:c.overlay0, s:c.base] ]
|
||||||
|
let s:p.tabline.middle = [ [ s:c.surface1, s:c.base ] ]
|
||||||
|
let s:p.tabline.right = copy(s:p.inactive.right)
|
||||||
|
let s:p.normal.error = [ [ s:c.mantle, s:c.red ] ]
|
||||||
|
let s:p.normal.warning = [ [ s:c.mantle, s:c.yellow ] ]
|
||||||
|
|
||||||
|
let g:lightline#colorscheme#catppuccin#palette = lightline#colorscheme#fill(s:p)
|
||||||
@ -0,0 +1 @@
|
|||||||
|
lua require("catppuccin").load "frappe"
|
||||||
@ -0,0 +1 @@
|
|||||||
|
lua require("catppuccin").load "latte"
|
||||||
@ -0,0 +1 @@
|
|||||||
|
lua require("catppuccin").load "macchiato"
|
||||||
@ -0,0 +1 @@
|
|||||||
|
lua require("catppuccin").load "mocha"
|
||||||
@ -0,0 +1 @@
|
|||||||
|
lua require("catppuccin").load()
|
||||||
@ -0,0 +1,952 @@
|
|||||||
|
*catppuccin.txt* Soothing pastel theme for NeoVim
|
||||||
|
|
||||||
|
==============================================================================
|
||||||
|
Table of Contents *catppuccin-table-of-contents*
|
||||||
|
|
||||||
|
1. Features |catppuccin-features|
|
||||||
|
2. Installation |catppuccin-installation|
|
||||||
|
3. Usage |catppuccin-usage|
|
||||||
|
4. Configuration |catppuccin-configuration|
|
||||||
|
5. Customize highlights |catppuccin-customize-highlights|
|
||||||
|
- Get catppuccin colors|catppuccin-customize-highlights-get-catppuccin-colors|
|
||||||
|
- Overwriting colors |catppuccin-customize-highlights-overwriting-colors|
|
||||||
|
- Overwriting highlight groups|catppuccin-customize-highlights-overwriting-highlight-groups|
|
||||||
|
6. Integrations |catppuccin-integrations|
|
||||||
|
7. Compile |catppuccin-compile|
|
||||||
|
8. FAQ |catppuccin-faq|
|
||||||
|
- Wrong treesitter highlights |catppuccin-faq-wrong-treesitter-highlights|
|
||||||
|
- Colors doesn’t match preview screenshots|catppuccin-faq-colors-doesn’t-match-preview-screenshots|
|
||||||
|
9. Thanks to |catppuccin-thanks-to|
|
||||||
|
10. Links |catppuccin-links|
|
||||||
|
|
||||||
|
==============================================================================
|
||||||
|
1. Features *catppuccin-features*
|
||||||
|
|
||||||
|
- Supports both vim and neovim (Requires neovim <https://github.com/neovim/neovim/> >= 0.8 or vim <https://github.com/vim/vim> >= 9 compiled with lua <https://github.com/lua/lua> >= 5.1)
|
||||||
|
- Highly configurable with 4 different flavours and ability to create your own! <https://github.com/catppuccin/nvim/discussions/323>
|
||||||
|
- Compile <https://github.com/catppuccin/nvim#Compile> user config for fastest startuptime <https://www.reddit.com/r/neovim/comments/xxfpt3/catppuccinnvim_now_startup_in_1ms/>
|
||||||
|
- Integrations with lsp, treesitter and a bunch of plugins <https://github.com/catppuccin/nvim#integrations>
|
||||||
|
- Supports for many other applications <https://github.com/catppuccin/catppuccin>
|
||||||
|
|
||||||
|
|
||||||
|
==============================================================================
|
||||||
|
2. Installation *catppuccin-installation*
|
||||||
|
|
||||||
|
lazy.nvim <https://github.com/folke/lazy.nvim>
|
||||||
|
|
||||||
|
>lua
|
||||||
|
{ "catppuccin/nvim", name = "catppuccin", priority = 1000 }
|
||||||
|
<
|
||||||
|
|
||||||
|
packer.nvim <https://github.com/wbthomason/packer.nvim>
|
||||||
|
|
||||||
|
>lua
|
||||||
|
use { "catppuccin/nvim", as = "catppuccin" }
|
||||||
|
<
|
||||||
|
|
||||||
|
vim-plug <https://github.com/junegunn/vim-plug>
|
||||||
|
|
||||||
|
>vim
|
||||||
|
Plug 'catppuccin/nvim', { 'as': 'catppuccin' }
|
||||||
|
<
|
||||||
|
|
||||||
|
|
||||||
|
==============================================================================
|
||||||
|
3. Usage *catppuccin-usage*
|
||||||
|
|
||||||
|
>vim
|
||||||
|
colorscheme catppuccin " catppuccin-latte, catppuccin-frappe, catppuccin-macchiato, catppuccin-mocha
|
||||||
|
<
|
||||||
|
|
||||||
|
>lua
|
||||||
|
vim.cmd.colorscheme "catppuccin"
|
||||||
|
<
|
||||||
|
|
||||||
|
|
||||||
|
==============================================================================
|
||||||
|
4. Configuration *catppuccin-configuration*
|
||||||
|
|
||||||
|
There is no need to call `setup` if you don’t want to change the default
|
||||||
|
options and settings.
|
||||||
|
|
||||||
|
>lua
|
||||||
|
require("catppuccin").setup({
|
||||||
|
flavour = "auto", -- latte, frappe, macchiato, mocha
|
||||||
|
background = { -- :h background
|
||||||
|
light = "latte",
|
||||||
|
dark = "mocha",
|
||||||
|
},
|
||||||
|
transparent_background = false, -- disables setting the background color.
|
||||||
|
show_end_of_buffer = false, -- shows the '~' characters after the end of buffers
|
||||||
|
term_colors = false, -- sets terminal colors (e.g. `g:terminal_color_0`)
|
||||||
|
dim_inactive = {
|
||||||
|
enabled = false, -- dims the background color of inactive window
|
||||||
|
shade = "dark",
|
||||||
|
percentage = 0.15, -- percentage of the shade to apply to the inactive window
|
||||||
|
},
|
||||||
|
no_italic = false, -- Force no italic
|
||||||
|
no_bold = false, -- Force no bold
|
||||||
|
no_underline = false, -- Force no underline
|
||||||
|
styles = { -- Handles the styles of general hi groups (see `:h highlight-args`):
|
||||||
|
comments = { "italic" }, -- Change the style of comments
|
||||||
|
conditionals = { "italic" },
|
||||||
|
loops = {},
|
||||||
|
functions = {},
|
||||||
|
keywords = {},
|
||||||
|
strings = {},
|
||||||
|
variables = {},
|
||||||
|
numbers = {},
|
||||||
|
booleans = {},
|
||||||
|
properties = {},
|
||||||
|
types = {},
|
||||||
|
operators = {},
|
||||||
|
-- miscs = {}, -- Uncomment to turn off hard-coded styles
|
||||||
|
},
|
||||||
|
color_overrides = {},
|
||||||
|
custom_highlights = {},
|
||||||
|
default_integrations = true,
|
||||||
|
integrations = {
|
||||||
|
cmp = true,
|
||||||
|
gitsigns = true,
|
||||||
|
nvimtree = true,
|
||||||
|
treesitter = true,
|
||||||
|
notify = false,
|
||||||
|
mini = {
|
||||||
|
enabled = true,
|
||||||
|
indentscope_color = "",
|
||||||
|
},
|
||||||
|
-- For more plugins integrations please scroll down (https://github.com/catppuccin/nvim#integrations)
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
-- setup must be called before loading
|
||||||
|
vim.cmd.colorscheme "catppuccin"
|
||||||
|
<
|
||||||
|
|
||||||
|
|
||||||
|
==============================================================================
|
||||||
|
5. Customize highlights *catppuccin-customize-highlights*
|
||||||
|
|
||||||
|
|
||||||
|
GET CATPPUCCIN COLORS *catppuccin-customize-highlights-get-catppuccin-colors*
|
||||||
|
|
||||||
|
>lua
|
||||||
|
local latte = require("catppuccin.palettes").get_palette "latte"
|
||||||
|
local frappe = require("catppuccin.palettes").get_palette "frappe"
|
||||||
|
local macchiato = require("catppuccin.palettes").get_palette "macchiato"
|
||||||
|
local mocha = require("catppuccin.palettes").get_palette "mocha"
|
||||||
|
<
|
||||||
|
|
||||||
|
Returns a table where the key is the name of the color and the value is its hex
|
||||||
|
value corresponding to each flavour.
|
||||||
|
|
||||||
|
|
||||||
|
OVERWRITING COLORS *catppuccin-customize-highlights-overwriting-colors*
|
||||||
|
|
||||||
|
Colors can be overwritten using `color_overrides` in the setting, checkout
|
||||||
|
https://github.com/catppuccin/nvim/discussions/323 for inspirations:
|
||||||
|
|
||||||
|
>lua
|
||||||
|
require("catppuccin").setup {
|
||||||
|
color_overrides = {
|
||||||
|
all = {
|
||||||
|
text = "#ffffff",
|
||||||
|
},
|
||||||
|
latte = {
|
||||||
|
base = "#ff0000",
|
||||||
|
mantle = "#242424",
|
||||||
|
crust = "#474747",
|
||||||
|
},
|
||||||
|
frappe = {},
|
||||||
|
macchiato = {},
|
||||||
|
mocha = {},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
<
|
||||||
|
|
||||||
|
|
||||||
|
[!Note] For more information check out our style-guide
|
||||||
|
<https://github.com/catppuccin/catppuccin/blob/main/docs/style-guide.md>
|
||||||
|
|
||||||
|
OVERWRITING HIGHLIGHT GROUPS*catppuccin-customize-highlights-overwriting-highlight-groups*
|
||||||
|
|
||||||
|
Global highlight groups can be overwritten in the setting, for example:
|
||||||
|
|
||||||
|
>lua
|
||||||
|
require("catppuccin").setup {
|
||||||
|
custom_highlights = function(colors)
|
||||||
|
return {
|
||||||
|
Comment = { fg = colors.flamingo },
|
||||||
|
TabLineSel = { bg = colors.pink },
|
||||||
|
CmpBorder = { fg = colors.surface2 },
|
||||||
|
Pmenu = { bg = colors.none },
|
||||||
|
}
|
||||||
|
end
|
||||||
|
}
|
||||||
|
<
|
||||||
|
|
||||||
|
Per flavour highlight groups can also be overwritten in the setting, for
|
||||||
|
example:
|
||||||
|
|
||||||
|
>lua
|
||||||
|
require("catppuccin").setup {
|
||||||
|
highlight_overrides = {
|
||||||
|
all = function(colors)
|
||||||
|
return {
|
||||||
|
NvimTreeNormal = { fg = colors.none },
|
||||||
|
CmpBorder = { fg = "#3e4145" },
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
latte = function(latte)
|
||||||
|
return {
|
||||||
|
Normal = { fg = latte.base },
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
frappe = function(frappe)
|
||||||
|
return {
|
||||||
|
["@comment"] = { fg = frappe.surface2, style = { "italic" } },
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
macchiato = function(macchiato)
|
||||||
|
return {
|
||||||
|
LineNr = { fg = macchiato.overlay1 },
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
mocha = function(mocha)
|
||||||
|
return {
|
||||||
|
Comment = { fg = mocha.flamingo },
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
<
|
||||||
|
|
||||||
|
|
||||||
|
==============================================================================
|
||||||
|
6. Integrations *catppuccin-integrations*
|
||||||
|
|
||||||
|
Catppuccin provides theme support for other plugins in the Neovim ecosystem and
|
||||||
|
extended Neovim functionality through _integrations_.
|
||||||
|
|
||||||
|
To enable/disable an integration you just need to set it to true/false, for
|
||||||
|
example:
|
||||||
|
|
||||||
|
>lua
|
||||||
|
require("catppuccin").setup({
|
||||||
|
integrations = {
|
||||||
|
cmp = true,
|
||||||
|
gitsigns = true,
|
||||||
|
nvimtree = true,
|
||||||
|
treesitter = true,
|
||||||
|
notify = false,
|
||||||
|
mini = {
|
||||||
|
enabled = true,
|
||||||
|
indentscope_color = "",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
<
|
||||||
|
|
||||||
|
Some integrations are enabled by default, you can control this behaviour with
|
||||||
|
`default_integrations` option.
|
||||||
|
|
||||||
|
>lua
|
||||||
|
require("catppuccin").setup({
|
||||||
|
default_integrations = false,
|
||||||
|
})
|
||||||
|
<
|
||||||
|
|
||||||
|
Below is a list of supported plugins and their corresponding integration
|
||||||
|
module.
|
||||||
|
|
||||||
|
|
||||||
|
[!Important] If you’d like to know which highlight groups are being affected
|
||||||
|
by catppuccin, check out this directory: `lua/catppuccin/groups/integrations/`
|
||||||
|
<https://github.com/catppuccin/nvim/tree/main/lua/catppuccin/groups/integrations>.
|
||||||
|
PluginDefaultaerial.nvim>lua
|
||||||
|
aerial = false
|
||||||
|
<
|
||||||
|
|
||||||
|
alpha-nvim>lua
|
||||||
|
alpha = true
|
||||||
|
<
|
||||||
|
|
||||||
|
barbar.nvim>lua
|
||||||
|
barbar = false
|
||||||
|
<
|
||||||
|
|
||||||
|
barbecue.nvim>lua
|
||||||
|
barbecue = {
|
||||||
|
dim_dirname = true, -- directory name is dimmed by default
|
||||||
|
bold_basename = true,
|
||||||
|
dim_context = false,
|
||||||
|
alt_background = false,
|
||||||
|
},
|
||||||
|
<
|
||||||
|
|
||||||
|
Special ~
|
||||||
|
|
||||||
|
Use this to set it up:
|
||||||
|
|
||||||
|
>lua
|
||||||
|
require("barbecue").setup {
|
||||||
|
theme = "catppuccin", -- catppuccin-latte, catppuccin-frappe, catppuccin-macchiato, catppuccin-mocha
|
||||||
|
}
|
||||||
|
<
|
||||||
|
|
||||||
|
beacon.nvim>lua
|
||||||
|
beacon = false
|
||||||
|
<
|
||||||
|
|
||||||
|
bufferline.nvimSpecial ~
|
||||||
|
|
||||||
|
Update your bufferline config to use the Catppuccin components:
|
||||||
|
|
||||||
|
|
||||||
|
[!NOTE] bufferline needs to be loaded after setting up catppuccin or it will
|
||||||
|
highlight incorrectly
|
||||||
|
>lua
|
||||||
|
use "akinsho/bufferline.nvim" {
|
||||||
|
after = "catppuccin",
|
||||||
|
config = function()
|
||||||
|
require("bufferline").setup {
|
||||||
|
highlights = require("catppuccin.groups.integrations.bufferline").get()
|
||||||
|
}
|
||||||
|
end
|
||||||
|
}
|
||||||
|
<
|
||||||
|
|
||||||
|
Configurations are self-explanatory, see |bufferline-highlights| for detailed
|
||||||
|
explanations:
|
||||||
|
|
||||||
|
>lua
|
||||||
|
local mocha = require("catppuccin.palettes").get_palette "mocha"
|
||||||
|
bufferline.setup {
|
||||||
|
highlights = require("catppuccin.groups.integrations.bufferline").get {
|
||||||
|
styles = { "italic", "bold" },
|
||||||
|
custom = {
|
||||||
|
all = {
|
||||||
|
fill = { bg = "#000000" },
|
||||||
|
},
|
||||||
|
mocha = {
|
||||||
|
background = { fg = mocha.text },
|
||||||
|
},
|
||||||
|
latte = {
|
||||||
|
background = { fg = "#000000" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
<
|
||||||
|
|
||||||
|
coc.nvim>lua
|
||||||
|
coc_nvim = false
|
||||||
|
<
|
||||||
|
|
||||||
|
Special ~
|
||||||
|
|
||||||
|
Setting `enabled` to `true` enables this integration.
|
||||||
|
|
||||||
|
>lua
|
||||||
|
coc_nvim = true,
|
||||||
|
<
|
||||||
|
|
||||||
|
|
||||||
|
[!Note] coc.nvim by default link to native lsp highlight groups so config from
|
||||||
|
`native_lsp` will also apply to coc
|
||||||
|
In the inners tables you can set the style for the diagnostics, both
|
||||||
|
`virtual_text` (what you see on the side) and `underlines` (what points
|
||||||
|
directly at the thing (e.g. an error)).
|
||||||
|
|
||||||
|
>lua
|
||||||
|
native_lsp = {
|
||||||
|
enabled = true,
|
||||||
|
virtual_text = {
|
||||||
|
errors = { "italic" },
|
||||||
|
hints = { "italic" },
|
||||||
|
warnings = { "italic" },
|
||||||
|
information = { "italic" },
|
||||||
|
ok = { "italic" },
|
||||||
|
},
|
||||||
|
underlines = {
|
||||||
|
errors = { "underline" },
|
||||||
|
hints = { "underline" },
|
||||||
|
warnings = { "underline" },
|
||||||
|
information = { "underline" },
|
||||||
|
ok = { "underline" },
|
||||||
|
},
|
||||||
|
inlay_hints = {
|
||||||
|
background = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
<
|
||||||
|
|
||||||
|
colorful-winsep.nvim>lua
|
||||||
|
colorful_winsep = {
|
||||||
|
enabled = false,
|
||||||
|
color = "red",
|
||||||
|
}
|
||||||
|
<
|
||||||
|
|
||||||
|
dashboard-nvim>lua
|
||||||
|
dashboard = true
|
||||||
|
<
|
||||||
|
|
||||||
|
diffview.nvim>lua
|
||||||
|
diffview = false
|
||||||
|
<
|
||||||
|
|
||||||
|
dropbar.nvim>lua
|
||||||
|
dropbar = {
|
||||||
|
enabled = false,
|
||||||
|
color_mode = false, -- enable color for kind's texts, not just kind's icons
|
||||||
|
},
|
||||||
|
<
|
||||||
|
|
||||||
|
feline.nvimSpecial ~
|
||||||
|
|
||||||
|
Update your Feline config to use the Catppuccin components:
|
||||||
|
|
||||||
|
>lua
|
||||||
|
local ctp_feline = require('catppuccin.groups.integrations.feline')
|
||||||
|
|
||||||
|
ctp_feline.setup()
|
||||||
|
|
||||||
|
require("feline").setup({
|
||||||
|
components = ctp_feline.get(),
|
||||||
|
})
|
||||||
|
<
|
||||||
|
|
||||||
|
Notice that calling `setup()` is optional. You may pass a lua table in order to
|
||||||
|
change assets, settings and the colors per vim mode.
|
||||||
|
|
||||||
|
Here are the defaults:
|
||||||
|
|
||||||
|
>lua
|
||||||
|
local clrs = require("catppuccin.palettes").get_palette()
|
||||||
|
local ctp_feline = require('catppuccin.groups.integrations.feline')
|
||||||
|
local U = require "catppuccin.utils.colors"
|
||||||
|
|
||||||
|
ctp_feline.setup({
|
||||||
|
assets = {
|
||||||
|
left_separator = "",
|
||||||
|
right_separator = "",
|
||||||
|
mode_icon = "",
|
||||||
|
dir = "",
|
||||||
|
file = "",
|
||||||
|
lsp = {
|
||||||
|
server = "",
|
||||||
|
error = "",
|
||||||
|
warning = "",
|
||||||
|
info = "",
|
||||||
|
hint = "",
|
||||||
|
},
|
||||||
|
git = {
|
||||||
|
branch = "",
|
||||||
|
added = "",
|
||||||
|
changed = "",
|
||||||
|
removed = "",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
sett = {
|
||||||
|
text = U.vary_color({ latte = latte.base }, clrs.surface0),
|
||||||
|
bkg = U.vary_color({ latte = latte.crust }, clrs.surface0),
|
||||||
|
diffs = clrs.mauve,
|
||||||
|
extras = clrs.overlay1,
|
||||||
|
curr_file = clrs.maroon,
|
||||||
|
curr_dir = clrs.flamingo,
|
||||||
|
show_modified = false -- show if the file has been modified
|
||||||
|
show_lazy_updates = false -- show the count of updatable plugins from lazy.nvim
|
||||||
|
-- need to set checker.enabled = true in lazy.nvim first
|
||||||
|
-- the icon is set in ui.icons.plugin in lazy.nvim
|
||||||
|
},
|
||||||
|
mode_colors = {
|
||||||
|
["n"] = { "NORMAL", clrs.lavender },
|
||||||
|
["no"] = { "N-PENDING", clrs.lavender },
|
||||||
|
["i"] = { "INSERT", clrs.green },
|
||||||
|
["ic"] = { "INSERT", clrs.green },
|
||||||
|
["t"] = { "TERMINAL", clrs.green },
|
||||||
|
["v"] = { "VISUAL", clrs.flamingo },
|
||||||
|
["V"] = { "V-LINE", clrs.flamingo },
|
||||||
|
[""] = { "V-BLOCK", clrs.flamingo },
|
||||||
|
["R"] = { "REPLACE", clrs.maroon },
|
||||||
|
["Rv"] = { "V-REPLACE", clrs.maroon },
|
||||||
|
["s"] = { "SELECT", clrs.maroon },
|
||||||
|
["S"] = { "S-LINE", clrs.maroon },
|
||||||
|
[""] = { "S-BLOCK", clrs.maroon },
|
||||||
|
["c"] = { "COMMAND", clrs.peach },
|
||||||
|
["cv"] = { "COMMAND", clrs.peach },
|
||||||
|
["ce"] = { "COMMAND", clrs.peach },
|
||||||
|
["r"] = { "PROMPT", clrs.teal },
|
||||||
|
["rm"] = { "MORE", clrs.teal },
|
||||||
|
["r?"] = { "CONFIRM", clrs.mauve },
|
||||||
|
["!"] = { "SHELL", clrs.green },
|
||||||
|
},
|
||||||
|
view = {
|
||||||
|
lsp = {
|
||||||
|
progress = true, -- if true the status bar will display an lsp progress indicator
|
||||||
|
name = false, -- if true the status bar will display the lsp servers name, otherwise it will display the text "Lsp"
|
||||||
|
exclude_lsp_names = {}, -- lsp server names that should not be displayed when name is set to true
|
||||||
|
separator = "|", -- the separator used when there are multiple lsp servers
|
||||||
|
},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
<
|
||||||
|
|
||||||
|
|
||||||
|
[!Warning] Currently feline doesn’t officially support custom themes
|
||||||
|
<https://github.com/feline-nvim/feline.nvim/issues/302>. In order for
|
||||||
|
`:colorscheme catppuccin-<flavour>` to work you could add this autocmd as a
|
||||||
|
workaround:
|
||||||
|
>lua
|
||||||
|
vim.api.nvim_create_autocmd("ColorScheme", {
|
||||||
|
pattern = "*",
|
||||||
|
callback = function()
|
||||||
|
package.loaded["feline"] = nil
|
||||||
|
package.loaded["catppuccin.groups.integrations.feline"] = nil
|
||||||
|
require("feline").setup {
|
||||||
|
components = require("catppuccin.groups.integrations.feline").get(),
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
<
|
||||||
|
|
||||||
|
fern.vim>lua
|
||||||
|
fern = false
|
||||||
|
<
|
||||||
|
|
||||||
|
fidget.nvim>lua
|
||||||
|
fidget = false
|
||||||
|
<
|
||||||
|
|
||||||
|
Special ~
|
||||||
|
|
||||||
|
Set `notification.window.winblend` to `0`:
|
||||||
|
|
||||||
|
>lua
|
||||||
|
require("fidget").setup {
|
||||||
|
notification = {
|
||||||
|
window = {
|
||||||
|
winblend = 0,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
-- ... the rest of your fidget config
|
||||||
|
}
|
||||||
|
<
|
||||||
|
|
||||||
|
flash.nvim>lua
|
||||||
|
flash = true
|
||||||
|
<
|
||||||
|
|
||||||
|
fzf-lua>lua
|
||||||
|
fzf = true
|
||||||
|
<
|
||||||
|
|
||||||
|
gitsigns.nvim>lua
|
||||||
|
gitsigns = true
|
||||||
|
<
|
||||||
|
|
||||||
|
grug-far.nvim>lua
|
||||||
|
grug_far = false
|
||||||
|
<
|
||||||
|
|
||||||
|
harpoon>lua
|
||||||
|
harpoon = false
|
||||||
|
<
|
||||||
|
|
||||||
|
headlines.nvim>lua
|
||||||
|
headlines = false
|
||||||
|
<
|
||||||
|
|
||||||
|
hop.nvim>lua
|
||||||
|
hop = false
|
||||||
|
<
|
||||||
|
|
||||||
|
indent-blankline.nvim>lua
|
||||||
|
indent_blankline = {
|
||||||
|
enabled = true,
|
||||||
|
scope_color = "", -- catppuccin color (eg. `lavender`) Default: text
|
||||||
|
colored_indent_levels = false,
|
||||||
|
},
|
||||||
|
<
|
||||||
|
|
||||||
|
Special ~
|
||||||
|
|
||||||
|
`colored_indent_levels` enables char highlights per indent level. Follow the
|
||||||
|
instructions here
|
||||||
|
<https://github.com/lukas-reineke/indent-blankline.nvim#multiple-indent-colors>
|
||||||
|
to set the latter up.
|
||||||
|
|
||||||
|
leap.nvim>lua
|
||||||
|
leap = false
|
||||||
|
<
|
||||||
|
|
||||||
|
lightline.vimSpecial ~
|
||||||
|
|
||||||
|
>vim
|
||||||
|
let g:lightline = {'colorscheme': 'catppuccin'}
|
||||||
|
<
|
||||||
|
|
||||||
|
lightspeed.nvim>lua
|
||||||
|
lightspeed = false
|
||||||
|
<
|
||||||
|
|
||||||
|
lir.nvim>lua
|
||||||
|
lir = {
|
||||||
|
enabled = false,
|
||||||
|
git_status = false
|
||||||
|
}
|
||||||
|
<
|
||||||
|
|
||||||
|
lspsaga.nvim>lua
|
||||||
|
lsp_saga = false
|
||||||
|
<
|
||||||
|
|
||||||
|
Special ~
|
||||||
|
|
||||||
|
For custom Lsp Kind Icon and Color
|
||||||
|
|
||||||
|
>lua
|
||||||
|
require("lspsaga").setup {
|
||||||
|
ui = {
|
||||||
|
kind = require("catppuccin.groups.integrations.lsp_saga").custom_kind(),
|
||||||
|
},
|
||||||
|
}
|
||||||
|
<
|
||||||
|
|
||||||
|
lualine.nvimSpecial ~
|
||||||
|
|
||||||
|
>lua
|
||||||
|
require('lualine').setup {
|
||||||
|
options = {
|
||||||
|
theme = "catppuccin"
|
||||||
|
-- ... the rest of your lualine config
|
||||||
|
}
|
||||||
|
}
|
||||||
|
<
|
||||||
|
|
||||||
|
markdown>lua
|
||||||
|
markdown = true
|
||||||
|
<
|
||||||
|
|
||||||
|
mason.nvim>lua
|
||||||
|
mason = false
|
||||||
|
<
|
||||||
|
|
||||||
|
mini.nvim>lua
|
||||||
|
mini = {
|
||||||
|
enabled = true,
|
||||||
|
indentscope_color = "", -- catppuccin color (eg. `lavender`) Default: text
|
||||||
|
},
|
||||||
|
<
|
||||||
|
|
||||||
|
neo-tree.nvim>lua
|
||||||
|
neotree = false
|
||||||
|
<
|
||||||
|
|
||||||
|
neogit>lua
|
||||||
|
neogit = true
|
||||||
|
<
|
||||||
|
|
||||||
|
neotest>lua
|
||||||
|
neotest = false
|
||||||
|
<
|
||||||
|
|
||||||
|
noice.nvim>lua
|
||||||
|
noice = false
|
||||||
|
<
|
||||||
|
|
||||||
|
NormalNvim>lua
|
||||||
|
NormalNvim = false
|
||||||
|
<
|
||||||
|
|
||||||
|
notifier.nvim>lua
|
||||||
|
notifier = false
|
||||||
|
<
|
||||||
|
|
||||||
|
nvim-cmp>lua
|
||||||
|
cmp = true
|
||||||
|
<
|
||||||
|
|
||||||
|
nvim-dap>lua
|
||||||
|
dap = true
|
||||||
|
<
|
||||||
|
|
||||||
|
Special ~
|
||||||
|
|
||||||
|
>lua
|
||||||
|
local sign = vim.fn.sign_define
|
||||||
|
|
||||||
|
sign("DapBreakpoint", { text = "●", texthl = "DapBreakpoint", linehl = "", numhl = ""})
|
||||||
|
sign("DapBreakpointCondition", { text = "●", texthl = "DapBreakpointCondition", linehl = "", numhl = ""})
|
||||||
|
sign("DapLogPoint", { text = "◆", texthl = "DapLogPoint", linehl = "", numhl = ""})
|
||||||
|
<
|
||||||
|
|
||||||
|
nvim-dap-ui>lua
|
||||||
|
dap_ui = true
|
||||||
|
<
|
||||||
|
|
||||||
|
nvim-lspconfig>lua
|
||||||
|
native_lsp = {
|
||||||
|
enabled = true,
|
||||||
|
virtual_text = {
|
||||||
|
errors = { "italic" },
|
||||||
|
hints = { "italic" },
|
||||||
|
warnings = { "italic" },
|
||||||
|
information = { "italic" },
|
||||||
|
ok = { "italic" },
|
||||||
|
},
|
||||||
|
underlines = {
|
||||||
|
errors = { "underline" },
|
||||||
|
hints = { "underline" },
|
||||||
|
warnings = { "underline" },
|
||||||
|
information = { "underline" },
|
||||||
|
ok = { "underline" },
|
||||||
|
},
|
||||||
|
inlay_hints = {
|
||||||
|
background = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
<
|
||||||
|
|
||||||
|
Special ~
|
||||||
|
|
||||||
|
In the inners tables you can set the style for the diagnostics, both
|
||||||
|
`virtual_text` (what you see on the side) and `underlines` (what points
|
||||||
|
directly at the thing (e.g. an error)).
|
||||||
|
|
||||||
|
navic>lua
|
||||||
|
navic = {
|
||||||
|
enabled = false,
|
||||||
|
custom_bg = "NONE", -- "lualine" will set background to mantle
|
||||||
|
},
|
||||||
|
<
|
||||||
|
|
||||||
|
Special ~
|
||||||
|
|
||||||
|
>lua
|
||||||
|
-- You NEED to enable highlight in nvim-navic setting or it won't work
|
||||||
|
require("nvim-navic").setup {
|
||||||
|
highlight = true
|
||||||
|
}
|
||||||
|
<
|
||||||
|
|
||||||
|
nvim-notify>lua
|
||||||
|
notify = false
|
||||||
|
<
|
||||||
|
|
||||||
|
nvim-semantic-tokens>lua
|
||||||
|
semantic_tokens = true
|
||||||
|
<
|
||||||
|
|
||||||
|
nvim-surround>lua
|
||||||
|
nvim_surround = false
|
||||||
|
<
|
||||||
|
|
||||||
|
nvim-tree.lua>lua
|
||||||
|
nvimtree = true
|
||||||
|
<
|
||||||
|
|
||||||
|
nvim-treesitter-context>lua
|
||||||
|
treesitter_context = true
|
||||||
|
<
|
||||||
|
|
||||||
|
nvim-treesitter>lua
|
||||||
|
treesitter = true
|
||||||
|
<
|
||||||
|
|
||||||
|
nvim-ts-rainbow2>lua
|
||||||
|
ts_rainbow2 = false
|
||||||
|
<
|
||||||
|
|
||||||
|
nvim-ts-rainbow>lua
|
||||||
|
ts_rainbow = false
|
||||||
|
<
|
||||||
|
|
||||||
|
nvim-ufo>lua
|
||||||
|
ufo = true
|
||||||
|
<
|
||||||
|
|
||||||
|
nvim-window-picker>lua
|
||||||
|
window_picker = false
|
||||||
|
<
|
||||||
|
|
||||||
|
octo.nvim>lua
|
||||||
|
octo = false
|
||||||
|
<
|
||||||
|
|
||||||
|
overseer.nvim>lua
|
||||||
|
overseer = false
|
||||||
|
<
|
||||||
|
|
||||||
|
pounce.nvim>lua
|
||||||
|
pounce = false
|
||||||
|
<
|
||||||
|
|
||||||
|
rainbow-delimiters.nvim>lua
|
||||||
|
rainbow_delimiters = true
|
||||||
|
<
|
||||||
|
|
||||||
|
reactive.nvimSpecial ~
|
||||||
|
|
||||||
|
There’re 2 available presets (`cursor` and `cursorline`) for every flavour.
|
||||||
|
|
||||||
|
Here is how you can use them.
|
||||||
|
|
||||||
|
>lua
|
||||||
|
require('reactive').setup {
|
||||||
|
load = { 'catppuccin-mocha-cursor', 'catppuccin-mocha-cursorline' }
|
||||||
|
}
|
||||||
|
<
|
||||||
|
|
||||||
|
To use another flavour just replace `mocha` with the one you want to use.
|
||||||
|
|
||||||
|
render-markdown.nvim>lua
|
||||||
|
render_markdown = true
|
||||||
|
<
|
||||||
|
|
||||||
|
symbols-outline.nvim
|
||||||
|
[!NOTE] This plugin has been archived by the author, consider using
|
||||||
|
outline.nvim <https://github.com/hedyhli/outline.nvim>
|
||||||
|
>lua
|
||||||
|
symbols_outline = false
|
||||||
|
<
|
||||||
|
|
||||||
|
telekasten.nvim>lua
|
||||||
|
telekasten = false
|
||||||
|
<
|
||||||
|
|
||||||
|
telescope.nvim>lua
|
||||||
|
telescope = {
|
||||||
|
enabled = true,
|
||||||
|
-- style = "nvchad"
|
||||||
|
}
|
||||||
|
<
|
||||||
|
|
||||||
|
trouble.nvim>lua
|
||||||
|
lsp_trouble = false
|
||||||
|
<
|
||||||
|
|
||||||
|
vim-airlineSpecial ~
|
||||||
|
|
||||||
|
>vim
|
||||||
|
let g:airline_theme = 'catppuccin'
|
||||||
|
<
|
||||||
|
|
||||||
|
vim-clapSpecial ~
|
||||||
|
|
||||||
|
Use this to set it up:
|
||||||
|
|
||||||
|
>vim
|
||||||
|
let g:clap_theme = 'catppuccin'
|
||||||
|
<
|
||||||
|
|
||||||
|
vim-dadbod-ui>lua
|
||||||
|
dadbod_ui = false
|
||||||
|
<
|
||||||
|
|
||||||
|
vim-gitgutter>lua
|
||||||
|
gitgutter = false
|
||||||
|
<
|
||||||
|
|
||||||
|
vim-illuminate>lua
|
||||||
|
illuminate = {
|
||||||
|
enabled = true,
|
||||||
|
lsp = false
|
||||||
|
}
|
||||||
|
<
|
||||||
|
|
||||||
|
vim-sandwich>lua
|
||||||
|
sandwich = false
|
||||||
|
<
|
||||||
|
|
||||||
|
vim-sneak>lua
|
||||||
|
vim_sneak = false
|
||||||
|
<
|
||||||
|
|
||||||
|
vimwiki>lua
|
||||||
|
vimwiki = false
|
||||||
|
<
|
||||||
|
|
||||||
|
which-key.nvim>lua
|
||||||
|
which_key = false
|
||||||
|
<
|
||||||
|
|
||||||
|
|
||||||
|
==============================================================================
|
||||||
|
7. Compile *catppuccin-compile*
|
||||||
|
|
||||||
|
|
||||||
|
**Important** As of 7/10/2022, catppuccin should be able to automatically
|
||||||
|
recompile when the setup table changed.
|
||||||
|
Catppuccin is a highly customizable and configurable colorscheme. This does
|
||||||
|
however come at the cost of complexity and execution time. Catppuccin can pre
|
||||||
|
compute the results of your configuration and store the results in a compiled
|
||||||
|
lua file. We use these precached values to set it’s highlights.
|
||||||
|
|
||||||
|
By default catppuccin writes the compiled results into the system’s cache
|
||||||
|
directory. You can change the cache dir using:
|
||||||
|
|
||||||
|
>lua
|
||||||
|
require("catppuccin").setup({ -- Note: On windows we replace `/` with `\` by default
|
||||||
|
compile_path = vim.fn.stdpath "cache" .. "/catppuccin"
|
||||||
|
})
|
||||||
|
<
|
||||||
|
|
||||||
|
|
||||||
|
==============================================================================
|
||||||
|
8. FAQ *catppuccin-faq*
|
||||||
|
|
||||||
|
|
||||||
|
WRONG TREESITTER HIGHLIGHTS *catppuccin-faq-wrong-treesitter-highlights*
|
||||||
|
|
||||||
|
Please disable `additional_vim_regex_highlighting`
|
||||||
|
|
||||||
|
>lua
|
||||||
|
require("nvim-treesitter.configs").setup {
|
||||||
|
highlight = {
|
||||||
|
enable = true,
|
||||||
|
additional_vim_regex_highlighting = false
|
||||||
|
},
|
||||||
|
}
|
||||||
|
<
|
||||||
|
|
||||||
|
|
||||||
|
COLORS DOESN’T MATCH PREVIEW SCREENSHOTS*catppuccin-faq-colors-doesn’t-match-preview-screenshots*
|
||||||
|
|
||||||
|
Catppuccin requires true color support AKA terminals support the full range of
|
||||||
|
16 million colors
|
||||||
|
|
||||||
|
- Supported: iterm2 (macOS), kitty, wezterm, alacritty, tmux, …
|
||||||
|
|
||||||
|
Full list of support terminals can be found here:
|
||||||
|
<https://github.com/termstandard/colors#truecolor-support-in-output-devices>
|
||||||
|
|
||||||
|
- Unsupported terminal: Terminal.app (macOS), Terminus, Terminology, …
|
||||||
|
|
||||||
|
Full list of Unsupported terminals can be found here:
|
||||||
|
<https://github.com/termstandard/colors#not-supporting-truecolor>
|
||||||
|
|
||||||
|
|
||||||
|
FOR TMUX USERS ~
|
||||||
|
|
||||||
|
- Enable true color support <https://gist.github.com/andersevenrud/015e61af2fd264371032763d4ed965b6> to fix the following abnormal colors <https://github.com/catppuccin/nvim/issues/415>:
|
||||||
|
|
||||||
|
- Enable italic font support <https://gist.github.com/gyribeiro/4192af1aced7a1b555df06bd3781a722> to fix the following incorrect if, then, else, end highlights <https://github.com/catppuccin/nvim/issues/428>:
|
||||||
|
|
||||||
|
|
||||||
|
==============================================================================
|
||||||
|
9. Thanks to *catppuccin-thanks-to*
|
||||||
|
|
||||||
|
- Pocco81 <https://github.com/Pocco81>
|
||||||
|
- nullchilly <https://github.com/nullchilly>
|
||||||
|
|
||||||
|
==============================================================================
|
||||||
|
10. Links *catppuccin-links*
|
||||||
|
|
||||||
|
1. *image*: https://user-images.githubusercontent.com/1941785/220280749-c3ab52fb-9b8a-4f04-ab98-f8c1bb41f84b.png
|
||||||
|
2. *image*: https://user-images.githubusercontent.com/13246770/224011118-dcf0f567-650a-4eb2-8be6-0af5cf435501.png
|
||||||
|
|
||||||
|
Generated by panvimdoc <https://github.com/kdheepak/panvimdoc>
|
||||||
|
|
||||||
|
vim:tw=78:ts=8:noet:ft=help:norl:
|
||||||
15
config/neovim/store/lazy-plugins/catppuccin-nvim/doc/tags
Normal file
15
config/neovim/store/lazy-plugins/catppuccin-nvim/doc/tags
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
catppuccin-compile catppuccin.txt /*catppuccin-compile*
|
||||||
|
catppuccin-configuration catppuccin.txt /*catppuccin-configuration*
|
||||||
|
catppuccin-customize-highlights catppuccin.txt /*catppuccin-customize-highlights*
|
||||||
|
catppuccin-customize-highlights-get-catppuccin-colors catppuccin.txt /*catppuccin-customize-highlights-get-catppuccin-colors*
|
||||||
|
catppuccin-customize-highlights-overwriting-colors catppuccin.txt /*catppuccin-customize-highlights-overwriting-colors*
|
||||||
|
catppuccin-faq catppuccin.txt /*catppuccin-faq*
|
||||||
|
catppuccin-faq-wrong-treesitter-highlights catppuccin.txt /*catppuccin-faq-wrong-treesitter-highlights*
|
||||||
|
catppuccin-features catppuccin.txt /*catppuccin-features*
|
||||||
|
catppuccin-installation catppuccin.txt /*catppuccin-installation*
|
||||||
|
catppuccin-integrations catppuccin.txt /*catppuccin-integrations*
|
||||||
|
catppuccin-links catppuccin.txt /*catppuccin-links*
|
||||||
|
catppuccin-table-of-contents catppuccin.txt /*catppuccin-table-of-contents*
|
||||||
|
catppuccin-thanks-to catppuccin.txt /*catppuccin-thanks-to*
|
||||||
|
catppuccin-usage catppuccin.txt /*catppuccin-usage*
|
||||||
|
catppuccin.txt catppuccin.txt /*catppuccin.txt*
|
||||||
@ -0,0 +1 @@
|
|||||||
|
return require "catppuccin.utils.barbecue" "frappe"
|
||||||
@ -0,0 +1 @@
|
|||||||
|
return require "catppuccin.utils.barbecue" "latte"
|
||||||
@ -0,0 +1 @@
|
|||||||
|
return require "catppuccin.utils.barbecue" "macchiato"
|
||||||
@ -0,0 +1 @@
|
|||||||
|
return require "catppuccin.utils.barbecue" "mocha"
|
||||||
@ -0,0 +1 @@
|
|||||||
|
return require "catppuccin.utils.barbecue"()
|
||||||
@ -0,0 +1,79 @@
|
|||||||
|
local M = {}
|
||||||
|
|
||||||
|
function M.get()
|
||||||
|
return {
|
||||||
|
ColorColumn = { bg = C.surface0 }, -- used for the columns set with 'colorcolumn'
|
||||||
|
Conceal = { fg = C.overlay1 }, -- placeholder characters substituted for concealed text (see 'conceallevel')
|
||||||
|
Cursor = { fg = C.base, bg = C.text }, -- character under the cursor
|
||||||
|
lCursor = { fg = C.base, bg = C.text }, -- the character under the cursor when |language-mapping| is used (see 'guicursor')
|
||||||
|
CursorIM = { fg = C.base, bg = C.text }, -- like Cursor, but used when in IME mode |CursorIM|
|
||||||
|
CursorColumn = { bg = C.mantle }, -- Screen-column at the cursor, when 'cursorcolumn' is set.
|
||||||
|
CursorLine = {
|
||||||
|
bg = U.vary_color({ latte = U.lighten(C.mantle, 0.70, C.base) }, U.darken(C.surface0, 0.64, C.base)),
|
||||||
|
}, -- Screen-line at the cursor, when 'cursorline' is set. Low-priority if forecrust (ctermfg OR guifg) is not set.
|
||||||
|
Directory = { fg = C.blue }, -- directory names (and other special names in listings)
|
||||||
|
EndOfBuffer = { fg = O.show_end_of_buffer and C.surface1 or C.base }, -- filler lines (~) after the end of the buffer. By default, this is highlighted like |hl-NonText|.
|
||||||
|
ErrorMsg = { fg = C.red, style = { "bold", "italic" } }, -- error messages on the command line
|
||||||
|
VertSplit = { fg = O.transparent_background and C.surface1 or C.crust }, -- the column separating vertically split windows
|
||||||
|
Folded = { fg = C.blue, bg = O.transparent_background and C.none or C.surface1 }, -- line used for closed folds
|
||||||
|
FoldColumn = { fg = C.overlay0 }, -- 'foldcolumn'
|
||||||
|
SignColumn = { fg = C.surface1 }, -- column where |signs| are displayed
|
||||||
|
SignColumnSB = { bg = C.crust, fg = C.surface1 }, -- column where |signs| are displayed
|
||||||
|
Substitute = { bg = C.surface1, fg = U.vary_color({ latte = C.red }, C.pink) }, -- |:substitute| replacement text highlighting
|
||||||
|
LineNr = { fg = C.surface1 }, -- Line number for ":number" and ":#" commands, and when 'number' or 'relativenumber' option is set.
|
||||||
|
CursorLineNr = { fg = C.lavender }, -- Like LineNr when 'cursorline' or 'relativenumber' is set for the cursor line. highlights the number in numberline.
|
||||||
|
MatchParen = { fg = C.peach, bg = C.surface1, style = { "bold" } }, -- The character under the cursor or just before it, if it is a paired bracket, and its match. |pi_paren.txt|
|
||||||
|
ModeMsg = { fg = C.text, style = { "bold" } }, -- 'showmode' message (e.g., "-- INSERT -- ")
|
||||||
|
-- MsgArea = { fg = C.text }, -- Area for messages and cmdline, don't set this highlight because of https://github.com/neovim/neovim/issues/17832
|
||||||
|
MsgSeparator = {}, -- Separator for scrolled messages, `msgsep` flag of 'display'
|
||||||
|
MoreMsg = { fg = C.blue }, -- |more-prompt|
|
||||||
|
NonText = { fg = C.overlay0 }, -- '@' at the end of the window, characters from 'showbreak' and other characters that do not really exist in the text (e.g., ">" displayed when a double-wide character doesn't fit at the end of the line). See also |hl-EndOfBuffer|.
|
||||||
|
Normal = { fg = C.text, bg = O.transparent_background and C.none or C.base }, -- normal text
|
||||||
|
NormalNC = {
|
||||||
|
fg = C.text,
|
||||||
|
bg = (O.transparent_background and O.dim_inactive.enabled and C.dim)
|
||||||
|
or (O.dim_inactive.enabled and C.dim)
|
||||||
|
or (O.transparent_background and C.none)
|
||||||
|
or C.base,
|
||||||
|
}, -- normal text in non-current windows
|
||||||
|
NormalSB = { fg = C.text, bg = C.crust }, -- normal text in non-current windows
|
||||||
|
NormalFloat = { fg = C.text, bg = (O.transparent_background and vim.o.winblend == 0) and C.none or C.mantle }, -- Normal text in floating windows.
|
||||||
|
FloatBorder = { fg = C.blue },
|
||||||
|
FloatTitle = { fg = C.subtext0 }, -- Title of floating windows
|
||||||
|
Pmenu = {
|
||||||
|
bg = (O.transparent_background and vim.o.pumblend == 0) and C.none or U.darken(C.surface0, 0.8, C.crust),
|
||||||
|
fg = C.overlay2,
|
||||||
|
}, -- Popup menu: normal item.
|
||||||
|
PmenuSel = { bg = C.surface1, style = { "bold" } }, -- Popup menu: selected item.
|
||||||
|
PmenuSbar = { bg = C.surface1 }, -- Popup menu: scrollbar.
|
||||||
|
PmenuThumb = { bg = C.overlay0 }, -- Popup menu: Thumb of the scrollbar.
|
||||||
|
Question = { fg = C.blue }, -- |hit-enter| prompt and yes/no questions
|
||||||
|
QuickFixLine = { bg = C.surface1, style = { "bold" } }, -- Current |quickfix| item in the quickfix window. Combined with |hl-CursorLine| when the cursor is there.
|
||||||
|
Search = { bg = U.darken(C.sky, 0.30, C.base), fg = C.text }, -- Last search pattern highlighting (see 'hlsearch'). Also used for similar items that need to stand out.
|
||||||
|
IncSearch = { bg = U.darken(C.sky, 0.90, C.base), fg = C.mantle }, -- 'incsearch' highlighting; also used for the text replaced with ":s///c"
|
||||||
|
CurSearch = { bg = C.red, fg = C.mantle }, -- 'cursearch' highlighting: highlights the current search you're on differently
|
||||||
|
SpecialKey = { link = "NonText" }, -- Unprintable characters: text displayed differently from what it really is. But not 'listchars' textspace. |hl-Whitespace|
|
||||||
|
SpellBad = { sp = C.red, style = { "undercurl" } }, -- Word that is not recognized by the spellchecker. |spell| Combined with the highlighting used otherwise.
|
||||||
|
SpellCap = { sp = C.yellow, style = { "undercurl" } }, -- Word that should start with a capital. |spell| Combined with the highlighting used otherwise.
|
||||||
|
SpellLocal = { sp = C.blue, style = { "undercurl" } }, -- Word that is recognized by the spellchecker as one that is used in another region. |spell| Combined with the highlighting used otherwise.
|
||||||
|
SpellRare = { sp = C.green, style = { "undercurl" } }, -- Word that is recognized by the spellchecker as one that is hardly ever used. |spell| Combined with the highlighting used otherwise.
|
||||||
|
StatusLine = { fg = C.text, bg = O.transparent_background and C.none or C.mantle }, -- status line of current window
|
||||||
|
StatusLineNC = { fg = C.surface1, bg = O.transparent_background and C.none or C.mantle }, -- status lines of not-current windows Note: if this is equal to "StatusLine" Vim will use "^^^" in the status line of the current window.
|
||||||
|
TabLine = { bg = C.mantle, fg = C.overlay0 }, -- tab pages line, not active tab page label
|
||||||
|
TabLineFill = { bg = O.transparent_background and C.none or C.mantle }, -- tab pages line, where there are no labels
|
||||||
|
TabLineSel = { fg = C.green, bg = C.surface1 }, -- tab pages line, active tab page label
|
||||||
|
TermCursor = { fg = C.base, bg = C.rosewater }, -- cursor in a focused terminal
|
||||||
|
TermCursorNC = { fg = C.base, bg = C.overlay2 }, -- cursor in unfocused terminals
|
||||||
|
Title = { fg = C.blue, style = { "bold" } }, -- titles for output from ":set all", ":autocmd" etc.
|
||||||
|
Visual = { bg = C.surface1, style = { "bold" } }, -- Visual mode selection
|
||||||
|
VisualNOS = { bg = C.surface1, style = { "bold" } }, -- Visual mode selection when vim is "Not Owning the Selection".
|
||||||
|
WarningMsg = { fg = C.yellow }, -- warning messages
|
||||||
|
Whitespace = { fg = C.surface1 }, -- "nbsp", "space", "tab" and "trail" in 'listchars'
|
||||||
|
WildMenu = { bg = C.overlay0 }, -- current match in 'wildmenu' completion
|
||||||
|
WinBar = { fg = C.rosewater },
|
||||||
|
WinBarNC = { link = "WinBar" },
|
||||||
|
WinSeparator = { fg = O.transparent_background and C.surface1 or C.crust },
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
@ -0,0 +1,15 @@
|
|||||||
|
local M = {}
|
||||||
|
|
||||||
|
function M.get()
|
||||||
|
return {
|
||||||
|
MarkdownTask = { fg = C.teal, style = { "bold" } },
|
||||||
|
MarkdownTodo = { fg = C.flamingo, style = { "bold" } },
|
||||||
|
MarkdownNote = { fg = C.red, style = { "bold" } },
|
||||||
|
MarkdownSee = { fg = C.blue, style = { "bold" } },
|
||||||
|
MarkdownCheck = { fg = C.green, style = { "bold" } },
|
||||||
|
MarkdownURL = { fg = C.lavender, style = { "bold" } },
|
||||||
|
MarkdownExample = { fg = C.mauve, style = { "bold" } },
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
@ -0,0 +1,36 @@
|
|||||||
|
local M = {}
|
||||||
|
|
||||||
|
function M.get()
|
||||||
|
return {
|
||||||
|
AerialLine = { fg = C.yellow, bg = C.none },
|
||||||
|
AerialGuide = { fg = C.overlay2 },
|
||||||
|
AerialBooleanIcon = { link = "@boolean" },
|
||||||
|
AerialClassIcon = { link = "@type" },
|
||||||
|
AerialConstantIcon = { link = "@constant" },
|
||||||
|
AerialConstructorIcon = { link = "@constructor" },
|
||||||
|
AerialFieldIcon = { link = "@field" },
|
||||||
|
AerialFunctionIcon = { link = "@function" },
|
||||||
|
AerialMethodIcon = { link = "@method" },
|
||||||
|
AerialNamespaceIcon = { link = "@namespace" },
|
||||||
|
AerialNumberIcon = { link = "@number" },
|
||||||
|
AerialOperatorIcon = { link = "@operator" },
|
||||||
|
AerialTypeParameterIcon = { link = "@type" },
|
||||||
|
AerialPropertyIcon = { link = "@property" },
|
||||||
|
AerialStringIcon = { link = "@string" },
|
||||||
|
AerialVariableIcon = { link = "@constant" },
|
||||||
|
AerialEnumMemberIcon = { link = "@field" },
|
||||||
|
AerialEnumIcon = { link = "@type" },
|
||||||
|
AerialFileIcon = { link = "@text.uri" },
|
||||||
|
AerialModuleIcon = { link = "@namespace" },
|
||||||
|
AerialPackageIcon = { link = "@namespace" },
|
||||||
|
AerialInterfaceIcon = { link = "@type" },
|
||||||
|
AerialStructIcon = { link = "@type" },
|
||||||
|
AerialEventIcon = { link = "@type" },
|
||||||
|
AerialArrayIcon = { link = "@constant" },
|
||||||
|
AerialObjectIcon = { link = "@type" },
|
||||||
|
AerialKeyIcon = { link = "@type" },
|
||||||
|
AerialNullIcon = { link = "@type" },
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
@ -0,0 +1,13 @@
|
|||||||
|
local M = {}
|
||||||
|
|
||||||
|
function M.get()
|
||||||
|
return {
|
||||||
|
AlphaShortcut = { fg = C.green },
|
||||||
|
AlphaHeader = { fg = C.blue },
|
||||||
|
AlphaHeaderLabel = { fg = C.peach },
|
||||||
|
AlphaButtons = { fg = C.lavender },
|
||||||
|
AlphaFooter = { fg = C.yellow, style = { "italic" } },
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user