Compare commits
41 Commits
host/manif
...
2f902123a9
| Author | SHA1 | Date | |
|---|---|---|---|
| 2f902123a9 | |||
| 8ace6f1d1c | |||
| de2734ba98 | |||
| a4b9fc3cf9 | |||
| 06e1bd1c2e | |||
| 1f7dbe05a2 | |||
| b963d7746e | |||
| 067c6aa2ee | |||
| de6447fe19 | |||
| 516b187060 | |||
| 7cfdf63c01 | |||
| 192b290e4a | |||
| 3c76341341 | |||
| efeca2ff10 | |||
| c7819c793f | |||
| d9671f74c7 | |||
| b56400c12c | |||
| 7472a05642 | |||
| ed605f580e | |||
| 2e0cc89584 | |||
| 300a13d443 | |||
| fa809f6273 | |||
| 4bc2809648 | |||
| ac9058d3e3 | |||
| 99fc6ec017 | |||
| 3955038a6a | |||
| 76266a78a6 | |||
| b44abad337 | |||
| 373651b9ee | |||
| 72fb89da48 | |||
| 522c655086 | |||
| 0756d4281c | |||
| ffb8c5a5f0 | |||
| a897ada9b5 | |||
| 0f2979d97f | |||
| 144212e33e | |||
| e63a60efca | |||
| 1ad8d13b23 | |||
| 62c556f898 | |||
| 85d2139be6 | |||
| e4c6d3b5a4 |
@@ -3,6 +3,6 @@
|
|||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ stow -S clang-format kitty nvim sway tmux waybar wofi zsh kanshi
|
$ stow -S clang-format kitty nvim sway tmux waybar wofi zsh kanshi papis flashfocus zathura
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
99
flashfocus/.config/flashfocus/flashfocus.yml
Normal file
99
flashfocus/.config/flashfocus/flashfocus.yml
Normal file
@@ -0,0 +1,99 @@
|
|||||||
|
## @@@@@@@@@@@@@@@@@@@@@@
|
||||||
|
## Flashfocus config file
|
||||||
|
## @@@@@@@@@@@@@@@@@@@@@@
|
||||||
|
|
||||||
|
# Opacity of window during flash.
|
||||||
|
flash-opacity: 0.8
|
||||||
|
|
||||||
|
# Windows are restored to this opacity value at the end of a flash.
|
||||||
|
default-opacity: 1
|
||||||
|
|
||||||
|
# Length of flash in milliseconds.
|
||||||
|
time: 500
|
||||||
|
|
||||||
|
# If true, flashes are not faded out. This will improve performance but flashes
|
||||||
|
# won't be smooth.
|
||||||
|
simple: false
|
||||||
|
|
||||||
|
# Number of animation frames in a flash.
|
||||||
|
ntimepoints: 10
|
||||||
|
|
||||||
|
# Set this to false if you don't want windows to flash on focus.
|
||||||
|
flash-on-focus: true
|
||||||
|
|
||||||
|
# Set this to false if you don't want fullscreen windows to flash.
|
||||||
|
flash-fullscreen: true
|
||||||
|
|
||||||
|
# Whether or not to flash windows if they are the only window on the desktop.
|
||||||
|
# Possible values:
|
||||||
|
# 'always':
|
||||||
|
# Always flash lone windows
|
||||||
|
# 'never':
|
||||||
|
# Never flash lone windows
|
||||||
|
# 'on_open_close':
|
||||||
|
# Lone windows will be flashed only if a) if they were just opened and b)
|
||||||
|
# if another window was just closed.
|
||||||
|
# 'on_switch':
|
||||||
|
# Lone windows will be flashed only upon switching desktops.
|
||||||
|
flash-lone-windows: 'always'
|
||||||
|
|
||||||
|
|
||||||
|
# Defining window-specific flash rules
|
||||||
|
#
|
||||||
|
# X11-based window managers (e.g i3, bspwm)
|
||||||
|
# -----------------------------------------
|
||||||
|
# Flash rules are defined by matching the WM_CLASS property of a window. To get
|
||||||
|
# the WM_CLASS property use 'xprop WM_CLASS' and click on a window. The
|
||||||
|
# property is a tuple of the form (window-id, window-class). The window-class
|
||||||
|
# is usually the name of the application, but not always.
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# Say I'd like to set all 'termite' windows to 80% opacity but leave other
|
||||||
|
# windows at full opacity:
|
||||||
|
#
|
||||||
|
# rules:
|
||||||
|
# - window-class: Termite
|
||||||
|
# default-opacity: 0.8
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# I also would prefer that firefox windows are not flashed on focus:
|
||||||
|
#
|
||||||
|
# rules:
|
||||||
|
# - window-class: firefox
|
||||||
|
# flash-on-focus: False
|
||||||
|
# - window-class: Termite
|
||||||
|
# default-opacity: 0.8
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# For more complicated rules, you can use (python-style) regexes:
|
||||||
|
#
|
||||||
|
# rules:
|
||||||
|
# - window-id: ^(?!termite)$
|
||||||
|
# default-opacity: 0.8
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# Sway
|
||||||
|
# ----
|
||||||
|
# Native wayland apps can be matched using the app_id and window name. These
|
||||||
|
# can be found using `swaymsg -t get_tree`. XWayland apps are matched with
|
||||||
|
# using WM_CLASS as above (this can also be found with `swaymsg`)
|
||||||
|
#
|
||||||
|
# Given that termite is wayland native and firefox is not, the rules above
|
||||||
|
# could instead be written:
|
||||||
|
#
|
||||||
|
# rules:
|
||||||
|
# - window-class: firefox
|
||||||
|
# flash-on-focus: False
|
||||||
|
# - app-id: termite
|
||||||
|
# default-opacity: 0.8
|
||||||
|
#
|
||||||
|
# rules:
|
||||||
|
# - window-name: ^(?!termite)$
|
||||||
|
# default-opacity: 0.8
|
||||||
|
rules:
|
||||||
|
- app-id: kitty
|
||||||
|
flash-opacity: 0.85
|
||||||
|
default-opacity: 0.94
|
||||||
|
- app-id: org.pwmt.zathura
|
||||||
|
flash-opacity: 0.85
|
||||||
|
default-opacity: 0.94
|
||||||
@@ -1,13 +1,9 @@
|
|||||||
profile Home {
|
profile Home {
|
||||||
output "eDP-1" mode 2256x1504@59.999Hz position 1920,875 transform normal scale 1.399999976158142
|
output "eDP-1" mode 2256x1504@59.999Hz position 1920,875 transform normal scale 1.399999976158142
|
||||||
output "DP-11" mode 1920x1200@59.95Hz position 0,0 transform normal scale 1.0
|
output "DP-11" mode 1920x1200@59.95Hz position 0,0 transform normal scale 1.0
|
||||||
exec swayws move --away 1 eDP-1
|
|
||||||
exec swayws move --away 4 eDP-1
|
|
||||||
}
|
}
|
||||||
|
|
||||||
profile Kinemic {
|
profile Bell {
|
||||||
output "eDP-1" mode 2256x1504@59.999Hz position 449,1440 transform normal scale 1.399999976158142
|
output "eDP-1" mode 2256x1504@59.999Hz position 2137,425 transform normal scale 1.399999976158142
|
||||||
output "DP-3" mode 2560x1440@59.951Hz position 0,0 transform normal scale 1.0
|
output "DP-3" mode 1920x1080@59.951Hz position 0,0 transform normal scale 0.9
|
||||||
exec swayws move --away 1 eDP-1
|
|
||||||
exec swayws move --away 4 eDP-1
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,13 @@
|
|||||||
include current-theme.conf
|
include current-theme.conf
|
||||||
# END_KITTY_THEME
|
# END_KITTY_THEME
|
||||||
#
|
#
|
||||||
background_opacity 0.87
|
|
||||||
enable_audio_bell no
|
enable_audio_bell no
|
||||||
touch_scroll_multiplier 8.0
|
touch_scroll_multiplier 8.0
|
||||||
|
|
||||||
|
|
||||||
|
# BEGIN_KITTY_FONTS
|
||||||
|
font_family family="Liberation Mono"
|
||||||
|
bold_font auto
|
||||||
|
italic_font auto
|
||||||
|
bold_italic_font auto
|
||||||
|
# END_KITTY_FONTS
|
||||||
|
|||||||
8
nvim/.config/nvim/.luarc.json
Normal file
8
nvim/.config/nvim/.luarc.json
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"runtime.version": "LuaJIT",
|
||||||
|
"rutime.path": ["lua/?.lua", "lua/?/init.lua"],
|
||||||
|
"diagnostics.globals": ["vim"],
|
||||||
|
"workspace.checkThirdParty": false,
|
||||||
|
"workspace.library": ["$VIMRUNTIME"]
|
||||||
|
}
|
||||||
|
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
# neovim config
|
|
||||||
|
|
||||||
`neovim` configuration files.
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
1. Install depencencies
|
|
||||||
* See one of the Dockerfiles in `dockerfiles` for the necessary packages
|
|
||||||
* Use a patched font (see, e.g., [nerd fonts](https://www.nerdfonts.com/))
|
|
||||||
2. Clone repository into configuration directory:
|
|
||||||
```bash
|
|
||||||
$ git clone ssh://git@git.mercurial-manifold.eu:2224/an.tsouchlos/config-nvim.git ~/.config/nvim
|
|
||||||
```
|
|
||||||
3. If desired, configure github copilot by running `:Copilot setup`
|
|
||||||
|
|
||||||
## Build docker images
|
|
||||||
|
|
||||||
### Arch linux
|
|
||||||
|
|
||||||
Because AUR package installation requires the `fakeroot` command, which is
|
|
||||||
extremely slow when [no limit has been set on the maximum number of file
|
|
||||||
descriptors](https://github.com/moby/moby/issues/45436), the image has to
|
|
||||||
be build using the `--ulimit "nofile=1024:1048576"` option:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
$ docker build . -f dockerfiles/Dockerfile.archlinux --ulimit "nofile=1024:1048576" -t config
|
|
||||||
$ docker run --rm -it config
|
|
||||||
```
|
|
||||||
|
|
||||||
### Ubuntu
|
|
||||||
|
|
||||||
Because neovim is installed through an `AppImage`, the container has to be
|
|
||||||
started with `--privileged` to be able to run `nvim`.
|
|
||||||
|
|
||||||
```bash
|
|
||||||
$ docker build . -f dockerfiles/Dockerfile.ubuntu -t config
|
|
||||||
$ docker run --rm -it --privileged config
|
|
||||||
```
|
|
||||||
@@ -1,61 +0,0 @@
|
|||||||
FROM archlinux:latest
|
|
||||||
|
|
||||||
|
|
||||||
#
|
|
||||||
# General boiler plate
|
|
||||||
#
|
|
||||||
|
|
||||||
|
|
||||||
# Add mock non-root user for AUR package compilation
|
|
||||||
|
|
||||||
RUN useradd --no-create-home --shell=/bin/false build && usermod -L build
|
|
||||||
RUN echo 'build ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
|
|
||||||
|
|
||||||
# Ready image for installation
|
|
||||||
|
|
||||||
RUN pacman-key --init
|
|
||||||
RUN pacman-key --populate archlinux
|
|
||||||
RUN pacman -Sy archlinux-keyring --noconfirm && pacman -Su --noconfirm
|
|
||||||
RUN pacman -Syu --noconfirm
|
|
||||||
|
|
||||||
# Install generic dependencies
|
|
||||||
|
|
||||||
RUN pacman -S git wget sudo base-devel --noconfirm
|
|
||||||
|
|
||||||
|
|
||||||
#
|
|
||||||
# Neovim specific
|
|
||||||
#
|
|
||||||
|
|
||||||
|
|
||||||
# Install nvim
|
|
||||||
|
|
||||||
RUN pacman -S neovim --noconfirm
|
|
||||||
|
|
||||||
# Install nvim module dependencies
|
|
||||||
|
|
||||||
RUN pacman -S python-pynvim --noconfirm # python3 provider
|
|
||||||
RUN pacman -S npm --noconfirm # mason requirements
|
|
||||||
RUN pacman -S fd ripgrep --noconfirm # Telescope requirements
|
|
||||||
RUN pacman -S powerline-fonts --noconfirm # vim-airline requirements
|
|
||||||
#RUN pacman -S autopep8 texlive-binextra \
|
|
||||||
# perl-yaml-tiny perl-file-homedir --noconfirm # neoformat requirements
|
|
||||||
|
|
||||||
WORKDIR /tmp
|
|
||||||
|
|
||||||
USER build
|
|
||||||
ARG HOME=/tmp
|
|
||||||
RUN wget https://aur.archlinux.org/cgit/aur.git/snapshot/neovim-remote.tar.gz
|
|
||||||
RUN tar xzvf neovim-remote.tar.gz
|
|
||||||
RUN cd neovim-remote && makepkg -s --noconfirm
|
|
||||||
|
|
||||||
USER root
|
|
||||||
RUN pacman -U neovim-remote/*.pkg.tar.zst --noconfirm # vimtex requirements
|
|
||||||
|
|
||||||
WORKDIR /
|
|
||||||
|
|
||||||
# Copy configuration
|
|
||||||
|
|
||||||
RUN mkdir -p /root/.config/nvim
|
|
||||||
COPY . /root/.config/nvim
|
|
||||||
|
|
||||||
@@ -1,96 +0,0 @@
|
|||||||
FROM ubuntu:22.04
|
|
||||||
|
|
||||||
|
|
||||||
#
|
|
||||||
# General boiler plate
|
|
||||||
#
|
|
||||||
|
|
||||||
|
|
||||||
# Ready image for installation
|
|
||||||
|
|
||||||
ARG DEBIAN_FRONTEND=noninteractive
|
|
||||||
|
|
||||||
RUN apt update -y && apt upgrade -y
|
|
||||||
|
|
||||||
# Install generic dependencies
|
|
||||||
|
|
||||||
RUN apt install git python3 python3-pip sudo -y
|
|
||||||
|
|
||||||
# Set up user
|
|
||||||
|
|
||||||
ARG UNAME=dev
|
|
||||||
ARG UID=1000
|
|
||||||
ARG GID=1000
|
|
||||||
RUN groupadd -g $GID -o $UNAME
|
|
||||||
RUN useradd -m -u $UID -g $GID -o -s /bin/bash $UNAME
|
|
||||||
RUN adduser $UNAME sudo
|
|
||||||
RUN echo "%sudo ALL=(ALL:ALL) NOPASSWD: ALL" | sudo tee -a /etc/sudoers.d/nopassword
|
|
||||||
|
|
||||||
|
|
||||||
#
|
|
||||||
# Install neovim
|
|
||||||
#
|
|
||||||
|
|
||||||
|
|
||||||
# Install neovim
|
|
||||||
|
|
||||||
WORKDIR /tmp
|
|
||||||
RUN git clone https://github.com/neovim/neovim.git
|
|
||||||
WORKDIR /tmp/neovim
|
|
||||||
RUN git checkout stable
|
|
||||||
RUN apt install ninja-build gettext cmake unzip curl -y
|
|
||||||
RUN make CMAKE_BUILD_TYPE=Release -j `nproc` && make install
|
|
||||||
WORKDIR /
|
|
||||||
|
|
||||||
# Install package dependencies
|
|
||||||
|
|
||||||
RUN python3 -m pip install pynvim # python3 provider
|
|
||||||
RUN python3 -m pip install jupytext # jupytext requirements
|
|
||||||
RUN apt install fd-find ripgrep -y # Telescope requirements
|
|
||||||
RUN apt install fonts-powerline -y # vim-airline requirements
|
|
||||||
RUN python3 -m pip install neovim-remote # vimtex requirements
|
|
||||||
RUN apt install curl -y # vim-doge requirements
|
|
||||||
RUN apt install npm python3-venv luarocks -y # mason build requirements
|
|
||||||
RUN python3 -m pip install cairosvg pnglatex plotly kaleido pyperclip jupyter-client ipykernel # molten requirements
|
|
||||||
|
|
||||||
# Configure
|
|
||||||
|
|
||||||
RUN mkdir -p "/home/${UNAME}/.config/nvim"
|
|
||||||
COPY . "/home/${UNAME}/.config/nvim"
|
|
||||||
RUN chown -R $UNAME:$UNAME "/home/${UNAME}/.config"
|
|
||||||
USER $UNAME
|
|
||||||
RUN nvim --headless "+Lazy! sync" +qa
|
|
||||||
RUN nvim --headless "+MasonInstall clangd pyright cmake-language-server bash-language-server texlab clang-format latexindent mdformat autopep8" +qa
|
|
||||||
RUN nvim --headless "+TSInstallSync markdown" +qa # For some reason, without this markdown installation fails the first time
|
|
||||||
USER root
|
|
||||||
|
|
||||||
|
|
||||||
#
|
|
||||||
# Install other tools
|
|
||||||
#
|
|
||||||
|
|
||||||
|
|
||||||
# Install firefox
|
|
||||||
# (Taken from https://askubuntu.com/a/1404401)
|
|
||||||
|
|
||||||
RUN apt install software-properties-common -y
|
|
||||||
RUN add-apt-repository ppa:mozillateam/ppa
|
|
||||||
RUN echo '\n\
|
|
||||||
Package: *\n\
|
|
||||||
Pin: release o=LP-PPA-mozillateam\n\
|
|
||||||
Pin-Priority: 1001\n\n\
|
|
||||||
Package: firefox\n\
|
|
||||||
Pin: version 1:1snap1-0ubuntu2\n\
|
|
||||||
Pin-Priority: -1\n\
|
|
||||||
' | tee /etc/apt/preferences.d/mozilla-firefox
|
|
||||||
RUN apt install firefox -y
|
|
||||||
RUN echo 'Unattended-Upgrade::Allowed-Origins:: "LP-PPA-mozillateam:${distro_codename}";' | tee /etc/apt/apt.conf.d/51unattended-upgrades-firefox
|
|
||||||
|
|
||||||
# Other stuff
|
|
||||||
|
|
||||||
RUN apt install fzf xclip -y
|
|
||||||
|
|
||||||
USER $UNAME
|
|
||||||
WORKDIR /home/$UNAME
|
|
||||||
CMD /bin/bash
|
|
||||||
|
|
||||||
@@ -1,52 +0,0 @@
|
|||||||
FROM ubuntu:22.04
|
|
||||||
|
|
||||||
|
|
||||||
#
|
|
||||||
# General boiler plate
|
|
||||||
#
|
|
||||||
|
|
||||||
|
|
||||||
# Ready image for installation
|
|
||||||
|
|
||||||
ARG DEBIAN_FRONTEND=noninteractive
|
|
||||||
|
|
||||||
RUN apt update -y && apt upgrade -y
|
|
||||||
|
|
||||||
# Install generic dependencies
|
|
||||||
|
|
||||||
RUN apt install git python3 python3-pip -y
|
|
||||||
|
|
||||||
#
|
|
||||||
# Install neovim
|
|
||||||
#
|
|
||||||
|
|
||||||
|
|
||||||
# Install neovim
|
|
||||||
|
|
||||||
WORKDIR /tmp
|
|
||||||
RUN git clone https://github.com/neovim/neovim.git
|
|
||||||
WORKDIR /tmp/neovim
|
|
||||||
RUN git checkout stable
|
|
||||||
RUN apt install ninja-build gettext cmake unzip curl -y
|
|
||||||
RUN make CMAKE_BUILD_TYPE=Release -j `nproc` && make install
|
|
||||||
WORKDIR /
|
|
||||||
|
|
||||||
# Install package dependencies
|
|
||||||
|
|
||||||
RUN python3 -m pip install pynvim # python3 provider
|
|
||||||
RUN python3 -m pip install jupytext # jupytext requirements
|
|
||||||
RUN apt install fd-find ripgrep -y # Telescope requirements
|
|
||||||
RUN apt install fonts-powerline -y # vim-airline requirements
|
|
||||||
RUN python3 -m pip install neovim-remote # vimtex requirements
|
|
||||||
RUN apt install curl -y # vim-doge requirements
|
|
||||||
RUN apt install npm python3-venv luarocks -y # mason build requirements
|
|
||||||
RUN python3 -m pip install cairosvg pnglatex plotly kaleido pyperclip jupyter-client ipykernel # molten requirements
|
|
||||||
|
|
||||||
# Configure
|
|
||||||
|
|
||||||
RUN mkdir -p /root/.config/nvim
|
|
||||||
COPY . /root/.config/nvim
|
|
||||||
RUN nvim --headless "+Lazy! sync" +qa
|
|
||||||
RUN nvim --headless "+MasonInstall clangd pyright cmake-language-server bash-language-server texlab clang-format latexindent luaformatter mdformat autopep8" +qa
|
|
||||||
RUN nvim --headless "+TSInstallSync markdown" +qa # For some reason, without this markdown installation fails the first time
|
|
||||||
|
|
||||||
@@ -1,17 +1,3 @@
|
|||||||
require("set")
|
require('set')
|
||||||
require("remap")
|
require('plugins')
|
||||||
|
require('keymaps')
|
||||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/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",
|
|
||||||
"--branch=stable", -- latest stable release
|
|
||||||
lazypath,
|
|
||||||
})
|
|
||||||
end
|
|
||||||
vim.opt.rtp:prepend(lazypath)
|
|
||||||
|
|
||||||
require("lazy").setup("plugins")
|
|
||||||
|
|||||||
@@ -1,52 +0,0 @@
|
|||||||
{
|
|
||||||
"LuaSnip": { "branch": "master", "commit": "03c8e67eb7293c404845b3982db895d59c0d1538" },
|
|
||||||
"alpha-nvim": { "branch": "main", "commit": "bf3c8bb8c02ed3d9644cc5bbc48e2bdc39349cd7" },
|
|
||||||
"auto-session": { "branch": "main", "commit": "9d02776ed42874d37869dc683396234e3724b52d" },
|
|
||||||
"cellular-automaton.nvim": { "branch": "main", "commit": "11aea08aa084f9d523b0142c2cd9441b8ede09ed" },
|
|
||||||
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
|
||||||
"cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" },
|
|
||||||
"cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
|
|
||||||
"cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "031e6ba70b0ad5eee49fd2120ff7a2e325b17fa7" },
|
|
||||||
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
|
||||||
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
|
|
||||||
"copilot.vim": { "branch": "release", "commit": "87038123804796ca7af20d1b71c3428d858a9124" },
|
|
||||||
"dressing.nvim": { "branch": "master", "commit": "1b7921eecc65af1baf8ac1dc06f0794934cbcfb2" },
|
|
||||||
"friendly-snippets": { "branch": "main", "commit": "de8fce94985873666bd9712ea3e49ee17aadb1ed" },
|
|
||||||
"gruvbox.nvim": { "branch": "main", "commit": "49d9c0b150ba70efcd831ec7b3cb8ee740067045" },
|
|
||||||
"harpoon": { "branch": "master", "commit": "1bc17e3e42ea3c46b33c0bbad6a880792692a1b3" },
|
|
||||||
"lazy.nvim": { "branch": "main", "commit": "077102c5bfc578693f12377846d427f49bc50076" },
|
|
||||||
"lsp-colors.nvim": { "branch": "main", "commit": "2bbe7541747fd339bdd8923fc45631a09bb4f1e5" },
|
|
||||||
"lsp-zero.nvim": { "branch": "v3.x", "commit": "56db3d5ce5476b183783160e6045f7337ba12b83" },
|
|
||||||
"lualine.nvim": { "branch": "master", "commit": "b431d228b7bbcdaea818bdc3e25b8cdbe861f056" },
|
|
||||||
"markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" },
|
|
||||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "25c11854aa25558ee6c03432edfa0df0217324be" },
|
|
||||||
"mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" },
|
|
||||||
"molten-nvim": { "branch": "main", "commit": "8346bba69e0de96278dad2038e9be74605908b7d" },
|
|
||||||
"neoformat": { "branch": "master", "commit": "d9d3311097eacdba9bd7a425b267d304b509e7ea" },
|
|
||||||
"noice.nvim": { "branch": "main", "commit": "df448c649ef6bc5a6a633a44f2ad0ed8d4442499" },
|
|
||||||
"nui.nvim": { "branch": "main", "commit": "b58e2bfda5cea347c9d58b7f11cf3012c7b3953f" },
|
|
||||||
"nvim-cmp": { "branch": "main", "commit": "ae644feb7b67bf1ce4260c231d1d4300b19c6f30" },
|
|
||||||
"nvim-dap": { "branch": "master", "commit": "7ff6936010b7222fea2caea0f67ed77f1b7c60dd" },
|
|
||||||
"nvim-dap-ui": { "branch": "master", "commit": "ffa89839f97bad360e78428d5c740fdad9a0ff02" },
|
|
||||||
"nvim-lspconfig": { "branch": "master", "commit": "541f3a2781de481bb84883889e4d9f0904250a56" },
|
|
||||||
"nvim-nio": { "branch": "master", "commit": "a428f309119086dc78dd4b19306d2d67be884eee" },
|
|
||||||
"nvim-tree.lua": { "branch": "master", "commit": "f5f67892996b280ae78b1b0a2d07c4fa29ae0905" },
|
|
||||||
"nvim-treesitter": { "branch": "master", "commit": "92725df6222614307c4712eb9982e5287f21aa11" },
|
|
||||||
"nvim-web-devicons": { "branch": "master", "commit": "19d257cf889f79f4022163c3fbb5e08639077bd8" },
|
|
||||||
"overseer.nvim": { "branch": "master", "commit": "6f8bc37eb729a00e185cdf38b1ed3309a05bfeef" },
|
|
||||||
"plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" },
|
|
||||||
"session-lens": { "branch": "main", "commit": "eae46b472b3150f5ec0f977556e8085683d49eb0" },
|
|
||||||
"sqlite.nvim": { "branch": "master", "commit": "53115a1a73972ce75c9a371a682d27286be9e81e" },
|
|
||||||
"telescope.nvim": { "branch": "master", "commit": "d90956833d7c27e73c621a61f20b29fdb7122709" },
|
|
||||||
"time-tracker.nvim": { "branch": "master", "commit": "c0b87c30484920ed1b9a4589eb62902015dfe5c2" },
|
|
||||||
"todo-comments.nvim": { "branch": "main", "commit": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" },
|
|
||||||
"toggleterm.nvim": { "branch": "main", "commit": "48be57eaba817f038d61bbf64d2c597f578c0827" },
|
|
||||||
"trouble.nvim": { "branch": "main", "commit": "3609bb9a82bbab1ef95cf2c27ce7e52267a7d40d" },
|
|
||||||
"undotree": { "branch": "master", "commit": "78b5241191852ffa9bb5da5ff2ee033160798c3b" },
|
|
||||||
"vim-doge": { "branch": "master", "commit": "188351964c8b2540a69c1d2648b3c6e7877a016f" },
|
|
||||||
"vim-flog": { "branch": "master", "commit": "6f80c1ffa7068ca8cc0e29af7af4f6ed0717e65e" },
|
|
||||||
"vim-fugitive": { "branch": "master", "commit": "d4877e54cef67f5af4f950935b1ade19ed6b7370" },
|
|
||||||
"vim-surround": { "branch": "master", "commit": "3d188ed2113431cf8dac77be61b842acb64433d9" },
|
|
||||||
"vimtex": { "branch": "master", "commit": "9a5ef1d4ac8e4e06071179ebe8121350fcb97861" },
|
|
||||||
"which-key.nvim": { "branch": "main", "commit": "8badb359f7ab8711e2575ef75dfe6fbbd87e4821" }
|
|
||||||
}
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
"utilyre/barbecue.nvim",
|
|
||||||
name = "barbecue",
|
|
||||||
version = "*",
|
|
||||||
dependencies = {"SmiteshP/nvim-navic", "nvim-tree/nvim-web-devicons"},
|
|
||||||
config = function()
|
|
||||||
require("barbecue").setup()
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
"GCBallesteros/jupytext.nvim",
|
|
||||||
config = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
"seandewar/killersheep.nvim",
|
|
||||||
config = function()
|
|
||||||
require("killersheep").setup {
|
|
||||||
gore = true, -- Enables/disables blood and gore.
|
|
||||||
keymaps = {
|
|
||||||
move_left = "h", -- Keymap to move cannon to the left.
|
|
||||||
move_right = "l", -- Keymap to move cannon to the right.
|
|
||||||
shoot = "<Space>" -- Keymap to shoot the cannon.
|
|
||||||
}
|
|
||||||
}
|
|
||||||
end
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
"ThePrimeagen/vim-be-good",
|
|
||||||
cmd = {
|
|
||||||
"VimBeGood"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -19,4 +19,4 @@ vim.keymap.set("n", "Q", "<nop>")
|
|||||||
vim.keymap.set("n", "q:", "<nop>")
|
vim.keymap.set("n", "q:", "<nop>")
|
||||||
vim.cmd [[call nvim_create_user_command('W', 'w', {'nargs': 0})]]
|
vim.cmd [[call nvim_create_user_command('W', 'w', {'nargs': 0})]]
|
||||||
|
|
||||||
-- vim.keymap.set("n", "<leader>cb", [[:up | %bd | e#<CR>]])
|
vim.keymap.set("n", "QQ", ":q!<CR>")
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
return {
|
return {
|
||||||
name = "Cargog Test",
|
name = "Cargo Test",
|
||||||
builder = function()
|
builder = function()
|
||||||
return {
|
return {
|
||||||
cmd = {
|
cmd = {
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
-------------------
|
--
|
||||||
|
--
|
||||||
-- Helper functions
|
-- Helper functions
|
||||||
-------------------
|
--
|
||||||
local function clamp(x, min, max) return math.max(math.min(x, max), min) end
|
--
|
||||||
|
|
||||||
local function get_random_image()
|
local function get_random_image()
|
||||||
local images = {
|
local images = {
|
||||||
@@ -54,11 +55,11 @@ local function get_random_image()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
local pmf = {0.25, 0.25, 0.25, 0.25}
|
local pmf = { 0.25, 0.25, 0.25, 0.25 }
|
||||||
local cdf = {}
|
local cdf = {}
|
||||||
|
|
||||||
cdf[1] = 0
|
cdf[1] = 0
|
||||||
for j = 2, #pmf+1 do
|
for j = 2, #pmf + 1 do
|
||||||
cdf[j] = cdf[j - 1] + pmf[j - 1]
|
cdf[j] = cdf[j - 1] + pmf[j - 1]
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -73,23 +74,22 @@ local function get_random_image()
|
|||||||
|
|
||||||
for j = 2, #cdf do
|
for j = 2, #cdf do
|
||||||
if r <= cdf[j] * 100 then
|
if r <= cdf[j] * 100 then
|
||||||
return images[j-1]
|
return images[j - 1]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-----------------
|
--
|
||||||
-- Configurtation
|
--
|
||||||
-----------------
|
-- Plugin configuration
|
||||||
|
--
|
||||||
|
--
|
||||||
|
|
||||||
return {
|
vim.pack.add({ "https://github.com/goolord/alpha-nvim" })
|
||||||
{
|
|
||||||
"goolord/alpha-nvim",
|
local dashboard = require("alpha.themes.dashboard")
|
||||||
lazy = false,
|
dashboard.section.header.val = get_random_image()
|
||||||
config = function()
|
dashboard.section.buttons.val = {
|
||||||
local dashboard = require("alpha.themes.dashboard")
|
|
||||||
dashboard.section.header.val = get_random_image()
|
|
||||||
dashboard.section.buttons.val = {
|
|
||||||
dashboard.button('n', ' New file', ':ene <BAR> startinsert <CR>'),
|
dashboard.button('n', ' New file', ':ene <BAR> startinsert <CR>'),
|
||||||
dashboard.button('r', ' Recent files', ':Telescope oldfiles <CR>'),
|
dashboard.button('r', ' Recent files', ':Telescope oldfiles <CR>'),
|
||||||
dashboard.button('f', ' Find file', ':Telescope find_files <CR>'),
|
dashboard.button('f', ' Find file', ':Telescope find_files <CR>'),
|
||||||
@@ -97,9 +97,6 @@ return {
|
|||||||
dashboard.button('p', ' Open project', ':Telescope session-lens search_session<CR>'),
|
dashboard.button('p', ' Open project', ':Telescope session-lens search_session<CR>'),
|
||||||
dashboard.button('l', ' Lazy', ':Lazy<CR>'),
|
dashboard.button('l', ' Lazy', ':Lazy<CR>'),
|
||||||
dashboard.button('q', ' Quit', ':qa<CR>')
|
dashboard.button('q', ' Quit', ':qa<CR>')
|
||||||
}
|
|
||||||
|
|
||||||
require("alpha").setup(dashboard.opts)
|
|
||||||
end
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
require("alpha").setup(dashboard.opts)
|
||||||
|
|||||||
@@ -1,45 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
"rmagatti/auto-session",
|
|
||||||
lazy = false,
|
|
||||||
dependencies = {
|
|
||||||
"nvim-lualine/lualine.nvim"
|
|
||||||
},
|
|
||||||
event = "VimEnter",
|
|
||||||
init = function()
|
|
||||||
vim.o.sessionoptions = "blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal,localoptions"
|
|
||||||
|
|
||||||
vim.keymap.set('n', '<leader>ss', '<cmd>SessionSave<CR>', {
|
|
||||||
desc = "Save"
|
|
||||||
})
|
|
||||||
vim.keymap.set('n', '<leader>sd', '<cmd>SessionDelete<CR>', {
|
|
||||||
desc = "Delete"
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
opts = {
|
|
||||||
log_level = "error",
|
|
||||||
auto_save_enabled = false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'rmagatti/session-lens',
|
|
||||||
cmd = {
|
|
||||||
"Autosession",
|
|
||||||
"SearchSession"
|
|
||||||
},
|
|
||||||
dependencies = {
|
|
||||||
'rmagatti/auto-session',
|
|
||||||
'nvim-telescope/telescope.nvim'
|
|
||||||
},
|
|
||||||
init = function()
|
|
||||||
vim.keymap.set('n', '<leader>sf', function() require('session-lens').search_session() end, {
|
|
||||||
desc = "Find"
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
config = function()
|
|
||||||
require('session-lens').setup({
|
|
||||||
prompt_title = 'Sessions'
|
|
||||||
})
|
|
||||||
end
|
|
||||||
}
|
|
||||||
}
|
|
||||||
30
nvim/.config/nvim/lua/plugins/autosession.lua
Normal file
30
nvim/.config/nvim/lua/plugins/autosession.lua
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
vim.pack.add({
|
||||||
|
-- dependencies
|
||||||
|
{ src = "https://github.com/nvim-lua/plenary.nvim" },
|
||||||
|
{ src = "https://github.com/nvim-telescope/telescope.nvim" },
|
||||||
|
{ src = "https://github.com/nvim-lualine/lualine.nvim" },
|
||||||
|
-- plugin
|
||||||
|
{ src = "https://github.com/rmagatti/auto-session" }
|
||||||
|
})
|
||||||
|
|
||||||
|
require("auto-session").setup({
|
||||||
|
suppressed_dirs = { "~/", "~/Projects", "~/Downloads", "/" },
|
||||||
|
log_level = "error",
|
||||||
|
auto_save_enabled = false,
|
||||||
|
session_lens = {
|
||||||
|
picker = "telescope",
|
||||||
|
load_on_setup = true,
|
||||||
|
mappings = {
|
||||||
|
delete_session = { "i", "<C-d>" },
|
||||||
|
alternate_session = { "i", "<C-s>" },
|
||||||
|
copy_session = { "i", "<C-y>" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.o.sessionoptions = "blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal,localoptions"
|
||||||
|
|
||||||
|
vim.keymap.set('n', '<leader>ss', '<cmd>AutoSession save<CR>', { desc = "Save" })
|
||||||
|
vim.keymap.set('n', '<leader>sd', '<cmd>AutoSession delete<CR>', { desc = "Delete" })
|
||||||
|
|
||||||
|
vim.keymap.set('n', '<leader>fs', '<cmd>Telescope session-lens<CR>', { desc = "Session-lens" })
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
'Eandrju/cellular-automaton.nvim',
|
|
||||||
cmd = {
|
|
||||||
"CellularAutomaton"
|
|
||||||
},
|
|
||||||
init = function() vim.keymap.set("n", "<leader>fu", "<cmd>CellularAutomaton make_it_rain<CR>") end
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,20 +1,16 @@
|
|||||||
return {
|
vim.pack.add({ "https://github.com/zbirenbaum/copilot.lua" })
|
||||||
{
|
|
||||||
"github/copilot.vim",
|
require("copilot").setup({
|
||||||
event = {
|
suggestion = {
|
||||||
"BufReadPost",
|
enabled = true,
|
||||||
"BufNewFile"
|
auto_trigger = true,
|
||||||
},
|
keymap = {
|
||||||
cmd = {
|
accept = "<C-l>"
|
||||||
"Copilot"
|
-- accept_word = false,
|
||||||
},
|
-- accept_line = false,
|
||||||
init = function()
|
-- next = "<M-]>",
|
||||||
vim.g.copilot_no_tab_map = true
|
-- prev = "<M-[>",
|
||||||
vim.g.copilot_assume_mapped = true
|
-- dismiss = "<C-]>"
|
||||||
vim.api.nvim_set_keymap("i", "<C-y>", 'copilot#Accept("<CR>")', {
|
|
||||||
silent = true,
|
|
||||||
expr = true
|
|
||||||
})
|
|
||||||
end
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
})
|
||||||
|
|||||||
@@ -1,154 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
'mfussenegger/nvim-dap',
|
|
||||||
config = function()
|
|
||||||
local dap = require("dap")
|
|
||||||
dap.adapters.gdb = {
|
|
||||||
type = "executable",
|
|
||||||
command = "gdb",
|
|
||||||
args = {
|
|
||||||
"-i",
|
|
||||||
"dap"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
dap.adapters.python = function(cb, config)
|
|
||||||
if config.request == 'attach' then
|
|
||||||
local port = (config.connect or config).port
|
|
||||||
local host = (config.connect or config).host or '127.0.0.1'
|
|
||||||
cb({
|
|
||||||
type = 'server',
|
|
||||||
port = assert(port, '`connect.port` is required for a python `attach` configuration'),
|
|
||||||
host = host,
|
|
||||||
options = {
|
|
||||||
source_filetype = 'python'
|
|
||||||
}
|
|
||||||
})
|
|
||||||
else
|
|
||||||
cb({
|
|
||||||
type = 'executable',
|
|
||||||
command = 'python',
|
|
||||||
args = {
|
|
||||||
'-m',
|
|
||||||
'debugpy.adapter'
|
|
||||||
},
|
|
||||||
options = {
|
|
||||||
source_filetype = 'python'
|
|
||||||
}
|
|
||||||
})
|
|
||||||
end
|
|
||||||
end
|
|
||||||
dap.configurations.c = {
|
|
||||||
{
|
|
||||||
name = "Launch",
|
|
||||||
type = "gdb",
|
|
||||||
request = "launch",
|
|
||||||
program = function()
|
|
||||||
return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file')
|
|
||||||
end,
|
|
||||||
cwd = "${workspaceFolder}",
|
|
||||||
stopAtBeginningOfMainSubprogram = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
dap.configurations.cpp = {
|
|
||||||
{
|
|
||||||
name = "Launch",
|
|
||||||
type = "gdb",
|
|
||||||
request = "launch",
|
|
||||||
program = function()
|
|
||||||
return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file')
|
|
||||||
end,
|
|
||||||
cwd = "${workspaceFolder}",
|
|
||||||
stopAtBeginningOfMainSubprogram = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
dap.configurations.python = {
|
|
||||||
{
|
|
||||||
type = 'python',
|
|
||||||
request = 'launch',
|
|
||||||
name = "Launch file",
|
|
||||||
|
|
||||||
program = "${file}",
|
|
||||||
pythonPath = function()
|
|
||||||
local cwd = vim.fn.getcwd()
|
|
||||||
if vim.fn.executable(cwd .. '/venv/bin/python') == 1 then
|
|
||||||
return cwd .. '/venv/bin/python'
|
|
||||||
elseif vim.fn.executable(cwd .. '/.venv/bin/python') == 1 then
|
|
||||||
return cwd .. '/.venv/bin/python'
|
|
||||||
else
|
|
||||||
return '/usr/bin/python'
|
|
||||||
end
|
|
||||||
end
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>db", "<cmd>DapToggleBreakpoint<cr>", {
|
|
||||||
desc = "Toggle breakpoint"
|
|
||||||
})
|
|
||||||
vim.keymap.set("n", "<leader>dc", "<cmd>DapContinue<cr>", {
|
|
||||||
desc = "Continue"
|
|
||||||
})
|
|
||||||
vim.keymap.set("n", "<leader>dt", "<cmd>DapTerminate<cr>", {
|
|
||||||
desc = "Terminate"
|
|
||||||
})
|
|
||||||
vim.keymap.set("n", "<leader>di", "<cmd>DapStepInto<cr>", {
|
|
||||||
desc = "Step into"
|
|
||||||
})
|
|
||||||
vim.keymap.set("n", "<leader>dn", "<cmd>DapStepOver<cr>", {
|
|
||||||
desc = "Step over"
|
|
||||||
})
|
|
||||||
vim.keymap.set("n", "<leader>do", "<cmd>DapStepOut<cr>", {
|
|
||||||
desc = "Step out"
|
|
||||||
})
|
|
||||||
vim.keymap.set("n", '<Leader>dh', function() require('dap.ui.widgets').hover() end, {
|
|
||||||
desc = "Hover"
|
|
||||||
})
|
|
||||||
end
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"rcarriga/nvim-dap-ui",
|
|
||||||
dependencies = {
|
|
||||||
"mfussenegger/nvim-dap",
|
|
||||||
"nvim-neotest/nvim-nio"
|
|
||||||
},
|
|
||||||
config = function()
|
|
||||||
require("dapui").setup({
|
|
||||||
controls = {
|
|
||||||
enabled = false
|
|
||||||
},
|
|
||||||
layouts = {
|
|
||||||
{
|
|
||||||
elements = {
|
|
||||||
{
|
|
||||||
id = "scopes",
|
|
||||||
size = 0.33
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id = "breakpoints",
|
|
||||||
size = 0.33
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id = "stacks",
|
|
||||||
size = 0.33
|
|
||||||
}
|
|
||||||
},
|
|
||||||
position = "left",
|
|
||||||
size = 60
|
|
||||||
},
|
|
||||||
{
|
|
||||||
elements = {
|
|
||||||
{
|
|
||||||
id = "repl",
|
|
||||||
size = 1
|
|
||||||
}
|
|
||||||
},
|
|
||||||
position = "bottom",
|
|
||||||
size = 15
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
vim.keymap.set("n", "<leader>du", function() require("dapui").toggle() end, {
|
|
||||||
desc = " Toggle UI"
|
|
||||||
})
|
|
||||||
end
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
'kkoomen/vim-doge',
|
|
||||||
build = ':call doge#install()',
|
|
||||||
init = function()
|
|
||||||
vim.g.doge_enable_mappings = 0
|
|
||||||
vim.g.doge_doc_standard_cpp = 'doxygen_cpp_comment_slash'
|
|
||||||
vim.g.doge_mapping_comment_jump_forward = '<c-j>'
|
|
||||||
vim.g.doge_mapping_comment_jump_backward = '<c-k>'
|
|
||||||
|
|
||||||
vim.keymap.set('n', '<leader>gd', '<Plug>(doge-generate)', { silent = true, desc = "Generate doc"})
|
|
||||||
-- nmap <silent> <Leader>d <Plug>(doge-generate)
|
|
||||||
end
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
'stevearc/dressing.nvim',
|
|
||||||
event = 'VimEnter'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,22 +1,6 @@
|
|||||||
return {
|
vim.pack.add({
|
||||||
{
|
{ src = "https://github.com/tpope/vim-fugitive" },
|
||||||
'tpope/vim-fugitive',
|
{ src = "https://github.com/rbong/vim-flog" }
|
||||||
cmd = {
|
})
|
||||||
"Git"
|
|
||||||
},
|
vim.keymap.set("n", "<leader>gs", vim.cmd.Git)
|
||||||
init = function() vim.keymap.set("n", "<leader>gs", vim.cmd.Git) end
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'rbong/vim-flog',
|
|
||||||
cmd = {
|
|
||||||
"Flog",
|
|
||||||
"Floggit",
|
|
||||||
"Flogsplit"
|
|
||||||
},
|
|
||||||
dependencies = {
|
|
||||||
{
|
|
||||||
'tpope/vim-fugitive'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,21 +1,21 @@
|
|||||||
return {
|
vim.pack.add({
|
||||||
{
|
{
|
||||||
"ThePrimeagen/harpoon",
|
src = "https://github.com/nvim-lua/plenary.nvim"
|
||||||
-- branch = "harpoon2",
|
|
||||||
dependencies = {
|
|
||||||
{
|
|
||||||
"nvim-lua/plenary.nvim"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
init = function()
|
{
|
||||||
vim.keymap.set("n", "<C-e>", function() require("harpoon.ui").toggle_quick_menu() end, {desc = "Toggle harpoon ui"})
|
src = "https://github.com/ThePrimeagen/harpoon",
|
||||||
vim.keymap.set("n", "<leader>a", function() require("harpoon.mark").add_file() end, {desc = "Add to harpoon list"})
|
version = "harpoon2",
|
||||||
|
|
||||||
vim.keymap.set("n", "<C-h>", function() require("harpoon.ui").nav_file(1) end)
|
|
||||||
vim.keymap.set("n", "<C-t>", function() require("harpoon.ui").nav_file(2) end)
|
|
||||||
vim.keymap.set("n", "<C-n>", function() require("harpoon.ui").nav_file(3) end)
|
|
||||||
vim.keymap.set("n", "<C-s>", function() require("harpoon.ui").nav_file(4) end)
|
|
||||||
end
|
|
||||||
}
|
}
|
||||||
|
})
|
||||||
|
|
||||||
}
|
local harpoon = require("harpoon")
|
||||||
|
|
||||||
|
harpoon:setup()
|
||||||
|
|
||||||
|
vim.keymap.set("n", "<leader>a", function() harpoon:list():add() end)
|
||||||
|
vim.keymap.set("n", "<C-e>", function() harpoon.ui:toggle_quick_menu(harpoon:list()) end)
|
||||||
|
|
||||||
|
vim.keymap.set("n", "<C-h>", function() harpoon:list():select(1) end)
|
||||||
|
vim.keymap.set("n", "<C-t>", function() harpoon:list():select(2) end)
|
||||||
|
vim.keymap.set("n", "<C-n>", function() harpoon:list():select(3) end)
|
||||||
|
vim.keymap.set("n", "<C-s>", function() harpoon:list():select(4) end)
|
||||||
|
|||||||
10
nvim/.config/nvim/lua/plugins/init.lua
Normal file
10
nvim/.config/nvim/lua/plugins/init.lua
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
local plugin_dir = vim.fn.stdpath('config') .. '/lua/plugins'
|
||||||
|
local plugin_files = vim.fn.glob(plugin_dir .. '/*.lua', false, true)
|
||||||
|
|
||||||
|
for _, file in ipairs(plugin_files) do
|
||||||
|
local plugin_name = vim.fn.fnamemodify(file, ':t:r')
|
||||||
|
|
||||||
|
if plugin_name ~= "init" then
|
||||||
|
require('plugins.' .. plugin_name)
|
||||||
|
end
|
||||||
|
end
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
"folke/lazy.nvim",
|
|
||||||
tag = "stable"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,193 +1,114 @@
|
|||||||
return {
|
--
|
||||||
{
|
--
|
||||||
{
|
-- Plugin config
|
||||||
'VonHeikemen/lsp-zero.nvim',
|
--
|
||||||
branch = 'v3.x',
|
--
|
||||||
lazy = true,
|
|
||||||
config = false,
|
vim.pack.add({
|
||||||
init = function()
|
{ src = "https://github.com/neovim/nvim-lspconfig" },
|
||||||
-- Disable automatic setup, we are doing it manually
|
{ src = "https://github.com/mason-org/mason-lspconfig.nvim" },
|
||||||
vim.g.lsp_zero_extend_cmp = 0
|
{ src = "https://github.com/mason-org/mason.nvim" },
|
||||||
vim.g.lsp_zero_extend_lspconfig = 0
|
})
|
||||||
|
|
||||||
|
require("mason").setup()
|
||||||
|
require("mason-lspconfig").setup()
|
||||||
|
|
||||||
|
--
|
||||||
|
--
|
||||||
|
-- Diagnostic config
|
||||||
|
--
|
||||||
|
--
|
||||||
|
|
||||||
|
vim.diagnostic.config({
|
||||||
|
virtual_text = true,
|
||||||
|
severity_sort = true,
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd("CursorHold", {
|
||||||
|
callback = function()
|
||||||
|
local width = vim.api.nvim_win_get_width(0);
|
||||||
|
|
||||||
|
vim.diagnostic.open_float(nil, {
|
||||||
|
scope = "cursor",
|
||||||
|
close_events = { "BufLeave", "CursorMoved", "InsertEnter", "FocusLost" },
|
||||||
|
source = true,
|
||||||
|
relative = "editor",
|
||||||
|
width = 40,
|
||||||
|
focusable = false,
|
||||||
|
-- focus = false,
|
||||||
|
border = "rounded",
|
||||||
|
title = "Diagnostics",
|
||||||
|
header = "",
|
||||||
|
title_pos = "center",
|
||||||
|
offset_x = width,
|
||||||
|
offset_y = -1,
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
-- vim.diagnostic.handlers["quickfix"] = {
|
||||||
|
-- show = function(_, _, _, _)
|
||||||
|
-- vim.diagnostic.setqflist({ open = false })
|
||||||
|
-- end,
|
||||||
|
--
|
||||||
|
-- hide = function(_, _)
|
||||||
|
-- vim.fn.setqflist({}, 'r')
|
||||||
|
-- end
|
||||||
|
-- }
|
||||||
|
|
||||||
|
--
|
||||||
|
--
|
||||||
|
-- Completion & Formatting
|
||||||
|
--
|
||||||
|
--
|
||||||
|
|
||||||
|
vim.o.completeopt = "menu,menuone,noinsert,fuzzy"
|
||||||
|
vim.api.nvim_set_keymap("i", "<C-Space>", "<C-x><C-o>", { noremap = true })
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd('LspAttach', {
|
||||||
|
group = vim.api.nvim_create_augroup('my.lsp', {}),
|
||||||
|
callback = function(args)
|
||||||
|
local client = assert(vim.lsp.get_client_by_id(args.data.client_id))
|
||||||
|
|
||||||
|
-- Make tab accept the selected completion
|
||||||
|
vim.keymap.set('i', '<Tab>', function()
|
||||||
|
if vim.fn.pumvisible() == 1 then
|
||||||
|
return '<C-y>'
|
||||||
|
else
|
||||||
|
return '<Tab>'
|
||||||
end
|
end
|
||||||
},
|
end, { expr = true })
|
||||||
{
|
|
||||||
'williamboman/mason.nvim',
|
|
||||||
lazy = false,
|
|
||||||
opts = {
|
|
||||||
registries = {
|
|
||||||
"github:antsouchlos/mason-registry",
|
|
||||||
"github:mason-org/mason-registry"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
-- Autocompletion
|
-- Make enter just insert a newline (don't accept completion)
|
||||||
{
|
vim.keymap.set('i', '<CR>', function()
|
||||||
'hrsh7th/nvim-cmp',
|
if vim.fn.pumvisible() == 1 then
|
||||||
event = 'InsertEnter',
|
return '<C-e><CR>'
|
||||||
dependencies = {
|
else
|
||||||
'L3MON4D3/LuaSnip',
|
return '<CR>'
|
||||||
'hrsh7th/cmp-buffer',
|
|
||||||
'hrsh7th/cmp-path',
|
|
||||||
'hrsh7th/cmp-cmdline',
|
|
||||||
'hrsh7th/cmp-nvim-lsp-signature-help',
|
|
||||||
'saadparwaiz1/cmp_luasnip'
|
|
||||||
},
|
|
||||||
config = function()
|
|
||||||
local lsp_zero = require('lsp-zero')
|
|
||||||
lsp_zero.extend_cmp()
|
|
||||||
|
|
||||||
local cmp = require('cmp')
|
|
||||||
|
|
||||||
cmp.setup({
|
|
||||||
sources = {
|
|
||||||
-- LuaFormatter off
|
|
||||||
{ name = 'path' },
|
|
||||||
{ name = 'nvim_lsp' },
|
|
||||||
{ name = 'nvim_lua' },
|
|
||||||
{ name = 'luasnip', keyword_length = 2 },
|
|
||||||
{ name = 'buffer', keyword_length = 3 },
|
|
||||||
{ name = 'nvim_lsp_signature_help' }
|
|
||||||
-- LuaFormatter on
|
|
||||||
},
|
|
||||||
formatting = lsp_zero.cmp_format(),
|
|
||||||
mapping = cmp.mapping.preset.insert({
|
|
||||||
['<C-p>'] = cmp.mapping.select_prev_item(cmp_select),
|
|
||||||
['<C-n>'] = cmp.mapping.select_next_item(cmp_select),
|
|
||||||
['<Tab>'] = cmp.mapping.confirm({
|
|
||||||
select = true
|
|
||||||
}),
|
|
||||||
['<C-Space>'] = cmp.mapping.complete()
|
|
||||||
}),
|
|
||||||
snippet = {
|
|
||||||
expand = function(args) require('luasnip').lsp_expand(args.body) end
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
cmp.setup.filetype('gitcommit', {
|
|
||||||
-- LuaFormatter off
|
|
||||||
sources = cmp.config.sources(
|
|
||||||
{ { name = 'git' } },
|
|
||||||
{ { name = 'buffer' } }
|
|
||||||
)
|
|
||||||
-- LuaFormatter on
|
|
||||||
})
|
|
||||||
|
|
||||||
cmp.setup.cmdline({
|
|
||||||
'/',
|
|
||||||
'?'
|
|
||||||
}, {
|
|
||||||
mapping = cmp.mapping.preset.cmdline(),
|
|
||||||
sources = {
|
|
||||||
{
|
|
||||||
name = 'buffer'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
cmp.setup.cmdline(':', {
|
|
||||||
mapping = cmp.mapping.preset.cmdline(),
|
|
||||||
sources = cmp.config.sources({
|
|
||||||
{
|
|
||||||
name = 'path'
|
|
||||||
}
|
|
||||||
}, {
|
|
||||||
{
|
|
||||||
name = 'cmdline'
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
|
||||||
end
|
end
|
||||||
},
|
end, { expr = true })
|
||||||
|
|
||||||
-- LSP
|
if client:supports_method('textDocument/completion') then
|
||||||
{
|
-- Trigger autocompletion on every keypress
|
||||||
'neovim/nvim-lspconfig',
|
local chars = {}; for i = 32, 126 do table.insert(chars, string.char(i)) end
|
||||||
cmd = {
|
client.server_capabilities.completionProvider.triggerCharacters = chars
|
||||||
'LspInfo',
|
|
||||||
'LspInstall',
|
|
||||||
'LspStart'
|
|
||||||
},
|
|
||||||
event = {
|
|
||||||
'BufReadPre',
|
|
||||||
'BufNewFile'
|
|
||||||
},
|
|
||||||
dependencies = {
|
|
||||||
'hrsh7th/cmp-nvim-lsp',
|
|
||||||
'williamboman/mason-lspconfig.nvim',
|
|
||||||
"folke/trouble.nvim"
|
|
||||||
},
|
|
||||||
config = function()
|
|
||||||
local lsp_zero = require('lsp-zero')
|
|
||||||
lsp_zero.extend_lspconfig()
|
|
||||||
|
|
||||||
lsp_zero.on_attach(function(client, bufnr)
|
vim.lsp.completion.enable(true, client.id, args.buf, { autotrigger = true })
|
||||||
vim.keymap.set("n", "<leader>ld", function() vim.lsp.buf.definition() end, {
|
|
||||||
desc = "Go to definition"
|
|
||||||
})
|
|
||||||
vim.keymap.set("n", "<leader>lh", function() vim.lsp.buf.hover() end, {
|
|
||||||
desc = "Hover"
|
|
||||||
})
|
|
||||||
vim.keymap.set("n", "<leader>lr", ":Trouble lsp_references<CR>", {
|
|
||||||
desc = "Show references"
|
|
||||||
})
|
|
||||||
vim.keymap.set("n", "<leader>ln", function() vim.lsp.buf.rename() end, {
|
|
||||||
desc = "Rename"
|
|
||||||
})
|
|
||||||
vim.keymap.set("n", "<leader>ls", function() vim.lsp.buf.signature_help() end, {
|
|
||||||
desc = "Signature help"
|
|
||||||
})
|
|
||||||
vim.keymap.set("n", "<leader>la", function() vim.lsp.buf.code_action() end, {
|
|
||||||
desc = "Code actions"
|
|
||||||
})
|
|
||||||
end)
|
|
||||||
|
|
||||||
require('mason-lspconfig').setup({
|
|
||||||
ensure_installed = {
|
|
||||||
'clangd',
|
|
||||||
'pyright',
|
|
||||||
'cmake',
|
|
||||||
'texlab'
|
|
||||||
},
|
|
||||||
handlers = {
|
|
||||||
lsp_zero.default_setup,
|
|
||||||
lua_ls = function()
|
|
||||||
local lua_opts = lsp_zero.nvim_lua_ls()
|
|
||||||
require('lspconfig').lua_ls.setup(lua_opts)
|
|
||||||
end
|
end
|
||||||
}
|
|
||||||
|
vim.keymap.set('n', '<M-L>',
|
||||||
|
function() vim.lsp.buf.format() end, {
|
||||||
|
desc = "Format",
|
||||||
|
noremap = true,
|
||||||
|
silent = true
|
||||||
|
})
|
||||||
|
vim.keymap.set('i', '<M-L>',
|
||||||
|
function() vim.lsp.buf.format() end, {
|
||||||
|
desc = "Format",
|
||||||
|
noremap = true,
|
||||||
|
silent = true
|
||||||
})
|
})
|
||||||
|
|
||||||
require('lspconfig')['clangd'].setup {
|
vim.keymap.set("n", "gd", function() vim.lsp.buf.definition() end, { desc = "Go to definition" })
|
||||||
cmd = {
|
end,
|
||||||
"clangd",
|
})
|
||||||
"--background-index",
|
|
||||||
"--clang-tidy",
|
|
||||||
"--completion-style=bundled",
|
|
||||||
"--cross-file-rename",
|
|
||||||
"--header-insertion=iwyu",
|
|
||||||
-- Required for embedded system compilers
|
|
||||||
"--query-driver=/**/*g++",
|
|
||||||
"--offset-encoding=utf-16"
|
|
||||||
-- "-j=8",
|
|
||||||
-- "--malloc-trim",
|
|
||||||
-- "--pch-storage=memory"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
require('lspconfig').matlab_ls.setup({
|
|
||||||
settings = {
|
|
||||||
filetypes = {
|
|
||||||
"matlab"
|
|
||||||
},
|
|
||||||
matlab = {
|
|
||||||
installPath = "/opt/matlab/R2023a/"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
single_file_support = true
|
|
||||||
})
|
|
||||||
end
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,11 +1,9 @@
|
|||||||
return {
|
vim.pack.add({
|
||||||
{
|
{ src = "https://github.com/nvim-tree/nvim-web-devicons" },
|
||||||
'nvim-lualine/lualine.nvim',
|
{ src = "https://github.com/nvim-lualine/lualine.nvim" }
|
||||||
event = "VimEnter",
|
})
|
||||||
dependencies = {
|
|
||||||
'nvim-tree/nvim-web-devicons'
|
require("lualine").setup({
|
||||||
},
|
|
||||||
opts = {
|
|
||||||
options = {
|
options = {
|
||||||
theme = 'gruvbox_dark'
|
theme = 'gruvbox_dark'
|
||||||
},
|
},
|
||||||
@@ -15,7 +13,6 @@ return {
|
|||||||
'mason',
|
'mason',
|
||||||
'lazy',
|
'lazy',
|
||||||
'toggleterm'
|
'toggleterm'
|
||||||
}
|
},
|
||||||
}
|
sections = { lualine_x = { { color = { fg = "#ff9e64" } } } }
|
||||||
}
|
})
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,48 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
"L3MON4D3/LuaSnip",
|
|
||||||
dependencies = {
|
|
||||||
{
|
|
||||||
'rafamadriz/friendly-snippets'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
version = "v2.*",
|
|
||||||
build = "make install_jsregexp",
|
|
||||||
event = {
|
|
||||||
"InsertEnter"
|
|
||||||
},
|
|
||||||
init = function()
|
|
||||||
vim.keymap.set({
|
|
||||||
"i"
|
|
||||||
}, "<c-j>", function() require("luasnip").expand() end, {
|
|
||||||
silent = true
|
|
||||||
})
|
|
||||||
vim.keymap.set({
|
|
||||||
"i",
|
|
||||||
"s"
|
|
||||||
}, "<c-j>", function() require("luasnip").jump(1) end, {
|
|
||||||
silent = true
|
|
||||||
})
|
|
||||||
vim.keymap.set({
|
|
||||||
"i",
|
|
||||||
"s"
|
|
||||||
}, "<c-k>", function() require("luasnip").jump(-1) end, {
|
|
||||||
silent = true
|
|
||||||
})
|
|
||||||
|
|
||||||
end,
|
|
||||||
config = function()
|
|
||||||
local loader = require("luasnip.loaders.from_lua")
|
|
||||||
loader.lazy_load({
|
|
||||||
paths = {
|
|
||||||
"./snippets"
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
require("luasnip").config.set_config({
|
|
||||||
enable_autosnippets = true,
|
|
||||||
store_selection_keys = "<leader>v"
|
|
||||||
})
|
|
||||||
end
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
"iamcco/markdown-preview.nvim",
|
|
||||||
cmd = {
|
|
||||||
"MarkdownPreviewToggle",
|
|
||||||
"MarkdownPreview",
|
|
||||||
"MarkdownPreviewStop"
|
|
||||||
},
|
|
||||||
ft = {
|
|
||||||
"markdown"
|
|
||||||
},
|
|
||||||
build = function() vim.fn["mkdp#util#install"]() end
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
"benlubas/molten-nvim",
|
|
||||||
build = ":UpdateRemotePlugins",
|
|
||||||
version = "v1.7.0",
|
|
||||||
init = function()
|
|
||||||
vim.keymap.set("n", "<localleader>mi", ":MoltenInit<CR>", {
|
|
||||||
silent = true,
|
|
||||||
desc = "Initialize the plugin"
|
|
||||||
})
|
|
||||||
vim.keymap.set("n", "<localleader>e", ":MoltenEvaluateOperator<CR>", {
|
|
||||||
silent = true,
|
|
||||||
desc = "run operator selection"
|
|
||||||
})
|
|
||||||
vim.keymap.set("n", "<localleader>rl", ":MoltenEvaluateLine<CR>", {
|
|
||||||
silent = true,
|
|
||||||
desc = "evaluate line"
|
|
||||||
})
|
|
||||||
vim.keymap.set("n", "<localleader>rr", ":MoltenReevaluateCell<CR>", {
|
|
||||||
silent = true,
|
|
||||||
desc = "re-evaluate cell"
|
|
||||||
})
|
|
||||||
vim.keymap.set("v", "<localleader>r", ":<C-u>MoltenEvaluateVisual<CR>gv", {
|
|
||||||
silent = true,
|
|
||||||
desc = "evaluate visual selection"
|
|
||||||
})
|
|
||||||
|
|
||||||
vim.g.molten_auto_open_output = false
|
|
||||||
vim.g.molten_virt_text_output = true
|
|
||||||
vim.g.molten_virt_text_max_lines = 32
|
|
||||||
end
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
'sbdchd/neoformat',
|
|
||||||
event = {
|
|
||||||
"BufReadPost",
|
|
||||||
"BufNewFile"
|
|
||||||
},
|
|
||||||
init = function()
|
|
||||||
vim.cmd([[
|
|
||||||
let g:neoformat_enabled_python = ['autopep8']
|
|
||||||
let g:neoformat_enabled_cpp = ['clangformat']
|
|
||||||
let g:neoformat_enabled_c = ['clangformat']
|
|
||||||
let g:neoformat_enable_lua = ['luaformatter']
|
|
||||||
let g:neoformat_enabled_cmake = ['cmakeformat']
|
|
||||||
|
|
||||||
let g:neoformat_markdown_mdformat = {
|
|
||||||
\ 'exe': 'mdformat',
|
|
||||||
\ 'args': ['--wrap=79', '--number'],
|
|
||||||
\ 'replace': 1,
|
|
||||||
\ }
|
|
||||||
let g:neoformat_enabled_markdown = ['mdformat']
|
|
||||||
|
|
||||||
let g:neoformat_enabled_latex = ['latexindent']
|
|
||||||
let g:latexindent_opt="-m -l -g=/dev/null"
|
|
||||||
]])
|
|
||||||
|
|
||||||
vim.api.nvim_set_keymap('n', '<M-L>', '<cmd>Neoformat<cr>', {
|
|
||||||
noremap = true,
|
|
||||||
silent = true
|
|
||||||
})
|
|
||||||
vim.api.nvim_set_keymap('i', '<M-L>', '<cmd>Neoformat<cr>', {
|
|
||||||
noremap = true,
|
|
||||||
silent = true
|
|
||||||
})
|
|
||||||
end
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,16 +1,10 @@
|
|||||||
-- lazy.nvim
|
vim.pack.add({
|
||||||
return {
|
{ src = "https://github.com/MunifTanjim/nui.nvim" },
|
||||||
"folke/noice.nvim",
|
{ src = "https://github.com/folke/noice.nvim" }
|
||||||
event = "VeryLazy",
|
})
|
||||||
opts = {
|
|
||||||
lsp = {
|
require("noice").setup({
|
||||||
signature = {
|
messages = { enabled = false },
|
||||||
enabled = false
|
|
||||||
},
|
|
||||||
hover = {
|
|
||||||
enabled = false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
views = {
|
views = {
|
||||||
cmdline_popup = {
|
cmdline_popup = {
|
||||||
backend = "popup",
|
backend = "popup",
|
||||||
@@ -31,8 +25,4 @@ return {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
})
|
||||||
dependencies = {
|
|
||||||
"MunifTanjim/nui.nvim"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,18 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
'nvim-tree/nvim-tree.lua',
|
|
||||||
cmd = {
|
|
||||||
"NvimTreeToggle",
|
|
||||||
"NvimTreeFocus"
|
|
||||||
},
|
|
||||||
init = function()
|
|
||||||
vim.opt.termguicolors = true
|
|
||||||
vim.keymap.set('n', '<leader>e', '<cmd>NvimTreeToggle<cr>', {
|
|
||||||
noremap = true,
|
|
||||||
silent = true,
|
|
||||||
desc = "Explorer"
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
config = function() require("nvim-tree").setup() end
|
|
||||||
}
|
|
||||||
}
|
|
||||||
4
nvim/.config/nvim/lua/plugins/oil.lua
Normal file
4
nvim/.config/nvim/lua/plugins/oil.lua
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
vim.pack.add({"https://github.com/stevearc/oil.nvim"})
|
||||||
|
require("oil").setup()
|
||||||
|
|
||||||
|
vim.keymap.set("n", "-", "<CMD>Oil<CR>", { desc = "Open parent directory" })
|
||||||
12
nvim/.config/nvim/lua/plugins/outline.lua
Normal file
12
nvim/.config/nvim/lua/plugins/outline.lua
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
vim.pack.add({ "https://github.com/hedyhli/outline.nvim" })
|
||||||
|
require("outline").setup({
|
||||||
|
outline_window = {
|
||||||
|
focus_on_open = false,
|
||||||
|
},
|
||||||
|
symbol_folding = {
|
||||||
|
autofold_depth = 3,
|
||||||
|
markers = { '', '' },
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.keymap.set("n", "<leader>l", "<cmd>Outline<CR>", { desc = "Toggle Outline" })
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
return {
|
vim.pack.add({
|
||||||
"stevearc/overseer.nvim",
|
{ src = "https://github.com/stevearc/overseer.nvim", version = "v1.6.0" }
|
||||||
config = function()
|
})
|
||||||
require("overseer").setup({
|
|
||||||
|
require("overseer").setup({
|
||||||
templates = {
|
templates = {
|
||||||
-- "builtin",
|
|
||||||
"user.cargo_build",
|
"user.cargo_build",
|
||||||
"user.cargo_clean",
|
"user.cargo_clean",
|
||||||
"user.cargo_run",
|
"user.cargo_run",
|
||||||
@@ -14,19 +14,9 @@ return {
|
|||||||
"user.cmake_test",
|
"user.cmake_test",
|
||||||
"user.python_run"
|
"user.python_run"
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>oo", function() require("overseer").toggle() end, {
|
vim.keymap.set("n", "<leader>oo", function() require("overseer").toggle() end, { desc = "Toggle" })
|
||||||
desc = "Toggle"
|
vim.keymap.set("n", "<leader>or", ":OverseerRun<CR>", { desc = "Run" })
|
||||||
})
|
vim.keymap.set("n", "<leader>oq", ":OverseerQuickAction<CR>", { desc = "Quick Action" })
|
||||||
vim.keymap.set("n", "<leader>or", ":OverseerRun<CR>", {
|
vim.keymap.set("n", "<leader>of", ":OverseerQuickAction open float<CR>", { desc = "Open Float" })
|
||||||
desc = "Run"
|
|
||||||
})
|
|
||||||
vim.keymap.set("n", "<leader>oq", ":OverseerQuickAction<CR>", {
|
|
||||||
desc = "Quick Action"
|
|
||||||
})
|
|
||||||
vim.keymap.set("n", "<leader>of", ":OverseerQuickAction open float<CR>", {
|
|
||||||
desc = "Open Float"
|
|
||||||
})
|
|
||||||
end
|
|
||||||
}
|
|
||||||
|
|||||||
2
nvim/.config/nvim/lua/plugins/quicker.lua
Normal file
2
nvim/.config/nvim/lua/plugins/quicker.lua
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
vim.pack.add({"https://github.com/stevearc/quicker.nvim"})
|
||||||
|
require("quicker").setup()
|
||||||
@@ -1,6 +1 @@
|
|||||||
return {
|
vim.pack.add({"https://github.com/tpope/vim-surround"})
|
||||||
{
|
|
||||||
"tpope/vim-surround",
|
|
||||||
event = "InsertEnter"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,50 +1,26 @@
|
|||||||
-- -----------------
|
vim.pack.add({
|
||||||
-- -- Helper Functions
|
{ src = "https://github.com/nvim-lua/plenary.nvim" },
|
||||||
-- -------------------
|
{ src = "https://github.com/nvim-telescope/telescope.nvim" },
|
||||||
-- -- If in a git repo, execute the given function with the option
|
{ src = "https://github.com/nvim-telescope/telescope-ui-select.nvim" }
|
||||||
-- -- "cwd=<git root>". Otherwise, execute the function with no options.
|
})
|
||||||
-- local function execute_in_repo_root(func)
|
|
||||||
-- local function is_git_repo()
|
|
||||||
-- vim.fn.system("git rev-parse --is-inside-work-tree")
|
|
||||||
--
|
|
||||||
-- return vim.v.shell_error == 0
|
|
||||||
-- end
|
|
||||||
--
|
|
||||||
-- local function get_git_root()
|
|
||||||
-- local dot_git_path = vim.fn.finddir(".git", ".;")
|
|
||||||
-- return vim.fn.fnamemodify(dot_git_path, ":h")
|
|
||||||
-- end
|
|
||||||
--
|
|
||||||
-- local opts = {}
|
|
||||||
--
|
|
||||||
-- if is_git_repo() then opts = {cwd = get_git_root()} end
|
|
||||||
--
|
|
||||||
-- func(opts)
|
|
||||||
-- end
|
|
||||||
-----------------------
|
|
||||||
-- Plugin Configuration
|
|
||||||
-----------------------
|
|
||||||
return {
|
|
||||||
{
|
|
||||||
'nvim-telescope/telescope.nvim',
|
|
||||||
version = '0.1.5',
|
|
||||||
dependencies = {
|
|
||||||
{
|
|
||||||
'nvim-lua/plenary.nvim'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
cmd = "Telescope",
|
|
||||||
init = function()
|
|
||||||
-- LuaFormatter off
|
|
||||||
vim.keymap.set('n', '<leader>ff', function() require("telescope.builtin").find_files() end,{desc = "Files"})
|
|
||||||
vim.keymap.set('n', '<leader>fg', function() require("telescope.builtin").live_grep() end,{desc = "grep"})
|
|
||||||
vim.keymap.set('n', '<leader>fa', function()
|
|
||||||
require("telescope.builtin").find_files({hidden = true})
|
|
||||||
end, {desc = "All files"})
|
|
||||||
|
|
||||||
vim.keymap.set('n', '<leader>fb', function() require("telescope.builtin").buffers() end, {desc = "Buffers"})
|
vim.pack.add({})
|
||||||
vim.keymap.set('n', '<leader>fh', function() require("telescope.builtin").help_tags() end, {desc = "Help tags"})
|
|
||||||
-- LuaFormatter on
|
vim.keymap.set('n', '<leader>ff', function() require("telescope.builtin").find_files() end, { desc = "Files" })
|
||||||
end
|
vim.keymap.set('n', '<leader>fg', function() require("telescope.builtin").live_grep() end, { desc = "grep" })
|
||||||
}
|
vim.keymap.set('n', '<leader>fa', function() require("telescope.builtin").find_files({ hidden = true }) end,
|
||||||
}
|
{ desc = "All files" })
|
||||||
|
|
||||||
|
vim.keymap.set('n', '<leader>fb', function() require("telescope.builtin").buffers() end, { desc = "Buffers" })
|
||||||
|
vim.keymap.set('n', '<leader>fh', function() require("telescope.builtin").help_tags() end, { desc = "Help tags" })
|
||||||
|
|
||||||
|
-- require("telescope").setup {
|
||||||
|
-- -- extensions = {
|
||||||
|
-- -- ["ui-select"] = {
|
||||||
|
-- -- require("telescope.themes").get_dropdown {
|
||||||
|
-- -- }
|
||||||
|
-- -- }
|
||||||
|
-- -- }
|
||||||
|
-- }
|
||||||
|
|
||||||
|
require("telescope").load_extension("ui-select")
|
||||||
|
|||||||
10
nvim/.config/nvim/lua/plugins/theme.lua
Normal file
10
nvim/.config/nvim/lua/plugins/theme.lua
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
vim.pack.add({"https://github.com/ellisonleao/gruvbox.nvim"})
|
||||||
|
|
||||||
|
require("gruvbox").setup({
|
||||||
|
contrast = "hard",
|
||||||
|
transparent_mode = true,
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.cmd("colorscheme gruvbox")
|
||||||
|
|
||||||
|
vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" })
|
||||||
@@ -1,63 +0,0 @@
|
|||||||
return {
|
|
||||||
-- {'doums/darcula', config = function() vim.cmd('colorscheme darcula') end}
|
|
||||||
-- {
|
|
||||||
-- "folke/tokyonight.nvim",
|
|
||||||
-- lazy = false,
|
|
||||||
-- priority = 1000,
|
|
||||||
-- opts = {},
|
|
||||||
-- config = function() vim.cmd('colorscheme tokyonight-moon') end
|
|
||||||
-- }
|
|
||||||
-- {
|
|
||||||
-- 'rose-pine/neovim',
|
|
||||||
-- config = function()
|
|
||||||
-- vim.cmd('colorscheme rose-pine-moon')
|
|
||||||
|
|
||||||
-- -- LuaFormatter off
|
|
||||||
-- vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" })
|
|
||||||
-- vim.api.nvim_set_hl(0, "FloatBorder", { bg = "none", fg = "none" })
|
|
||||||
-- vim.api.nvim_set_hl(0, "TelescopeNormal", { bg = "none" })
|
|
||||||
-- vim.api.nvim_set_hl(0, "TelescopeBorder", { bg = "none" })
|
|
||||||
-- -- LuaFormatter on
|
|
||||||
-- end
|
|
||||||
-- }
|
|
||||||
-- {
|
|
||||||
-- 'AlexvZyl/nordic.nvim',
|
|
||||||
-- lazy = false,
|
|
||||||
-- priority = 1000,
|
|
||||||
-- init = function()
|
|
||||||
-- require('nordic').setup {
|
|
||||||
-- telescope = {
|
|
||||||
-- style = 'classic'
|
|
||||||
-- -- style = 'flat'
|
|
||||||
-- }
|
|
||||||
-- }
|
|
||||||
-- require'nordic'.load()
|
|
||||||
-- end
|
|
||||||
-- }
|
|
||||||
-- {
|
|
||||||
-- "briones-gabriel/darcula-solid.nvim",
|
|
||||||
-- dependencies = "rktjmp/lush.nvim",
|
|
||||||
-- config = function()
|
|
||||||
-- vim.cmd 'colorscheme darcula-solid'
|
|
||||||
-- vim.cmd 'set termguicolors'
|
|
||||||
-- end
|
|
||||||
-- }
|
|
||||||
{
|
|
||||||
"ellisonleao/gruvbox.nvim",
|
|
||||||
priority = 1000,
|
|
||||||
config = true,
|
|
||||||
opts = {
|
|
||||||
contrast = "hard"
|
|
||||||
},
|
|
||||||
init = function()
|
|
||||||
vim.cmd("colorscheme gruvbox")
|
|
||||||
|
|
||||||
-- LuaFormatter off
|
|
||||||
vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" })
|
|
||||||
vim.api.nvim_set_hl(0, "NoiceCmdlineIcon", { bg = "#1d2021" })
|
|
||||||
vim.api.nvim_set_hl(0, "NoiceCmdlinePopupBorder", { bg = "#1d2021" })
|
|
||||||
vim.api.nvim_set_hl(0, "NoiceCmdlinePopupTitle", { bg = "#1d2021" })
|
|
||||||
-- LuaFormatter on
|
|
||||||
end
|
|
||||||
}
|
|
||||||
}
|
|
||||||
8
nvim/.config/nvim/lua/plugins/time-tracker.lua
Normal file
8
nvim/.config/nvim/lua/plugins/time-tracker.lua
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
vim.pack.add({
|
||||||
|
{ src = "https://github.com/3rd/sqlite.nvim" },
|
||||||
|
{ src = "https://github.com/3rd/time-tracker.nvim" }
|
||||||
|
})
|
||||||
|
|
||||||
|
require("time-tracker").setup({
|
||||||
|
data_file = vim.fn.stdpath("data") .. "/time-tracker.db"
|
||||||
|
})
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
return {
|
|
||||||
"3rd/time-tracker.nvim",
|
|
||||||
dependencies = {
|
|
||||||
"3rd/sqlite.nvim"
|
|
||||||
},
|
|
||||||
event = "VeryLazy",
|
|
||||||
opts = {
|
|
||||||
data_file = vim.fn.stdpath("data") .. "/time-tracker.db"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
8
nvim/.config/nvim/lua/plugins/todo-comments.lua
Normal file
8
nvim/.config/nvim/lua/plugins/todo-comments.lua
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
vim.pack.add({
|
||||||
|
{ src = "https://github.com/nvim-lua/plenary.nvim" },
|
||||||
|
{ src = "https://github.com/folke/todo-comments.nvim" }
|
||||||
|
})
|
||||||
|
|
||||||
|
require("todo-comments").setup()
|
||||||
|
|
||||||
|
vim.keymap.set("n", "<leader>ft", ":TodoTelescope<CR>")
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
"folke/todo-comments.nvim",
|
|
||||||
dependencies = {
|
|
||||||
"nvim-lua/plenary.nvim"
|
|
||||||
},
|
|
||||||
opts = {}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,21 +1,6 @@
|
|||||||
return {
|
vim.pack.add({ "https://github.com/akinsho/toggleterm.nvim" })
|
||||||
{
|
|
||||||
"akinsho/toggleterm.nvim",
|
require("toggleterm").setup({
|
||||||
version = '*',
|
|
||||||
opts = {
|
|
||||||
size = 30,
|
size = 30,
|
||||||
open_mapping = [[<c-\>]]
|
open_mapping = [[<c-\>]]
|
||||||
},
|
})
|
||||||
cmd = {
|
|
||||||
"ToggleTerm",
|
|
||||||
"TermExec",
|
|
||||||
"ToggleTermToggleAll",
|
|
||||||
"ToggleTermSendCurrentLine",
|
|
||||||
"ToggleTermSendVisualLines",
|
|
||||||
"ToggleTermSendVisualSelection"
|
|
||||||
},
|
|
||||||
keys = {
|
|
||||||
[[<c-\>]]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,20 +1,6 @@
|
|||||||
return {
|
vim.pack.add({ "https://github.com/nvim-treesitter/nvim-treesitter" })
|
||||||
{
|
|
||||||
"nvim-treesitter/nvim-treesitter",
|
require("nvim-treesitter.configs").setup({
|
||||||
build = ":TSUpdate",
|
|
||||||
event = {
|
|
||||||
"BufReadPost",
|
|
||||||
"BufNewFile"
|
|
||||||
},
|
|
||||||
cmd = {
|
|
||||||
"TSInstall",
|
|
||||||
"TSBufEnable",
|
|
||||||
"TSBufDisable",
|
|
||||||
"TSModuleInfo",
|
|
||||||
"TSInstallSync"
|
|
||||||
},
|
|
||||||
config = function(_, opts)
|
|
||||||
require("nvim-treesitter.configs").setup({
|
|
||||||
ensure_installed = {
|
ensure_installed = {
|
||||||
"cpp",
|
"cpp",
|
||||||
"c",
|
"c",
|
||||||
@@ -28,15 +14,8 @@ return {
|
|||||||
|
|
||||||
highlight = {
|
highlight = {
|
||||||
enable = true,
|
enable = true,
|
||||||
-- additional_vim_regex_highlighting = false,
|
|
||||||
-- disable = {
|
|
||||||
-- "latex"
|
|
||||||
-- },
|
|
||||||
additional_vim_regex_highlighting = {
|
additional_vim_regex_highlighting = {
|
||||||
"latex"
|
"latex"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
end
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,59 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
"folke/trouble.nvim",
|
|
||||||
tag="v3.4.1",
|
|
||||||
dependencies = {
|
|
||||||
{
|
|
||||||
"nvim-tree/nvim-web-devicons"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'folke/lsp-colors.nvim'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'nvim-telescope/telescope.nvim'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
opts = {
|
|
||||||
modes = {
|
|
||||||
symbols = {
|
|
||||||
win = {
|
|
||||||
size = 50,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
cmd = "Trouble",
|
|
||||||
keys = {
|
|
||||||
{
|
|
||||||
"<leader>xw",
|
|
||||||
"<cmd>Trouble diagnostics toggle<cr>",
|
|
||||||
desc = "Diagnostics (Trouble)",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>xd",
|
|
||||||
"<cmd>Trouble diagnostics toggle filter.buf=0<cr>",
|
|
||||||
desc = "Buffer Diagnostics (Trouble)",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>xs",
|
|
||||||
"<cmd>Trouble symbols toggle focus=false<cr>",
|
|
||||||
desc = "Symbols (Trouble)",
|
|
||||||
},
|
|
||||||
-- {
|
|
||||||
-- "<leader>cl",
|
|
||||||
-- "<cmd>Trouble lsp toggle focus=false win.position=right<cr>",
|
|
||||||
-- desc = "LSP Definitions / references / ... (Trouble)",
|
|
||||||
-- },
|
|
||||||
-- {
|
|
||||||
-- "<leader>xl",
|
|
||||||
-- "<cmd>Trouble loclist toggle<cr>",
|
|
||||||
-- desc = "Location List (Trouble)",
|
|
||||||
-- },
|
|
||||||
{
|
|
||||||
"<leader>xq",
|
|
||||||
"<cmd>Trouble qflist toggle<cr>",
|
|
||||||
desc = "Quickfix List (Trouble)",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,17 +1,3 @@
|
|||||||
return {
|
vim.pack.add({"https://github.com/mbbill/undotree"})
|
||||||
{
|
|
||||||
'mbbill/undotree',
|
vim.keymap.set("n", "<leader>u", "<cmd>UndotreeToggle<CR>", { desc = "Undotree" })
|
||||||
cmd = {
|
|
||||||
"UndotreeToggle",
|
|
||||||
"UndotreeHide",
|
|
||||||
"UndotreeShow",
|
|
||||||
"UndotreeFocus",
|
|
||||||
"UndotreePersistUndo"
|
|
||||||
},
|
|
||||||
init = function()
|
|
||||||
vim.keymap.set("n", "<leader>u", "<cmd>UndotreeToggle<CR>", {
|
|
||||||
desc = "Undotree"
|
|
||||||
})
|
|
||||||
end
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,63 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
"lervag/vimtex",
|
|
||||||
ft = {
|
|
||||||
"tex",
|
|
||||||
"bib"
|
|
||||||
},
|
|
||||||
config = function()
|
|
||||||
-- General configuration
|
|
||||||
|
|
||||||
vim.cmd("syntax enable")
|
|
||||||
|
|
||||||
vim.g.vimtex_compiler_latexmk = {
|
|
||||||
out_dir = 'build',
|
|
||||||
options = {
|
|
||||||
'-shell-escape',
|
|
||||||
'-verbose',
|
|
||||||
'-file-line-error',
|
|
||||||
'-interaction=nonstopmode',
|
|
||||||
'-synctex=1'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
vim.g.vimtex_view_general_viewer = 'sioyek'
|
|
||||||
vim.g.vimtex_quickfix_mode = 0
|
|
||||||
|
|
||||||
-- Concealment
|
|
||||||
|
|
||||||
vim.cmd([[set conceallevel=1]])
|
|
||||||
vim.cmd([[
|
|
||||||
let g:vimtex_syntax_conceal = {
|
|
||||||
\ 'accents': 1,
|
|
||||||
\ 'ligatures': 1,
|
|
||||||
\ 'cites': 1,
|
|
||||||
\ 'fancy': 1,
|
|
||||||
\ 'spacing': 0,
|
|
||||||
\ 'greek': 1,
|
|
||||||
\ 'math_bounds': 1,
|
|
||||||
\ 'math_delimiters': 1,
|
|
||||||
\ 'math_fracs': 1,
|
|
||||||
\ 'math_super_sub': 0,
|
|
||||||
\ 'math_symbols': 1,
|
|
||||||
\ 'sections': 0,
|
|
||||||
\ 'styles': 0,
|
|
||||||
\}
|
|
||||||
|
|
||||||
let g:vimtex_syntax_custom_cmds = [
|
|
||||||
\ {'name': 'bm', 'mathmode': 1, 'argstyle': 'bold', 'conceal': 1},
|
|
||||||
\]
|
|
||||||
]])
|
|
||||||
|
|
||||||
-- Synctex configuration
|
|
||||||
|
|
||||||
vim.g.vimtex_compiler_progname = 'nvr'
|
|
||||||
|
|
||||||
local options = string.format(
|
|
||||||
'--reuse-window --inverse-search="nvr --servername %s +%%2 %%1" --forward-search-file @tex --forward-search-line @line @pdf',
|
|
||||||
vim.v.servername)
|
|
||||||
local command = string.format("let g:vimtex_view_general_options='%s'", options)
|
|
||||||
vim.cmd(command)
|
|
||||||
end
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,46 +1,19 @@
|
|||||||
return {
|
vim.pack.add({ "https://github.com/folke/which-key.nvim" })
|
||||||
{
|
|
||||||
"folke/which-key.nvim",
|
vim.o.timeout = true
|
||||||
event = "VeryLazy",
|
vim.o.timeoutlen = 300
|
||||||
init = function()
|
|
||||||
vim.o.timeout = true
|
require("which-key").setup({
|
||||||
vim.o.timeoutlen = 300
|
-- defaults = {
|
||||||
end,
|
-- ["<leader>x"] = { name = "+Trouble" }
|
||||||
opts = {
|
-- }
|
||||||
defaults = {
|
})
|
||||||
["<leader>x"] = {
|
|
||||||
name = "+Trouble"
|
require("which-key").add({
|
||||||
}
|
{ "<leader>d", group = "Debug" },
|
||||||
}
|
{ "<leader>f", group = "Find" },
|
||||||
},
|
{ "<leader>l", group = "LSP" },
|
||||||
config = function()
|
{ "<leader>o", group = "Overseer" },
|
||||||
local wk = require("which-key")
|
{ "<leader>s", group = "Session" },
|
||||||
wk.add({
|
{ "<leader>x", group = "Trouble" }
|
||||||
{
|
})
|
||||||
"<leader>d",
|
|
||||||
group = "Debug"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>f",
|
|
||||||
group = "Find"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>l",
|
|
||||||
group = "LSP"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>o",
|
|
||||||
group = "Overseer"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>s",
|
|
||||||
group = "Session"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>x",
|
|
||||||
group = "Trouble"
|
|
||||||
}
|
|
||||||
})
|
|
||||||
end
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,57 +1,27 @@
|
|||||||
vim.g.mapleader = " "
|
vim.g.mapleader = " "
|
||||||
|
|
||||||
vim.opt.nu = true
|
|
||||||
vim.opt.relativenumber = true
|
|
||||||
|
|
||||||
vim.opt.tabstop = 4
|
|
||||||
vim.opt.softtabstop = 4
|
|
||||||
vim.opt.shiftwidth = 4
|
vim.opt.shiftwidth = 4
|
||||||
vim.opt.expandtab = true
|
vim.opt.expandtab = true
|
||||||
|
|
||||||
vim.opt.smartindent = true
|
|
||||||
|
|
||||||
vim.opt.wrap = false
|
|
||||||
|
|
||||||
vim.opt.swapfile = false
|
|
||||||
vim.opt.backup = false
|
|
||||||
vim.opt.undodir = os.getenv("HOME") .. "/.vim/undodir"
|
|
||||||
vim.opt.undofile = true
|
vim.opt.undofile = true
|
||||||
|
|
||||||
|
vim.opt.signcolumn = "yes"
|
||||||
|
|
||||||
|
vim.opt.number = true
|
||||||
|
vim.opt.relativenumber = true
|
||||||
|
|
||||||
vim.opt.hlsearch = false
|
vim.opt.hlsearch = false
|
||||||
vim.opt.incsearch = true
|
vim.opt.incsearch = true
|
||||||
|
|
||||||
vim.opt.termguicolors = true
|
|
||||||
|
|
||||||
vim.opt.scrolloff = 8
|
vim.opt.scrolloff = 8
|
||||||
vim.opt.signcolumn = "yes"
|
|
||||||
|
|
||||||
vim.opt.updatetime = 50
|
vim.opt.exrc = true
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd('FileType', {
|
vim.api.nvim_create_autocmd('FileType', {
|
||||||
pattern = 'rust',
|
pattern = 'cpp',
|
||||||
callback = function()
|
callback = function() vim.bo.commentstring = '// %s' end
|
||||||
vim.cmd [[
|
|
||||||
let &efm = ''
|
|
||||||
" Random non issue stuff
|
|
||||||
let &efm .= '%-G%.%#aborting due to previous error%.%#,'
|
|
||||||
let &efm .= '%-G%.%#test failed, to rerun pass%.%#,'
|
|
||||||
" Capture enter directory events for doc tests
|
|
||||||
let &efm .= '%D%*\sDoc-tests %f%.%#,'
|
|
||||||
" Doc Tests
|
|
||||||
let &efm .= '%E---- %f - %o (line %l) stdout ----,'
|
|
||||||
let &efm .= '%Cerror%m,'
|
|
||||||
let &efm .= '%-Z%*\s--> %f:%l:%c,'
|
|
||||||
" Unit tests && `tests/` dir failures
|
|
||||||
" This pattern has to come _after_ the doc test one
|
|
||||||
let &efm .= '%E---- %o stdout ----,'
|
|
||||||
let &efm .= '%Zthread %.%# panicked at %m\, %f:%l:%c,'
|
|
||||||
let &efm .= '%Cthread %.%# panicked at %m,'
|
|
||||||
let &efm .= '%+C%*\sleft: %.%#,'
|
|
||||||
let &efm .= '%+Z%*\sright: %.%#\, %f:%l:%c,'
|
|
||||||
" Compiler Errors and Warnings
|
|
||||||
let &efm .= '%Eerror%m,'
|
|
||||||
let &efm .= '%Wwarning: %m,'
|
|
||||||
let &efm .= '%-Z%*\s--> %f:%l:%c,'
|
|
||||||
]]
|
|
||||||
end
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
vim.opt.cmdheight = 0
|
||||||
|
|
||||||
|
vim.o.updatetime = 50
|
||||||
|
|||||||
138
nvim/.config/nvim/nvim-pack-lock.json
Normal file
138
nvim/.config/nvim/nvim-pack-lock.json
Normal file
@@ -0,0 +1,138 @@
|
|||||||
|
{
|
||||||
|
"plugins": {
|
||||||
|
"alpha-nvim": {
|
||||||
|
"rev": "3979b01",
|
||||||
|
"src": "https://github.com/goolord/alpha-nvim"
|
||||||
|
},
|
||||||
|
"auto-session": {
|
||||||
|
"rev": "292492a",
|
||||||
|
"src": "https://github.com/rmagatti/auto-session"
|
||||||
|
},
|
||||||
|
"copilot.lua": {
|
||||||
|
"rev": "5bde2cf",
|
||||||
|
"src": "https://github.com/zbirenbaum/copilot.lua"
|
||||||
|
},
|
||||||
|
"dressing.nvim": {
|
||||||
|
"rev": "2d7c2db",
|
||||||
|
"src": "https://github.com/stevearc/dressing.nvim"
|
||||||
|
},
|
||||||
|
"gruvbox.nvim": {
|
||||||
|
"rev": "5e0a460",
|
||||||
|
"src": "https://github.com/ellisonleao/gruvbox.nvim"
|
||||||
|
},
|
||||||
|
"harpoon": {
|
||||||
|
"rev": "87b1a35",
|
||||||
|
"src": "https://github.com/ThePrimeagen/harpoon",
|
||||||
|
"version": "'harpoon2'"
|
||||||
|
},
|
||||||
|
"lualine.nvim": {
|
||||||
|
"rev": "3946f01",
|
||||||
|
"src": "https://github.com/nvim-lualine/lualine.nvim"
|
||||||
|
},
|
||||||
|
"mason-lspconfig.nvim": {
|
||||||
|
"rev": "d7b5feb",
|
||||||
|
"src": "https://github.com/mason-org/mason-lspconfig.nvim"
|
||||||
|
},
|
||||||
|
"mason.nvim": {
|
||||||
|
"rev": "ad7146a",
|
||||||
|
"src": "https://github.com/mason-org/mason.nvim"
|
||||||
|
},
|
||||||
|
"noice.nvim": {
|
||||||
|
"rev": "7bfd942",
|
||||||
|
"src": "https://github.com/folke/noice.nvim"
|
||||||
|
},
|
||||||
|
"nui.nvim": {
|
||||||
|
"rev": "de74099",
|
||||||
|
"src": "https://github.com/MunifTanjim/nui.nvim"
|
||||||
|
},
|
||||||
|
"nvim-lspconfig": {
|
||||||
|
"rev": "2010fc6",
|
||||||
|
"src": "https://github.com/neovim/nvim-lspconfig"
|
||||||
|
},
|
||||||
|
"nvim-notify": {
|
||||||
|
"rev": "8701bec",
|
||||||
|
"src": "https://github.com/rcarriga/nvim-notify"
|
||||||
|
},
|
||||||
|
"nvim-treesitter": {
|
||||||
|
"rev": "42fc28ba",
|
||||||
|
"src": "https://github.com/nvim-treesitter/nvim-treesitter"
|
||||||
|
},
|
||||||
|
"nvim-web-devicons": {
|
||||||
|
"rev": "8dcb311",
|
||||||
|
"src": "https://github.com/nvim-tree/nvim-web-devicons"
|
||||||
|
},
|
||||||
|
"oil.nvim": {
|
||||||
|
"rev": "7e1cd77",
|
||||||
|
"src": "https://github.com/stevearc/oil.nvim"
|
||||||
|
},
|
||||||
|
"outline.nvim": {
|
||||||
|
"rev": "6b62f73",
|
||||||
|
"src": "https://github.com/hedyhli/outline.nvim"
|
||||||
|
},
|
||||||
|
"overseer.nvim": {
|
||||||
|
"rev": "c77c78b",
|
||||||
|
"src": "https://github.com/stevearc/overseer.nvim",
|
||||||
|
"version": "'v1.6.0'"
|
||||||
|
},
|
||||||
|
"plenary.nvim": {
|
||||||
|
"rev": "b9fd522",
|
||||||
|
"src": "https://github.com/nvim-lua/plenary.nvim"
|
||||||
|
},
|
||||||
|
"quicker.nvim": {
|
||||||
|
"rev": "12a2291",
|
||||||
|
"src": "https://github.com/stevearc/quicker.nvim"
|
||||||
|
},
|
||||||
|
"session-lens": {
|
||||||
|
"rev": "eae46b4",
|
||||||
|
"src": "https://github.com/rmagatti/session-lens"
|
||||||
|
},
|
||||||
|
"snacks.nvim": {
|
||||||
|
"rev": "9a15b31",
|
||||||
|
"src": "https://github.com/folke/snacks.nvim"
|
||||||
|
},
|
||||||
|
"sqlite.nvim": {
|
||||||
|
"rev": "a8466c8",
|
||||||
|
"src": "https://github.com/3rd/sqlite.nvim"
|
||||||
|
},
|
||||||
|
"telescope-ui-select.nvim": {
|
||||||
|
"rev": "6e51d7d",
|
||||||
|
"src": "https://github.com/nvim-telescope/telescope-ui-select.nvim"
|
||||||
|
},
|
||||||
|
"telescope.nvim": {
|
||||||
|
"rev": "0294ae3",
|
||||||
|
"src": "https://github.com/nvim-telescope/telescope.nvim"
|
||||||
|
},
|
||||||
|
"time-tracker.nvim": {
|
||||||
|
"rev": "4127c4b",
|
||||||
|
"src": "https://github.com/3rd/time-tracker.nvim"
|
||||||
|
},
|
||||||
|
"todo-comments.nvim": {
|
||||||
|
"rev": "411503d",
|
||||||
|
"src": "https://github.com/folke/todo-comments.nvim"
|
||||||
|
},
|
||||||
|
"toggleterm.nvim": {
|
||||||
|
"rev": "9a88eae",
|
||||||
|
"src": "https://github.com/akinsho/toggleterm.nvim"
|
||||||
|
},
|
||||||
|
"undotree": {
|
||||||
|
"rev": "0f1c981",
|
||||||
|
"src": "https://github.com/mbbill/undotree"
|
||||||
|
},
|
||||||
|
"vim-flog": {
|
||||||
|
"rev": "665b16a",
|
||||||
|
"src": "https://github.com/rbong/vim-flog"
|
||||||
|
},
|
||||||
|
"vim-fugitive": {
|
||||||
|
"rev": "61b51c0",
|
||||||
|
"src": "https://github.com/tpope/vim-fugitive"
|
||||||
|
},
|
||||||
|
"vim-surround": {
|
||||||
|
"rev": "3d188ed",
|
||||||
|
"src": "https://github.com/tpope/vim-surround"
|
||||||
|
},
|
||||||
|
"which-key.nvim": {
|
||||||
|
"rev": "3aab214",
|
||||||
|
"src": "https://github.com/folke/which-key.nvim"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,83 +0,0 @@
|
|||||||
----------------
|
|
||||||
-- Abbreviations
|
|
||||||
----------------
|
|
||||||
|
|
||||||
|
|
||||||
local ls = require("luasnip")
|
|
||||||
local s = ls.snippet
|
|
||||||
local sn = ls.snippet_node
|
|
||||||
local t = ls.text_node
|
|
||||||
local i = ls.insert_node
|
|
||||||
local f = ls.function_node
|
|
||||||
local d = ls.dynamic_node
|
|
||||||
local fmt = require("luasnip.extras.fmt").fmt
|
|
||||||
local fmta = require("luasnip.extras.fmt").fmta
|
|
||||||
local rep = require("luasnip.extras").rep
|
|
||||||
local line_begin = require("luasnip.extras.expand_conditions").line_begin
|
|
||||||
|
|
||||||
|
|
||||||
-----------
|
|
||||||
-- Snippets
|
|
||||||
-----------
|
|
||||||
|
|
||||||
|
|
||||||
return {
|
|
||||||
|
|
||||||
|
|
||||||
s({trig="()", wordTrig=false, snippetType="autosnippet"},
|
|
||||||
{
|
|
||||||
t("("),
|
|
||||||
i(1),
|
|
||||||
t(")"),
|
|
||||||
i(0),
|
|
||||||
}
|
|
||||||
),
|
|
||||||
|
|
||||||
s({trig="[]", wordTrig=false, snippetType="autosnippet"},
|
|
||||||
{
|
|
||||||
t("["),
|
|
||||||
i(1),
|
|
||||||
t("]"),
|
|
||||||
i(0),
|
|
||||||
}
|
|
||||||
),
|
|
||||||
|
|
||||||
s({trig="{}", wordTrig=false, snippetType="autosnippet"},
|
|
||||||
{
|
|
||||||
t("{"),
|
|
||||||
i(1),
|
|
||||||
t("}"),
|
|
||||||
i(0),
|
|
||||||
}
|
|
||||||
),
|
|
||||||
|
|
||||||
s({trig="<>", wordTrig=false, snippetType="autosnippet"},
|
|
||||||
{
|
|
||||||
t("<"),
|
|
||||||
i(1),
|
|
||||||
t(">"),
|
|
||||||
i(0),
|
|
||||||
}
|
|
||||||
),
|
|
||||||
|
|
||||||
s({trig="\"\"", wordTrig=false, snippetType="autosnippet"},
|
|
||||||
{
|
|
||||||
t("\""),
|
|
||||||
i(1),
|
|
||||||
t("\""),
|
|
||||||
i(0),
|
|
||||||
}
|
|
||||||
),
|
|
||||||
|
|
||||||
s({trig="''", wordTrig=false, snippetType="autosnippet"},
|
|
||||||
{
|
|
||||||
t("'"),
|
|
||||||
i(1),
|
|
||||||
t("'"),
|
|
||||||
i(0),
|
|
||||||
}
|
|
||||||
),
|
|
||||||
|
|
||||||
|
|
||||||
} -- return
|
|
||||||
|
|
||||||
@@ -1,245 +0,0 @@
|
|||||||
----------------
|
|
||||||
-- Abbreviations
|
|
||||||
----------------
|
|
||||||
|
|
||||||
|
|
||||||
local ls = require("luasnip")
|
|
||||||
local s = ls.snippet
|
|
||||||
local sn = ls.snippet_node
|
|
||||||
local t = ls.text_node
|
|
||||||
local i = ls.insert_node
|
|
||||||
local f = ls.function_node
|
|
||||||
local d = ls.dynamic_node
|
|
||||||
local fmt = require("luasnip.extras.fmt").fmt
|
|
||||||
local fmta = require("luasnip.extras.fmt").fmta
|
|
||||||
local rep = require("luasnip.extras").rep
|
|
||||||
local line_begin = require("luasnip.extras.expand_conditions").line_begin
|
|
||||||
|
|
||||||
---------------
|
|
||||||
-- Environments
|
|
||||||
---------------
|
|
||||||
|
|
||||||
|
|
||||||
local tex_utils = {}
|
|
||||||
|
|
||||||
tex_utils.in_mathzone = function() -- math context detection
|
|
||||||
return vim.fn['vimtex#syntax#in_mathzone']() == 1
|
|
||||||
end
|
|
||||||
|
|
||||||
tex_utils.in_text = function()
|
|
||||||
return not tex_utils.in_mathzone()
|
|
||||||
end
|
|
||||||
|
|
||||||
tex_utils.in_comment = function() -- comment detection
|
|
||||||
return vim.fn['vimtex#syntax#in_comment']() == 1
|
|
||||||
end
|
|
||||||
|
|
||||||
tex_utils.in_env = function(name) -- generic environment detection
|
|
||||||
local is_inside = vim.fn['vimtex#env#is_inside'](name)
|
|
||||||
return (is_inside[1] > 0 and is_inside[2] > 0)
|
|
||||||
end
|
|
||||||
|
|
||||||
local get_visual = function(args, parent)
|
|
||||||
if (#parent.snippet.env.LS_SELECT_RAW > 0) then
|
|
||||||
return sn(nil, i(1, parent.snippet.env.LS_SELECT_RAW))
|
|
||||||
else
|
|
||||||
return sn(nil, i(1))
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
-----------
|
|
||||||
-- Snippets
|
|
||||||
-----------
|
|
||||||
|
|
||||||
|
|
||||||
return {
|
|
||||||
|
|
||||||
|
|
||||||
s({trig="notes"},
|
|
||||||
fmta(
|
|
||||||
[[
|
|
||||||
\documentclass[dvipsnames]{article}
|
|
||||||
|
|
||||||
\usepackage{float}
|
|
||||||
\usepackage{amsmath}
|
|
||||||
\usepackage{amsfonts}
|
|
||||||
\usepackage{mleftright}
|
|
||||||
\usepackage{bm}
|
|
||||||
\usepackage{tikz}
|
|
||||||
\usepackage{xcolor}
|
|
||||||
\usepackage{pgfplots}
|
|
||||||
\pgfplotsset{compat=newest}
|
|
||||||
|
|
||||||
\title{<>}
|
|
||||||
\author{<>}
|
|
||||||
\date{<>}
|
|
||||||
|
|
||||||
\begin{document}
|
|
||||||
\maketitle
|
|
||||||
|
|
||||||
<>
|
|
||||||
\end{document}
|
|
||||||
]],
|
|
||||||
{
|
|
||||||
i(1, "Notes"),
|
|
||||||
i(2, "Andreas Tsouchlos"),
|
|
||||||
i(3, os.date("%d.%m.%y")),
|
|
||||||
i(0),
|
|
||||||
}
|
|
||||||
)
|
|
||||||
),
|
|
||||||
|
|
||||||
s({trig="beg"},
|
|
||||||
fmta(
|
|
||||||
[[
|
|
||||||
\begin{<>}
|
|
||||||
<>
|
|
||||||
\end{<>}
|
|
||||||
]],
|
|
||||||
{
|
|
||||||
i(1),
|
|
||||||
i(2),
|
|
||||||
rep(1),
|
|
||||||
}
|
|
||||||
)
|
|
||||||
),
|
|
||||||
|
|
||||||
s({trig="sec"},
|
|
||||||
fmta(
|
|
||||||
[[
|
|
||||||
\section{<>}
|
|
||||||
\label{sec:<>}
|
|
||||||
]],
|
|
||||||
{
|
|
||||||
i(1),
|
|
||||||
rep(1),
|
|
||||||
}
|
|
||||||
)
|
|
||||||
),
|
|
||||||
|
|
||||||
s({trig="ssec"},
|
|
||||||
fmta(
|
|
||||||
[[
|
|
||||||
\subsection{<>}
|
|
||||||
\label{subsec:<>}
|
|
||||||
]],
|
|
||||||
{
|
|
||||||
i(1),
|
|
||||||
rep(1),
|
|
||||||
}
|
|
||||||
)
|
|
||||||
),
|
|
||||||
|
|
||||||
s({trig="sssec"},
|
|
||||||
fmta(
|
|
||||||
[[
|
|
||||||
\subsubsection{<>}
|
|
||||||
\label{subsubsec:<>}
|
|
||||||
]],
|
|
||||||
{
|
|
||||||
i(1),
|
|
||||||
rep(1),
|
|
||||||
}
|
|
||||||
)
|
|
||||||
),
|
|
||||||
|
|
||||||
s({trig="csec"},
|
|
||||||
fmta(
|
|
||||||
[[
|
|
||||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
||||||
\section{<>}
|
|
||||||
\label{sec:<>}
|
|
||||||
]],
|
|
||||||
{
|
|
||||||
i(1),
|
|
||||||
rep(1),
|
|
||||||
}
|
|
||||||
)
|
|
||||||
),
|
|
||||||
|
|
||||||
s({trig="cssec"},
|
|
||||||
fmta(
|
|
||||||
[[
|
|
||||||
%%%%%%%%%%%%%%%%
|
|
||||||
\subsection{<>}
|
|
||||||
\label{subsec:<>}
|
|
||||||
]],
|
|
||||||
{
|
|
||||||
i(1),
|
|
||||||
rep(1),
|
|
||||||
}
|
|
||||||
)
|
|
||||||
),
|
|
||||||
|
|
||||||
s({trig="csssec"},
|
|
||||||
fmta(
|
|
||||||
[[
|
|
||||||
%%%%%%%%
|
|
||||||
\subsubsection{<>}
|
|
||||||
\label{subsubsec:<>}
|
|
||||||
]],
|
|
||||||
{
|
|
||||||
i(1),
|
|
||||||
rep(1),
|
|
||||||
}
|
|
||||||
)
|
|
||||||
),
|
|
||||||
|
|
||||||
-- s({trig="()", wordTrig=false, snippetType="autosnippet"},
|
|
||||||
-- {
|
|
||||||
-- t("("),
|
|
||||||
-- i(1),
|
|
||||||
-- t(")"),
|
|
||||||
-- i(0),
|
|
||||||
-- }
|
|
||||||
-- ),
|
|
||||||
--
|
|
||||||
-- s({trig="[]", wordTrig=false, snippetType="autosnippet"},
|
|
||||||
-- {
|
|
||||||
-- t("["),
|
|
||||||
-- i(1),
|
|
||||||
-- t("]"),
|
|
||||||
-- i(0),
|
|
||||||
-- }
|
|
||||||
-- ),
|
|
||||||
--
|
|
||||||
-- s({trig="{}", wordTrig=false, snippetType="autosnippet"},
|
|
||||||
-- {
|
|
||||||
-- t("{"),
|
|
||||||
-- i(1),
|
|
||||||
-- t("}"),
|
|
||||||
-- i(0),
|
|
||||||
-- }
|
|
||||||
-- ),
|
|
||||||
--
|
|
||||||
-- s({trig="<>", wordTrig=false, snippetType="autosnippet"},
|
|
||||||
-- {
|
|
||||||
-- t("<"),
|
|
||||||
-- i(1),
|
|
||||||
-- t(">"),
|
|
||||||
-- i(0),
|
|
||||||
-- }
|
|
||||||
-- ),
|
|
||||||
--
|
|
||||||
-- s({trig="\"\"", wordTrig=false, snippetType="autosnippet"},
|
|
||||||
-- {
|
|
||||||
-- t("\""),
|
|
||||||
-- i(1),
|
|
||||||
-- t("\""),
|
|
||||||
-- i(0),
|
|
||||||
-- }
|
|
||||||
-- ),
|
|
||||||
--
|
|
||||||
-- s({trig="''", wordTrig=false, snippetType="autosnippet"},
|
|
||||||
-- {
|
|
||||||
-- t("'"),
|
|
||||||
-- i(1),
|
|
||||||
-- t("'"),
|
|
||||||
-- i(0),
|
|
||||||
-- }
|
|
||||||
-- ),
|
|
||||||
|
|
||||||
|
|
||||||
} -- return
|
|
||||||
|
|
||||||
@@ -1,439 +0,0 @@
|
|||||||
----------------
|
|
||||||
-- Abbreviations
|
|
||||||
----------------
|
|
||||||
|
|
||||||
|
|
||||||
local ls = require("luasnip")
|
|
||||||
local s = ls.snippet
|
|
||||||
local sn = ls.snippet_node
|
|
||||||
local t = ls.text_node
|
|
||||||
local i = ls.insert_node
|
|
||||||
local f = ls.function_node
|
|
||||||
local d = ls.dynamic_node
|
|
||||||
local fmt = require("luasnip.extras.fmt").fmt
|
|
||||||
local fmta = require("luasnip.extras.fmt").fmta
|
|
||||||
local rep = require("luasnip.extras").rep
|
|
||||||
|
|
||||||
|
|
||||||
---------------
|
|
||||||
-- Environments
|
|
||||||
---------------
|
|
||||||
|
|
||||||
|
|
||||||
local tex_utils = {}
|
|
||||||
|
|
||||||
tex_utils.in_mathzone = function() -- math context detection
|
|
||||||
return vim.fn['vimtex#syntax#in_mathzone']() == 1
|
|
||||||
end
|
|
||||||
|
|
||||||
tex_utils.in_text = function()
|
|
||||||
return not tex_utils.in_mathzone()
|
|
||||||
end
|
|
||||||
|
|
||||||
tex_utils.in_comment = function() -- comment detection
|
|
||||||
return vim.fn['vimtex#syntax#in_comment']() == 1
|
|
||||||
end
|
|
||||||
|
|
||||||
tex_utils.in_env = function(name) -- generic environment detection
|
|
||||||
local is_inside = vim.fn['vimtex#env#is_inside'](name)
|
|
||||||
return (is_inside[1] > 0 and is_inside[2] > 0)
|
|
||||||
end
|
|
||||||
|
|
||||||
local get_visual = function(args, parent)
|
|
||||||
if (#parent.snippet.env.LS_SELECT_RAW > 0) then
|
|
||||||
return sn(nil, i(1, parent.snippet.env.LS_SELECT_RAW))
|
|
||||||
else
|
|
||||||
return sn(nil, i(1))
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
-----------
|
|
||||||
-- Snippets
|
|
||||||
-----------
|
|
||||||
|
|
||||||
|
|
||||||
return {
|
|
||||||
|
|
||||||
|
|
||||||
s({trig="´a", wordTrig=false, snippetType="autosnippet"},
|
|
||||||
fmta(
|
|
||||||
[[\alpha ]],
|
|
||||||
{}
|
|
||||||
),
|
|
||||||
{condition = tex_utils.in_mathzone}
|
|
||||||
),
|
|
||||||
|
|
||||||
s({trig="´b", wordTrig=false, snippetType="autosnippet"},
|
|
||||||
fmta(
|
|
||||||
[[\beta ]],
|
|
||||||
{}
|
|
||||||
),
|
|
||||||
{condition = tex_utils.in_mathzone}
|
|
||||||
),
|
|
||||||
|
|
||||||
s({trig="´g", wordTrig=false, snippetType="autosnippet"},
|
|
||||||
fmta(
|
|
||||||
[[\gamma ]],
|
|
||||||
{}
|
|
||||||
),
|
|
||||||
{condition = tex_utils.in_mathzone}
|
|
||||||
),
|
|
||||||
|
|
||||||
s({trig="´d", wordTrig=false, snippetType="autosnippet"},
|
|
||||||
fmta(
|
|
||||||
[[\delta ]],
|
|
||||||
{}
|
|
||||||
),
|
|
||||||
{condition = tex_utils.in_mathzone}
|
|
||||||
),
|
|
||||||
|
|
||||||
s({trig="´e", wordTrig=false, snippetType="autosnippet"},
|
|
||||||
fmta(
|
|
||||||
[[\epsilon ]],
|
|
||||||
{}
|
|
||||||
),
|
|
||||||
{condition = tex_utils.in_mathzone}
|
|
||||||
),
|
|
||||||
|
|
||||||
s({trig="´z", wordTrig=false, snippetType="autosnippet"},
|
|
||||||
fmta(
|
|
||||||
[[\zeta ]],
|
|
||||||
{}
|
|
||||||
),
|
|
||||||
{condition = tex_utils.in_mathzone}
|
|
||||||
),
|
|
||||||
|
|
||||||
s({trig="´h", wordTrig=false, snippetType="autosnippet"},
|
|
||||||
fmta(
|
|
||||||
[[\eta ]],
|
|
||||||
{}
|
|
||||||
),
|
|
||||||
{condition = tex_utils.in_mathzone}
|
|
||||||
),
|
|
||||||
|
|
||||||
s({trig="´q", wordTrig=false, snippetType="autosnippet"},
|
|
||||||
fmta(
|
|
||||||
[[\theta ]],
|
|
||||||
{}
|
|
||||||
),
|
|
||||||
{condition = tex_utils.in_mathzone}
|
|
||||||
),
|
|
||||||
|
|
||||||
s({trig="´i", wordTrig=false, snippetType="autosnippet"},
|
|
||||||
fmta(
|
|
||||||
[[\iota ]],
|
|
||||||
{}
|
|
||||||
),
|
|
||||||
{condition = tex_utils.in_mathzone}
|
|
||||||
),
|
|
||||||
|
|
||||||
s({trig="´k", wordTrig=false, snippetType="autosnippet"},
|
|
||||||
fmta(
|
|
||||||
[[\kappa ]],
|
|
||||||
{}
|
|
||||||
),
|
|
||||||
{condition = tex_utils.in_mathzone}
|
|
||||||
),
|
|
||||||
|
|
||||||
s({trig="´l", wordTrig=false, snippetType="autosnippet"},
|
|
||||||
fmta(
|
|
||||||
[[\lambda ]],
|
|
||||||
{}
|
|
||||||
),
|
|
||||||
{condition = tex_utils.in_mathzone}
|
|
||||||
),
|
|
||||||
|
|
||||||
s({trig="´m", wordTrig=false, snippetType="autosnippet"},
|
|
||||||
fmta(
|
|
||||||
[[\mu ]],
|
|
||||||
{}
|
|
||||||
),
|
|
||||||
{condition = tex_utils.in_mathzone}
|
|
||||||
),
|
|
||||||
|
|
||||||
s({trig="´n", wordTrig=false, snippetType="autosnippet"},
|
|
||||||
fmta(
|
|
||||||
[[\nu ]],
|
|
||||||
{}
|
|
||||||
),
|
|
||||||
{condition = tex_utils.in_mathzone}
|
|
||||||
),
|
|
||||||
|
|
||||||
s({trig="´x", wordTrig=false, snippetType="autosnippet"},
|
|
||||||
fmta(
|
|
||||||
[[\xi ]],
|
|
||||||
{}
|
|
||||||
),
|
|
||||||
{condition = tex_utils.in_mathzone}
|
|
||||||
),
|
|
||||||
|
|
||||||
s({trig="´p", wordTrig=false, snippetType="autosnippet"},
|
|
||||||
fmta(
|
|
||||||
[[\pi ]],
|
|
||||||
{}
|
|
||||||
),
|
|
||||||
{condition = tex_utils.in_mathzone}
|
|
||||||
),
|
|
||||||
|
|
||||||
s({trig="´r", wordTrig=false, snippetType="autosnippet"},
|
|
||||||
fmta(
|
|
||||||
[[\rho ]],
|
|
||||||
{}
|
|
||||||
),
|
|
||||||
{condition = tex_utils.in_mathzone}
|
|
||||||
),
|
|
||||||
|
|
||||||
s({trig="´s", wordTrig=false, snippetType="autosnippet"},
|
|
||||||
fmta(
|
|
||||||
[[\sigma ]],
|
|
||||||
{}
|
|
||||||
),
|
|
||||||
{condition = tex_utils.in_mathzone}
|
|
||||||
),
|
|
||||||
|
|
||||||
s({trig="´t", wordTrig=false, snippetType="autosnippet"},
|
|
||||||
fmta(
|
|
||||||
[[\tau ]],
|
|
||||||
{}
|
|
||||||
),
|
|
||||||
{condition = tex_utils.in_mathzone}
|
|
||||||
),
|
|
||||||
|
|
||||||
s({trig="´u", wordTrig=false, snippetType="autosnippet"},
|
|
||||||
fmta(
|
|
||||||
[[\upsilon ]],
|
|
||||||
{}
|
|
||||||
),
|
|
||||||
{condition = tex_utils.in_mathzone}
|
|
||||||
),
|
|
||||||
|
|
||||||
s({trig="´f", wordTrig=false, snippetType="autosnippet"},
|
|
||||||
fmta(
|
|
||||||
[[\phi ]],
|
|
||||||
{}
|
|
||||||
),
|
|
||||||
{condition = tex_utils.in_mathzone}
|
|
||||||
),
|
|
||||||
|
|
||||||
s({trig="´c", wordTrig=false, snippetType="autosnippet"},
|
|
||||||
fmta(
|
|
||||||
[[\chi ]],
|
|
||||||
{}
|
|
||||||
),
|
|
||||||
{condition = tex_utils.in_mathzone}
|
|
||||||
),
|
|
||||||
|
|
||||||
s({trig="´y", wordTrig=false, snippetType="autosnippet"},
|
|
||||||
fmta(
|
|
||||||
[[\psi ]],
|
|
||||||
{}
|
|
||||||
),
|
|
||||||
{condition = tex_utils.in_mathzone}
|
|
||||||
),
|
|
||||||
|
|
||||||
s({trig="´w", wordTrig=false, snippetType="autosnippet"},
|
|
||||||
fmta(
|
|
||||||
[[\omega ]],
|
|
||||||
{}
|
|
||||||
),
|
|
||||||
{condition = tex_utils.in_mathzone}
|
|
||||||
),
|
|
||||||
|
|
||||||
s({trig="´A", wordTrig=false, snippetType="autosnippet"},
|
|
||||||
fmta(
|
|
||||||
[[\Alpha ]],
|
|
||||||
{}
|
|
||||||
),
|
|
||||||
{condition = tex_utils.in_mathzone}
|
|
||||||
),
|
|
||||||
|
|
||||||
s({trig="´B", wordTrig=false, snippetType="autosnippet"},
|
|
||||||
fmta(
|
|
||||||
[[\Beta ]],
|
|
||||||
{}
|
|
||||||
),
|
|
||||||
{condition = tex_utils.in_mathzone}
|
|
||||||
),
|
|
||||||
|
|
||||||
s({trig="´G", wordTrig=false, snippetType="autosnippet"},
|
|
||||||
fmta(
|
|
||||||
[[\Gamma ]],
|
|
||||||
{}
|
|
||||||
),
|
|
||||||
{condition = tex_utils.in_mathzone}
|
|
||||||
),
|
|
||||||
|
|
||||||
s({trig="´D", wordTrig=false, snippetType="autosnippet"},
|
|
||||||
fmta(
|
|
||||||
[[\Delta ]],
|
|
||||||
{}
|
|
||||||
),
|
|
||||||
{condition = tex_utils.in_mathzone}
|
|
||||||
),
|
|
||||||
|
|
||||||
s({trig="´E", wordTrig=false, snippetType="autosnippet"},
|
|
||||||
fmta(
|
|
||||||
[[\Epsilon ]],
|
|
||||||
{}
|
|
||||||
),
|
|
||||||
{condition = tex_utils.in_mathzone}
|
|
||||||
),
|
|
||||||
|
|
||||||
s({trig="´Z", wordTrig=false, snippetType="autosnippet"},
|
|
||||||
fmta(
|
|
||||||
[[\Zeta ]],
|
|
||||||
{}
|
|
||||||
),
|
|
||||||
{condition = tex_utils.in_mathzone}
|
|
||||||
),
|
|
||||||
|
|
||||||
s({trig="´H", wordTrig=false, snippetType="autosnippet"},
|
|
||||||
fmta(
|
|
||||||
[[\Eta ]],
|
|
||||||
{}
|
|
||||||
),
|
|
||||||
{condition = tex_utils.in_mathzone}
|
|
||||||
),
|
|
||||||
|
|
||||||
s({trig="´Q", wordTrig=false, snippetType="autosnippet"},
|
|
||||||
fmta(
|
|
||||||
[[\Theta ]],
|
|
||||||
{}
|
|
||||||
),
|
|
||||||
{condition = tex_utils.in_mathzone}
|
|
||||||
),
|
|
||||||
|
|
||||||
s({trig="´I", wordTrig=false, snippetType="autosnippet"},
|
|
||||||
fmta(
|
|
||||||
[[\Iota ]],
|
|
||||||
{}
|
|
||||||
),
|
|
||||||
{condition = tex_utils.in_mathzone}
|
|
||||||
),
|
|
||||||
|
|
||||||
s({trig="´K", wordTrig=false, snippetType="autosnippet"},
|
|
||||||
fmta(
|
|
||||||
[[\Kappa ]],
|
|
||||||
{}
|
|
||||||
),
|
|
||||||
{condition = tex_utils.in_mathzone}
|
|
||||||
),
|
|
||||||
|
|
||||||
s({trig="´L", wordTrig=false, snippetType="autosnippet"},
|
|
||||||
fmta(
|
|
||||||
[[\Lambda ]],
|
|
||||||
{}
|
|
||||||
),
|
|
||||||
{condition = tex_utils.in_mathzone}
|
|
||||||
),
|
|
||||||
|
|
||||||
s({trig="´M", wordTrig=false, snippetType="autosnippet"},
|
|
||||||
fmta(
|
|
||||||
[[\Mu ]],
|
|
||||||
{}
|
|
||||||
),
|
|
||||||
{condition = tex_utils.in_mathzone}
|
|
||||||
),
|
|
||||||
|
|
||||||
s({trig="´N", wordTrig=false, snippetType="autosnippet"},
|
|
||||||
fmta(
|
|
||||||
[[\Nu ]],
|
|
||||||
{}
|
|
||||||
),
|
|
||||||
{condition = tex_utils.in_mathzone}
|
|
||||||
),
|
|
||||||
|
|
||||||
s({trig="´X", wordTrig=false, snippetType="autosnippet"},
|
|
||||||
fmta(
|
|
||||||
[[\Xi ]],
|
|
||||||
{}
|
|
||||||
),
|
|
||||||
{condition = tex_utils.in_mathzone}
|
|
||||||
),
|
|
||||||
|
|
||||||
s({trig="´P", wordTrig=false, snippetType="autosnippet"},
|
|
||||||
fmta(
|
|
||||||
[[\Pi ]],
|
|
||||||
{}
|
|
||||||
),
|
|
||||||
{condition = tex_utils.in_mathzone}
|
|
||||||
),
|
|
||||||
|
|
||||||
s({trig="´R", wordTrig=false, snippetType="autosnippet"},
|
|
||||||
fmta(
|
|
||||||
[[\Rho ]],
|
|
||||||
{}
|
|
||||||
),
|
|
||||||
{condition = tex_utils.in_mathzone}
|
|
||||||
),
|
|
||||||
|
|
||||||
s({trig="´S", wordTrig=false, snippetType="autosnippet"},
|
|
||||||
fmta(
|
|
||||||
[[\Sigma ]],
|
|
||||||
{}
|
|
||||||
),
|
|
||||||
{condition = tex_utils.in_mathzone}
|
|
||||||
),
|
|
||||||
|
|
||||||
s({trig="´T", wordTrig=false, snippetType="autosnippet"},
|
|
||||||
fmta(
|
|
||||||
[[\Tau ]],
|
|
||||||
{}
|
|
||||||
),
|
|
||||||
{condition = tex_utils.in_mathzone}
|
|
||||||
),
|
|
||||||
|
|
||||||
s({trig="´U", wordTrig=false, snippetType="autosnippet"},
|
|
||||||
fmta(
|
|
||||||
[[\Upsilon ]],
|
|
||||||
{}
|
|
||||||
),
|
|
||||||
{condition = tex_utils.in_mathzone}
|
|
||||||
),
|
|
||||||
|
|
||||||
s({trig="´F", wordTrig=false, snippetType="autosnippet"},
|
|
||||||
fmta(
|
|
||||||
[[\Phi ]],
|
|
||||||
{}
|
|
||||||
),
|
|
||||||
{condition = tex_utils.in_mathzone}
|
|
||||||
),
|
|
||||||
|
|
||||||
s({trig="´C", wordTrig=false, snippetType="autosnippet"},
|
|
||||||
fmta(
|
|
||||||
[[\Chi ]],
|
|
||||||
{}
|
|
||||||
),
|
|
||||||
{condition = tex_utils.in_mathzone}
|
|
||||||
),
|
|
||||||
|
|
||||||
s({trig="´Y", wordTrig=false, snippetType="autosnippet"},
|
|
||||||
fmta(
|
|
||||||
[[\Psi ]],
|
|
||||||
{}
|
|
||||||
),
|
|
||||||
{condition = tex_utils.in_mathzone}
|
|
||||||
),
|
|
||||||
|
|
||||||
s({trig="´W", wordTrig=false, snippetType="autosnippet"},
|
|
||||||
fmta(
|
|
||||||
[[\Omega ]],
|
|
||||||
{}
|
|
||||||
),
|
|
||||||
{condition = tex_utils.in_mathzone}
|
|
||||||
),
|
|
||||||
|
|
||||||
|
|
||||||
-- Strictly speaking not greek characters, but very similar snippets
|
|
||||||
|
|
||||||
s({trig="´6", wordTrig=false, snippetType="autosnippet"},
|
|
||||||
fmta(
|
|
||||||
[[\partial ]],
|
|
||||||
{}
|
|
||||||
),
|
|
||||||
{condition = tex_utils.in_mathzone}
|
|
||||||
),
|
|
||||||
|
|
||||||
} -- return
|
|
||||||
|
|
||||||
@@ -1,402 +0,0 @@
|
|||||||
----------------
|
|
||||||
-- Abbreviations
|
|
||||||
----------------
|
|
||||||
|
|
||||||
|
|
||||||
local ls = require("luasnip")
|
|
||||||
local s = ls.snippet
|
|
||||||
local sn = ls.snippet_node
|
|
||||||
local t = ls.text_node
|
|
||||||
local i = ls.insert_node
|
|
||||||
local f = ls.function_node
|
|
||||||
local d = ls.dynamic_node
|
|
||||||
local fmt = require("luasnip.extras.fmt").fmt
|
|
||||||
local fmta = require("luasnip.extras.fmt").fmta
|
|
||||||
local rep = require("luasnip.extras").rep
|
|
||||||
|
|
||||||
|
|
||||||
---------------
|
|
||||||
-- Environments
|
|
||||||
---------------
|
|
||||||
|
|
||||||
|
|
||||||
local tex_utils = {}
|
|
||||||
|
|
||||||
tex_utils.in_mathzone = function() -- math context detection
|
|
||||||
return vim.fn['vimtex#syntax#in_mathzone']() == 1
|
|
||||||
end
|
|
||||||
|
|
||||||
tex_utils.in_text = function()
|
|
||||||
return not tex_utils.in_mathzone()
|
|
||||||
end
|
|
||||||
|
|
||||||
tex_utils.in_comment = function() -- comment detection
|
|
||||||
return vim.fn['vimtex#syntax#in_comment']() == 1
|
|
||||||
end
|
|
||||||
|
|
||||||
tex_utils.in_env = function(name) -- generic environment detection
|
|
||||||
local is_inside = vim.fn['vimtex#env#is_inside'](name)
|
|
||||||
return (is_inside[1] > 0 and is_inside[2] > 0)
|
|
||||||
end
|
|
||||||
|
|
||||||
local get_visual = function(args, parent)
|
|
||||||
if (#parent.snippet.env.LS_SELECT_RAW > 0) then
|
|
||||||
return sn(nil, i(1, parent.snippet.env.LS_SELECT_RAW))
|
|
||||||
else
|
|
||||||
return sn(nil, i(1))
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
-----------
|
|
||||||
-- Snippets
|
|
||||||
-----------
|
|
||||||
|
|
||||||
|
|
||||||
return {
|
|
||||||
|
|
||||||
|
|
||||||
s({trig="ali", snippetType="autosnippet"},
|
|
||||||
fmta(
|
|
||||||
[[
|
|
||||||
\begin{align*}
|
|
||||||
<>
|
|
||||||
<>%
|
|
||||||
\end{align*}
|
|
||||||
]],
|
|
||||||
{
|
|
||||||
i(0),
|
|
||||||
i(1, "."),
|
|
||||||
}
|
|
||||||
)
|
|
||||||
),
|
|
||||||
|
|
||||||
s({trig="cases"},
|
|
||||||
fmta(
|
|
||||||
[[
|
|
||||||
\begin{cases}
|
|
||||||
<>
|
|
||||||
\end{cases}
|
|
||||||
]],
|
|
||||||
{
|
|
||||||
i(0),
|
|
||||||
}
|
|
||||||
),
|
|
||||||
{condition = tex_utils.in_mathzone}
|
|
||||||
),
|
|
||||||
|
|
||||||
s({trig="matb"},
|
|
||||||
fmta(
|
|
||||||
[[
|
|
||||||
\begin{bmatrix}
|
|
||||||
<>
|
|
||||||
\end{bmatrix}
|
|
||||||
]],
|
|
||||||
{
|
|
||||||
i(0),
|
|
||||||
}
|
|
||||||
),
|
|
||||||
{condition = tex_utils.in_mathzone}
|
|
||||||
),
|
|
||||||
|
|
||||||
s({trig="matp"},
|
|
||||||
fmta(
|
|
||||||
[[
|
|
||||||
\begin{pmatrix}
|
|
||||||
<>
|
|
||||||
\end{pmatrix}
|
|
||||||
]],
|
|
||||||
{
|
|
||||||
i(0),
|
|
||||||
}
|
|
||||||
),
|
|
||||||
{condition = tex_utils.in_mathzone}
|
|
||||||
),
|
|
||||||
|
|
||||||
s({trig='([^%a])int', regTrig=true, wordTrig=false, snippetType="autosnippet"},
|
|
||||||
fmta(
|
|
||||||
[[<>\int_{<>}^{<>} <> d<> ]],
|
|
||||||
{
|
|
||||||
f( function(_, snip) return snip.captures[1] end ),
|
|
||||||
i(1, "-\\infty"),
|
|
||||||
i(2, "\\infty"),
|
|
||||||
i(4),
|
|
||||||
i(3, "x"),
|
|
||||||
}
|
|
||||||
),
|
|
||||||
{condition = tex_utils.in_mathzone}
|
|
||||||
),
|
|
||||||
|
|
||||||
s({trig='([^%a])prod', regTrig=true, wordTrig=false, snippetType="autosnippet"},
|
|
||||||
fmta(
|
|
||||||
[[<>\prod_{<>}^{<>} ]],
|
|
||||||
{
|
|
||||||
f( function(_, snip) return snip.captures[1] end ),
|
|
||||||
i(1, "-\\infty"),
|
|
||||||
i(2, "\\infty"),
|
|
||||||
}
|
|
||||||
),
|
|
||||||
{condition = tex_utils.in_mathzone}
|
|
||||||
),
|
|
||||||
|
|
||||||
s({trig='([^%a])sum', regTrig=true, wordTrig=false, snippetType="autosnippet"},
|
|
||||||
fmta(
|
|
||||||
[[<>\sum_{<>}^{<>} ]],
|
|
||||||
{
|
|
||||||
f( function(_, snip) return snip.captures[1] end ),
|
|
||||||
i(1, "n=0"),
|
|
||||||
i(2, "N-1"),
|
|
||||||
}
|
|
||||||
),
|
|
||||||
{condition = tex_utils.in_mathzone}
|
|
||||||
),
|
|
||||||
|
|
||||||
s({trig='([^%a])sqrt', regTrig=true, wordTrig=false, snippetType="autosnippet"},
|
|
||||||
fmta(
|
|
||||||
[[<>\sqrt{<>} ]],
|
|
||||||
{
|
|
||||||
f( function(_, snip) return snip.captures[1] end ),
|
|
||||||
i(1),
|
|
||||||
}
|
|
||||||
),
|
|
||||||
{condition = tex_utils.in_mathzone}
|
|
||||||
),
|
|
||||||
|
|
||||||
s({trig='([^%a])log', regTrig=true, wordTrig=false, snippetType="autosnippet"},
|
|
||||||
fmta(
|
|
||||||
[[<>\log_{<>} ]],
|
|
||||||
{
|
|
||||||
f( function(_, snip) return snip.captures[1] end ),
|
|
||||||
i(1, "2"),
|
|
||||||
}
|
|
||||||
),
|
|
||||||
{condition = tex_utils.in_mathzone}
|
|
||||||
),
|
|
||||||
|
|
||||||
s({trig='([^%a])ln', regTrig=true, wordTrig=false, snippetType="autosnippet"},
|
|
||||||
fmta(
|
|
||||||
[[<>\ln ]],
|
|
||||||
{
|
|
||||||
f( function(_, snip) return snip.captures[1] end ),
|
|
||||||
}
|
|
||||||
),
|
|
||||||
{condition = tex_utils.in_mathzone}
|
|
||||||
),
|
|
||||||
|
|
||||||
s({trig = '([^%a])ff', regTrig = true, wordTrig = false, snippetType = "autosnippet"},
|
|
||||||
fmta(
|
|
||||||
[[<>\frac{<>}{<>} ]],
|
|
||||||
{
|
|
||||||
f( function(_, snip) return snip.captures[1] end ),
|
|
||||||
i(1),
|
|
||||||
i(2)
|
|
||||||
}
|
|
||||||
),
|
|
||||||
{condition = tex_utils.in_mathzone}
|
|
||||||
),
|
|
||||||
|
|
||||||
s({trig="([^%a])mcal", regTrig=true, wordTrig=false, snippetType="autosnippet"},
|
|
||||||
fmta(
|
|
||||||
[[<>\mathcal{<>}]],
|
|
||||||
{
|
|
||||||
f( function(_, snip) return snip.captures[1] end ),
|
|
||||||
i(1),
|
|
||||||
}
|
|
||||||
),
|
|
||||||
{condition = tex_utils.in_mathzone}
|
|
||||||
),
|
|
||||||
|
|
||||||
s({trig="([^%a])mbb", regTrig=true, wordTrig=false, snippetType="autosnippet"},
|
|
||||||
fmta(
|
|
||||||
[[<>\mathbb{<>}]],
|
|
||||||
{
|
|
||||||
f( function(_, snip) return snip.captures[1] end ),
|
|
||||||
i(1),
|
|
||||||
}
|
|
||||||
),
|
|
||||||
{condition = tex_utils.in_mathzone}
|
|
||||||
),
|
|
||||||
|
|
||||||
s({trig="([^%a])tt", regTrig=true, wordTrig=false, snippetType="autosnippet"},
|
|
||||||
fmta(
|
|
||||||
[[<>\text{<>}]],
|
|
||||||
{
|
|
||||||
f( function(_, snip) return snip.captures[1] end ),
|
|
||||||
i(1),
|
|
||||||
}
|
|
||||||
),
|
|
||||||
{condition = tex_utils.in_mathzone}
|
|
||||||
),
|
|
||||||
|
|
||||||
s({trig=".", snippetType="autosnippet"},
|
|
||||||
fmta(
|
|
||||||
[[\cdot ]],
|
|
||||||
{}
|
|
||||||
),
|
|
||||||
{condition = tex_utils.in_mathzone}
|
|
||||||
),
|
|
||||||
|
|
||||||
s({trig="$$", snippetType="autosnippet"},
|
|
||||||
fmta(
|
|
||||||
[[$<>$]],
|
|
||||||
{
|
|
||||||
i(1),
|
|
||||||
}
|
|
||||||
),
|
|
||||||
{condition = tex_utils.in_mathzone}
|
|
||||||
),
|
|
||||||
|
|
||||||
s({trig="([^%a])bm", regTrig=true, wordTrig=false, snippetType="autosnippet"},
|
|
||||||
fmta(
|
|
||||||
[[<>\bm{<>}]],
|
|
||||||
{
|
|
||||||
f( function(_, snip) return snip.captures[1] end ),
|
|
||||||
i(1),
|
|
||||||
}
|
|
||||||
),
|
|
||||||
{condition = tex_utils.in_mathzone}
|
|
||||||
),
|
|
||||||
|
|
||||||
s({trig="__", wordTrig=false, snippetType="autosnippet"},
|
|
||||||
fmta(
|
|
||||||
[[_{<>}]],
|
|
||||||
{
|
|
||||||
i(1),
|
|
||||||
}
|
|
||||||
),
|
|
||||||
{condition = tex_utils.in_mathzone}
|
|
||||||
),
|
|
||||||
|
|
||||||
s({trig="^^", wordTrig=false, snippetType="autosnippet"},
|
|
||||||
fmta(
|
|
||||||
[[^{<>}]],
|
|
||||||
{
|
|
||||||
i(1),
|
|
||||||
}
|
|
||||||
),
|
|
||||||
{condition = tex_utils.in_mathzone}
|
|
||||||
),
|
|
||||||
|
|
||||||
s({trig="([^%a])oo", regTrig=true, wordTrig=false, snippetType="autosnippet"},
|
|
||||||
fmta(
|
|
||||||
[[<>\infty]],
|
|
||||||
{
|
|
||||||
f( function(_, snip) return snip.captures[1] end ),
|
|
||||||
}
|
|
||||||
),
|
|
||||||
{condition = tex_utils.in_mathzone}
|
|
||||||
),
|
|
||||||
|
|
||||||
s({trig="((", wordTrig=false, snippetType="autosnippet"},
|
|
||||||
fmta(
|
|
||||||
[[\mleft( <> \mright)]],
|
|
||||||
{
|
|
||||||
i(1),
|
|
||||||
}
|
|
||||||
),
|
|
||||||
{condition = tex_utils.in_mathzone}
|
|
||||||
),
|
|
||||||
|
|
||||||
s({trig="[[", wordTrig=false, snippetType="autosnippet"},
|
|
||||||
fmta(
|
|
||||||
"\\mleft[ <> \\mright]",
|
|
||||||
{
|
|
||||||
i(1),
|
|
||||||
}
|
|
||||||
),
|
|
||||||
{condition = tex_utils.in_mathzone}
|
|
||||||
),
|
|
||||||
|
|
||||||
s({trig="{{", wordTrig=false, snippetType="autosnippet"},
|
|
||||||
fmta(
|
|
||||||
"\\mleft\\{ <> \\mright\\}",
|
|
||||||
{
|
|
||||||
i(1),
|
|
||||||
}
|
|
||||||
),
|
|
||||||
{condition = tex_utils.in_mathzone}
|
|
||||||
),
|
|
||||||
|
|
||||||
s({trig="||", wordTrig=false, snippetType="autosnippet"},
|
|
||||||
fmta(
|
|
||||||
"\\lvert <> \\rvert ",
|
|
||||||
{
|
|
||||||
i(1),
|
|
||||||
}
|
|
||||||
),
|
|
||||||
{condition = tex_utils.in_mathzone}
|
|
||||||
),
|
|
||||||
|
|
||||||
s({trig="([^%a])hat", regTrig=true, wordTrig=false, snippetType="autosnippet"},
|
|
||||||
fmta(
|
|
||||||
[[<>\hat{<>}]],
|
|
||||||
{
|
|
||||||
f( function(_, snip) return snip.captures[1] end ),
|
|
||||||
i(1),
|
|
||||||
}
|
|
||||||
),
|
|
||||||
{condition = tex_utils.in_mathzone}
|
|
||||||
),
|
|
||||||
|
|
||||||
s({trig="([^%a])tld", regTrig=true, wordTrig=false, snippetType="autosnippet"},
|
|
||||||
fmta(
|
|
||||||
[[<>\tilde{<>}]],
|
|
||||||
{
|
|
||||||
f( function(_, snip) return snip.captures[1] end ),
|
|
||||||
i(1),
|
|
||||||
}
|
|
||||||
),
|
|
||||||
{condition = tex_utils.in_mathzone}
|
|
||||||
),
|
|
||||||
|
|
||||||
s({trig="([^%a])bar", regTrig=true, wordTrig=false, snippetType="autosnippet"},
|
|
||||||
fmta(
|
|
||||||
[[<>\overline{<>}]],
|
|
||||||
{
|
|
||||||
f( function(_, snip) return snip.captures[1] end ),
|
|
||||||
i(1),
|
|
||||||
}
|
|
||||||
),
|
|
||||||
{condition = tex_utils.in_mathzone}
|
|
||||||
),
|
|
||||||
|
|
||||||
s({trig="([%a])([%d])", regTrig=true, wordTrig=false, snippetType="autosnippet"},
|
|
||||||
fmta(
|
|
||||||
[[<>_<>]],
|
|
||||||
{
|
|
||||||
f( function(_, snip) return snip.captures[1] end ),
|
|
||||||
f( function(_, snip) return snip.captures[2] end ),
|
|
||||||
}
|
|
||||||
),
|
|
||||||
{condition = tex_utils.in_mathzone}
|
|
||||||
),
|
|
||||||
|
|
||||||
s({trig="=>", wordTrig=false, snippetType="autosnippet"},
|
|
||||||
fmta(
|
|
||||||
[[\Rightarrow ]],
|
|
||||||
{}
|
|
||||||
),
|
|
||||||
{condition = tex_utils.in_mathzone}
|
|
||||||
),
|
|
||||||
|
|
||||||
s({trig="->", wordTrig=false, snippetType="autosnippet"},
|
|
||||||
fmta(
|
|
||||||
[[\rightarrow ]],
|
|
||||||
{}
|
|
||||||
),
|
|
||||||
{condition = tex_utils.in_mathzone}
|
|
||||||
),
|
|
||||||
|
|
||||||
s({trig="([^%a])nab", regTrig=true, wordTrig=false, snippetType="autosnippet"},
|
|
||||||
fmta(
|
|
||||||
[[<>\nabla ]],
|
|
||||||
{
|
|
||||||
f( function(_, snip) return snip.captures[1] end ),
|
|
||||||
}
|
|
||||||
),
|
|
||||||
{condition = tex_utils.in_mathzone}
|
|
||||||
),
|
|
||||||
|
|
||||||
|
|
||||||
} -- return
|
|
||||||
|
|
||||||
@@ -1,132 +0,0 @@
|
|||||||
----------------
|
|
||||||
-- Abbreviations
|
|
||||||
----------------
|
|
||||||
|
|
||||||
|
|
||||||
local ls = require("luasnip")
|
|
||||||
local s = ls.snippet
|
|
||||||
local sn = ls.snippet_node
|
|
||||||
local t = ls.text_node
|
|
||||||
local i = ls.insert_node
|
|
||||||
local f = ls.function_node
|
|
||||||
local d = ls.dynamic_node
|
|
||||||
local fmt = require("luasnip.extras.fmt").fmt
|
|
||||||
local fmta = require("luasnip.extras.fmt").fmta
|
|
||||||
local rep = require("luasnip.extras").rep
|
|
||||||
|
|
||||||
|
|
||||||
---------------
|
|
||||||
-- Environments
|
|
||||||
---------------
|
|
||||||
|
|
||||||
|
|
||||||
local tex_utils = {}
|
|
||||||
|
|
||||||
tex_utils.in_mathzone = function() -- math context detection
|
|
||||||
return vim.fn['vimtex#syntax#in_mathzone']() == 1
|
|
||||||
end
|
|
||||||
|
|
||||||
tex_utils.in_text = function()
|
|
||||||
return not tex_utils.in_mathzone()
|
|
||||||
end
|
|
||||||
|
|
||||||
tex_utils.in_comment = function() -- comment detection
|
|
||||||
return vim.fn['vimtex#syntax#in_comment']() == 1
|
|
||||||
end
|
|
||||||
|
|
||||||
tex_utils.in_env = function(name) -- generic environment detection
|
|
||||||
local is_inside = vim.fn['vimtex#env#is_inside'](name)
|
|
||||||
return (is_inside[1] > 0 and is_inside[2] > 0)
|
|
||||||
end
|
|
||||||
|
|
||||||
local get_visual = function(args, parent)
|
|
||||||
if (#parent.snippet.env.LS_SELECT_RAW > 0) then
|
|
||||||
return sn(nil, i(1, parent.snippet.env.LS_SELECT_RAW))
|
|
||||||
else
|
|
||||||
return sn(nil, i(1))
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
-----------
|
|
||||||
-- Snippets
|
|
||||||
-----------
|
|
||||||
|
|
||||||
|
|
||||||
return {
|
|
||||||
|
|
||||||
|
|
||||||
s({trig="funcplot"},
|
|
||||||
fmta(
|
|
||||||
[[
|
|
||||||
\begin{figure}[H]
|
|
||||||
\centering
|
|
||||||
|
|
||||||
\begin{tikzpicture}
|
|
||||||
\begin{axis}[
|
|
||||||
domain=<>,
|
|
||||||
width=\textwidth,
|
|
||||||
height=0.75\textwidth,
|
|
||||||
]
|
|
||||||
\addplot+[mark=none, line width=1pt]
|
|
||||||
{<>};
|
|
||||||
\end{axis}
|
|
||||||
\end{tikzpicture}
|
|
||||||
\end{figure}
|
|
||||||
]],
|
|
||||||
{
|
|
||||||
i(1, "-5:5"),
|
|
||||||
i(2),
|
|
||||||
}
|
|
||||||
)
|
|
||||||
),
|
|
||||||
|
|
||||||
s({trig="csvplot"},
|
|
||||||
fmta(
|
|
||||||
[[
|
|
||||||
\begin{figure}[H]
|
|
||||||
\centering
|
|
||||||
|
|
||||||
\begin{tikzpicture}
|
|
||||||
\begin{axis}[
|
|
||||||
width=\textwidth,
|
|
||||||
height=0.75\textwidth,
|
|
||||||
]
|
|
||||||
\addplot+[mark=none, line width=1pt]
|
|
||||||
table[col sep=comma, x=<>, y=<>]
|
|
||||||
{<>};
|
|
||||||
\end{axis}
|
|
||||||
\end{tikzpicture}
|
|
||||||
\end{figure}
|
|
||||||
]],
|
|
||||||
{
|
|
||||||
i(1, "x"),
|
|
||||||
i(2, "y"),
|
|
||||||
i(3),
|
|
||||||
}
|
|
||||||
)
|
|
||||||
),
|
|
||||||
|
|
||||||
s({trig="fig"},
|
|
||||||
fmta(
|
|
||||||
[[
|
|
||||||
\begin{figure}[H]
|
|
||||||
\centering
|
|
||||||
|
|
||||||
<>
|
|
||||||
|
|
||||||
\caption{<>}
|
|
||||||
\label{fig:<>}
|
|
||||||
\end{figure}
|
|
||||||
]],
|
|
||||||
{
|
|
||||||
i(0),
|
|
||||||
i(1),
|
|
||||||
i(2),
|
|
||||||
}
|
|
||||||
)
|
|
||||||
),
|
|
||||||
|
|
||||||
|
|
||||||
} -- return
|
|
||||||
|
|
||||||
9
papis/.config/papis/config
Normal file
9
papis/.config/papis/config
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
[books]
|
||||||
|
dir = ~/Documents/literature/books
|
||||||
|
|
||||||
|
[keyboard]
|
||||||
|
dir = ~/Documents/literature/keyboard
|
||||||
|
|
||||||
|
[settings]
|
||||||
|
default-library = keyboard
|
||||||
|
|
||||||
@@ -18,7 +18,7 @@ bindsym Control+Mod1+l exec $lock
|
|||||||
|
|
||||||
bindsym Print exec grim -g "$(slurp -d)" - | wl-copy
|
bindsym Print exec grim -g "$(slurp -d)" - | wl-copy
|
||||||
|
|
||||||
bindsym $mod+p exec kitty -e /usr/bin/expect -c "spawn python; expect \\"*>>> \\"; send \\"import numpy as np\n\\"; send \\"import sympy as sp\n\\"; interact"
|
bindsym $mod+p exec kitty -e /usr/bin/expect -c "spawn python; expect \\"*>>> \\"; send \\"import numpy as np\n\\"; send \\"import sympy as sp\n\\"; send \\"import torch\n\\"; interact"
|
||||||
bindsym $mod+Return exec $term
|
bindsym $mod+Return exec $term
|
||||||
bindsym $mod+Shift+q kill
|
bindsym $mod+Shift+q kill
|
||||||
bindsym $mod+d exec $menu
|
bindsym $mod+d exec $menu
|
||||||
@@ -26,7 +26,7 @@ bindsym $mod+d exec $menu
|
|||||||
floating_modifier $mod normal
|
floating_modifier $mod normal
|
||||||
|
|
||||||
bindsym $mod+Shift+c reload
|
bindsym $mod+Shift+c reload
|
||||||
bindsym $mod+Shift+e exec i3-msg exit
|
bindsym $mod+Shift+e exec swaymsg exit
|
||||||
|
|
||||||
bar {
|
bar {
|
||||||
swaybar_command waybar
|
swaybar_command waybar
|
||||||
@@ -52,16 +52,26 @@ bindsym $mod+c exec kitty -e python
|
|||||||
|
|
||||||
for_window [title="blueman-manager"] floating enable
|
for_window [title="blueman-manager"] floating enable
|
||||||
|
|
||||||
for_window [class="^.*"] border pixel 3
|
for_window [class="^.*"] border pixel 0
|
||||||
default_floating_border none
|
default_floating_border none
|
||||||
default_floating_border normal 0
|
default_floating_border normal 0
|
||||||
hide_edge_borders smart
|
hide_edge_borders smart
|
||||||
|
|
||||||
|
for_window [app_id="org.pwmt.zathura"] opacity 0.94
|
||||||
|
for_window [app_id="kitty"] opacity 0.94
|
||||||
|
|
||||||
|
exec_always --no-startup-id bash -c "killall flashfocus; flashfocus --flash-opacity 0.92 -l never"
|
||||||
|
|
||||||
|
|
||||||
gaps inner 15
|
gaps inner 15
|
||||||
smart_gaps on
|
smart_gaps on
|
||||||
|
bindsym $mod+g exec swaymsg gaps inner current toggle 15
|
||||||
|
|
||||||
|
# blur enable
|
||||||
|
# blur_radius 1
|
||||||
|
# blur_passes 4
|
||||||
|
# blur_noise 0.1
|
||||||
|
|
||||||
blur enable
|
|
||||||
blur_radius 8
|
|
||||||
|
|
||||||
exec dbus-update-activation-environment DISPLAY
|
exec dbus-update-activation-environment DISPLAY
|
||||||
|
|
||||||
|
|||||||
@@ -2,9 +2,11 @@ input "type:touchpad" {
|
|||||||
tap enabled
|
tap enabled
|
||||||
natural_scroll enabled
|
natural_scroll enabled
|
||||||
scroll_factor 0.4
|
scroll_factor 0.4
|
||||||
dwt disable
|
dwt enable
|
||||||
accel_profile "adaptive"
|
accel_profile "adaptive"
|
||||||
pointer_accel 0
|
pointer_accel 0
|
||||||
|
drag enabled
|
||||||
|
drag_lock disabled
|
||||||
}
|
}
|
||||||
|
|
||||||
input type:keyboard {
|
input type:keyboard {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
set $ws1 "1: Dev"
|
set $ws1 "1: Dev"
|
||||||
set $ws2 "2: Firefox"
|
set $ws2 "2: Firefox"
|
||||||
set $ws3 "3: Management"
|
set $ws3 "3: Management"
|
||||||
set $ws4 "4"
|
set $ws4 "4: Mehscellaneous"
|
||||||
set $ws5 "5: Doc"
|
set $ws5 "5: Doc"
|
||||||
set $ws6 "6: 3D-Printing"
|
set $ws6 "6: 3D-Printing"
|
||||||
set $ws7 "7: Music"
|
set $ws7 "7: Music"
|
||||||
@@ -33,15 +33,20 @@ bindsym $mod+Shift+0 move container to workspace number $ws10
|
|||||||
|
|
||||||
assign [class="Spotify"] $ws7
|
assign [class="Spotify"] $ws7
|
||||||
|
|
||||||
exec i3-msg 'workspace $ws1; exec kitty; $ws1'
|
exec swaymsg 'workspace $ws1; exec kitty; $ws1'
|
||||||
exec i3-msg 'workspace $ws2; exec firefox'
|
exec swaymsg 'workspace $ws2; exec firefox'
|
||||||
|
|
||||||
#
|
#
|
||||||
## Multiple monitors
|
## Multiple monitors
|
||||||
#
|
#
|
||||||
|
|
||||||
set $this_disp "eDP-1"
|
set $this_disp "eDP-1"
|
||||||
set $other_disp "DP-11"
|
set $other_disp "DP-3"
|
||||||
|
# set $this_disp "eDP-1"
|
||||||
|
# set $other_disp "DP-3"
|
||||||
|
|
||||||
|
# output edP-1 mode 1920x1080@120Hz
|
||||||
|
# output edP-1
|
||||||
|
|
||||||
workspace $ws1 output $other_disp $this_disp
|
workspace $ws1 output $other_disp $this_disp
|
||||||
workspace $ws2 output $this_disp
|
workspace $ws2 output $this_disp
|
||||||
|
|||||||
@@ -11,6 +11,8 @@ set -g status-right-length 90
|
|||||||
set -g status-justify centre
|
set -g status-justify centre
|
||||||
set -s escape-time 0
|
set -s escape-time 0
|
||||||
|
|
||||||
|
set -g allow-passthrough on
|
||||||
|
|
||||||
## COLORSCHEME: gruvbox dark (medium)
|
## COLORSCHEME: gruvbox dark (medium)
|
||||||
set-option -g status "on"
|
set-option -g status "on"
|
||||||
|
|
||||||
|
|||||||
40
zathura/.config/zathura/zathurarc
Normal file
40
zathura/.config/zathura/zathurarc
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
set notification-error-bg "rgba(29,32,33,1)" # bg
|
||||||
|
set notification-error-fg "rgba(251,73,52,1)" # bright:red
|
||||||
|
set notification-warning-bg "rgba(29,32,33,1)" # bg
|
||||||
|
set notification-warning-fg "rgba(250,189,47,1)" # bright:yellow
|
||||||
|
set notification-bg "rgba(29,32,33,1)" # bg
|
||||||
|
set notification-fg "rgba(184,187,38,1)" # bright:green
|
||||||
|
|
||||||
|
set completion-bg "rgba(80,73,69,1)" # bg2
|
||||||
|
set completion-fg "rgba(235,219,178,1)" # fg
|
||||||
|
set completion-group-bg "rgba(60,56,54,1)" # bg1
|
||||||
|
set completion-group-fg "rgba(146,131,116,1)" # gray
|
||||||
|
set completion-highlight-bg "rgba(131,165,152,1)" # bright:blue
|
||||||
|
set completion-highlight-fg "rgba(80,73,69,1)" # bg2
|
||||||
|
|
||||||
|
# Define the color in index mode
|
||||||
|
set index-bg "rgba(80,73,69,1)" # bg2
|
||||||
|
set index-fg "rgba(235,219,178,1)" # fg
|
||||||
|
set index-active-bg "rgba(131,165,152,1)" # bright:blue
|
||||||
|
set index-active-fg "rgba(80,73,69,1)" # bg2
|
||||||
|
|
||||||
|
set inputbar-bg "rgba(29,32,33,1)" # bg
|
||||||
|
set inputbar-fg "rgba(235,219,178,1)" # fg
|
||||||
|
|
||||||
|
set statusbar-bg "rgba(80,73,69,1)" # bg2
|
||||||
|
set statusbar-fg "rgba(235,219,178,1)" # fg
|
||||||
|
|
||||||
|
set highlight-color "rgba(250,189,47,0.5)" # bright:yellow
|
||||||
|
set highlight-active-color "rgba(254,128,25,0.5)" # bright:orange
|
||||||
|
|
||||||
|
set default-bg "rgba(29,32,33,1)" # bg
|
||||||
|
set default-fg "rgba(235,219,178,1)" # fg
|
||||||
|
set render-loading true
|
||||||
|
set render-loading-bg "rgba(29,32,33,1)" # bg
|
||||||
|
set render-loading-fg "rgba(235,219,178,1)" # fg
|
||||||
|
|
||||||
|
# Recolor book content's color
|
||||||
|
set recolor-lightcolor "rgba(29,32,33,1)" # bg
|
||||||
|
set recolor-darkcolor "rgba(235,219,178,1)" # fg
|
||||||
|
set recolor "true"
|
||||||
|
set recolor-keephue "true" # keep original color
|
||||||
27
zsh/.zshrc
27
zsh/.zshrc
@@ -23,7 +23,8 @@ zstyle ':vcs_info:git:*' formats '%b '
|
|||||||
setopt PROMPT_SUBST
|
setopt PROMPT_SUBST
|
||||||
PROMPT='%F{magenta}[%m] %F{blue}%~%f %F{red}${vcs_info_msg_0_}%f$ '
|
PROMPT='%F{magenta}[%m] %F{blue}%~%f %F{red}${vcs_info_msg_0_}%f$ '
|
||||||
|
|
||||||
source /usr/share/doc/fzf/examples/key-bindings.zsh
|
source /usr/share/fzf/key-bindings.zsh
|
||||||
|
source /usr/share/fzf/completion.zsh
|
||||||
|
|
||||||
alias ssh='kitty +kitten ssh'
|
alias ssh='kitty +kitten ssh'
|
||||||
|
|
||||||
@@ -38,17 +39,23 @@ alias ....="cd ../../.."
|
|||||||
export PATH=$PATH:/home/andreas/.local/bin
|
export PATH=$PATH:/home/andreas/.local/bin
|
||||||
export EDITOR=nvim
|
export EDITOR=nvim
|
||||||
|
|
||||||
alias get-idf='. $HOME/ext_sw/esp-idf/export.sh'
|
alias get-idf='. $HOME/ext-sw/esp-idf/export.sh'
|
||||||
|
|
||||||
alias c='cd ~/.dotfiles'
|
alias c='cd ~/.dotfiles'
|
||||||
alias sc='cd ~/.config/sway'
|
alias sc='cd ~/.config/sway && nvim'
|
||||||
alias nc='cd ~/.config/nvim'
|
alias nc='cd ~/.config/nvim && nvim'
|
||||||
alias flog='nvim -c "Flog -all"'
|
alias flog='nvim -c "Flog -all"'
|
||||||
|
alias bin='cd ~/.local/bin && nvim'
|
||||||
|
|
||||||
|
export PATH=$PATH:"$HOME/.cargo/bin"
|
||||||
|
|
||||||
|
eval "$(zoxide init zsh)"
|
||||||
|
eval "$(thefuck --alias)"
|
||||||
|
|
||||||
|
. "/usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh"
|
||||||
|
|
||||||
|
bindkey '^l' autosuggest-accept
|
||||||
# . "$HOME/.cargo/env"
|
# . "$HOME/.cargo/env"
|
||||||
#
|
# export PYENV_ROOT="$HOME/.pyenv"
|
||||||
# eval "$(zoxide init zsh)"
|
# [[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"
|
||||||
# eval "$(thefuck --alias)"
|
# eval "$(pyenv init - zsh)"
|
||||||
|
|
||||||
. "$HOME/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh"
|
|
||||||
bindkey '^y' autosuggest-accept
|
|
||||||
|
|||||||
Reference in New Issue
Block a user