Compare commits
No commits in common. "master" and "legacy" have entirely different histories.
|
@ -1,4 +0,0 @@
|
|||
root = true
|
||||
|
||||
[*]
|
||||
indent_style = tab
|
61
.gitmodules
vendored
61
.gitmodules
vendored
|
@ -1,12 +1,49 @@
|
|||
[submodule "zsh/ohmyzsh"]
|
||||
path = zsh/ohmyzsh
|
||||
url = https://github.com/ohmyzsh/ohmyzsh
|
||||
[submodule "zsh/custom/plugins/zsh-autosuggestions"]
|
||||
path = zsh/custom/plugins/zsh-autosuggestions
|
||||
url = https://github.com/zsh-users/zsh-autosuggestions/
|
||||
[submodule "tmux/tpm"]
|
||||
path = tmux/tpm
|
||||
url = https://github.com/tmux-plugins/tpm
|
||||
[submodule "zsh/custom/plugins/zsh-autopair"]
|
||||
path = zsh/custom/plugins/zsh-autopair
|
||||
url = https://github.com/hlissner/zsh-autopair
|
||||
[submodule "vim/.vim/bundle/nerdtree"]
|
||||
path = vim/.vim/bundle/nerdtree
|
||||
url = https://github.com/scrooloose/nerdtree.git
|
||||
[submodule "vim/.vim/bundle/vim-tmux-navigator"]
|
||||
path = vim/.vim/bundle/vim-tmux-navigator
|
||||
url = https://github.com/christoomey/vim-tmux-navigator.git
|
||||
[submodule "vim/.vim/bundle/YouCompleteMe"]
|
||||
path = vim/.vim/bundle/YouCompleteMe
|
||||
url = https://github.com/Valloric/YouCompleteMe.git
|
||||
ignore = dirty
|
||||
[submodule "vim/.vim/bundle/tagbar"]
|
||||
path = vim/.vim/bundle/tagbar
|
||||
url = https://github.com/majutsushi/tagbar.git
|
||||
[submodule "vim/.vim/bundle/tcomment_vim"]
|
||||
path = vim/.vim/bundle/tcomment_vim
|
||||
url = https://github.com/tomtom/tcomment_vim.git
|
||||
[submodule "vim/.vim/bundle/vim-exchange"]
|
||||
path = vim/.vim/bundle/vim-exchange
|
||||
url = https://github.com/tommcdo/vim-exchange.git
|
||||
[submodule "vim/.vim/bundle/tabular"]
|
||||
path = vim/.vim/bundle/tabular
|
||||
url = https://github.com/godlygeek/tabular.git
|
||||
[submodule "vim/.vim/bundle/vim-surround"]
|
||||
path = vim/.vim/bundle/vim-surround
|
||||
url = https://github.com/tpope/vim-surround.git
|
||||
[submodule "vim/.vim/bundle/vim-airline"]
|
||||
path = vim/.vim/bundle/vim-airline
|
||||
url = https://github.com/bling/vim-airline.git
|
||||
[submodule "vim/.vim/bundle/gruvbox"]
|
||||
path = vim/.vim/bundle/gruvbox
|
||||
url = https://github.com/morhetz/gruvbox.git
|
||||
[submodule "vim/.vim/bundle/vim-matchparenalways"]
|
||||
path = vim/.vim/bundle/vim-matchparenalways
|
||||
url = https://github.com/justinmk/vim-matchparenalways.git
|
||||
[submodule "vim/.vim/bundle/vim-gradle"]
|
||||
path = vim/.vim/bundle/vim-gradle
|
||||
url = https://github.com/tfnico/vim-gradle.git
|
||||
[submodule "vim/.vim/bundle/indentLine"]
|
||||
path = vim/.vim/bundle/indentLine
|
||||
url = https://github.com/Yggdroot/indentLine.git
|
||||
[submodule "vim/.vim/bundle/delimitMate"]
|
||||
path = vim/.vim/bundle/delimitMate
|
||||
url = https://github.com/Raimondi/delimitMate.git
|
||||
[submodule "vim/.vim/bundle/ctrlp.vim"]
|
||||
path = vim/.vim/bundle/ctrlp.vim
|
||||
url = https://github.com/kien/ctrlp.vim.git
|
||||
[submodule "vim/.vim/bundle/vim-latex-live-preview"]
|
||||
path = vim/.vim/bundle/vim-latex-live-preview
|
||||
url = https://github.com/xuhdev/vim-latex-live-preview.git
|
||||
|
|
10
README.md
Normal file
10
README.md
Normal file
|
@ -0,0 +1,10 @@
|
|||
#Dotfiles
|
||||
These are my personal dotfiles.
|
||||
You are free to use and change them to your liking.
|
||||
|
||||
##Instal
|
||||
````
|
||||
git clone https://github.com/DreadedX/dotfiles.git ~/.dotfiles
|
||||
cd .dotfiles
|
||||
./install.sh ~/.dotfiles
|
||||
````
|
|
@ -1,22 +0,0 @@
|
|||
|
||||
[env]
|
||||
TERM = "xterm-256color"
|
||||
|
||||
[font]
|
||||
size = 10
|
||||
|
||||
[font.normal]
|
||||
family = "Hack Nerd Font"
|
||||
|
||||
[window]
|
||||
decorations = "none"
|
||||
dynamic_padding = true
|
||||
dynamic_title = true
|
||||
resize_increments = true
|
||||
|
||||
[window.dimensions]
|
||||
columns = 80
|
||||
lines = 24
|
||||
|
||||
[general]
|
||||
import = ["/home/tim/.config/alacritty/gruvbox_dark.toml"]
|
|
@ -1,23 +0,0 @@
|
|||
[colors.bright]
|
||||
black = "#928374"
|
||||
blue = "#83a598"
|
||||
cyan = "#8ec07c"
|
||||
green = "#b8bb26"
|
||||
magenta = "#d3869b"
|
||||
red = "#fb4934"
|
||||
white = "#ebdbb2"
|
||||
yellow = "#fabd2f"
|
||||
|
||||
[colors.normal]
|
||||
black = "#282828"
|
||||
blue = "#458588"
|
||||
cyan = "#689d6a"
|
||||
green = "#98971a"
|
||||
magenta = "#b16286"
|
||||
red = "#cc241d"
|
||||
white = "#a89984"
|
||||
yellow = "#d79921"
|
||||
|
||||
[colors.primary]
|
||||
background = "#282828"
|
||||
foreground = "#fbf1c7"
|
109
cava/.config/cava/config
Normal file
109
cava/.config/cava/config
Normal file
|
@ -0,0 +1,109 @@
|
|||
## Configuration file for CAVA. Default values are commented out. Use either ; or # for commenting.
|
||||
|
||||
|
||||
[general]
|
||||
|
||||
# smoothing mode, can be normal, scientific or waves.
|
||||
; mode = waves
|
||||
|
||||
# Framerate Default: 60. Accepts only non-negative values.
|
||||
; framerate = 60
|
||||
|
||||
# Sensitivity in %. If you think the bars are to low/response is to littei, try
|
||||
# increasing this value 200 means double height. Accepts only non-negative values.
|
||||
# sensitivity = 4
|
||||
sensitivity = 4
|
||||
|
||||
# Autosens will atempt to decrease sensitivity if cava peaks. 1 = on, 0 = off
|
||||
autosens = 0
|
||||
|
||||
# The number of bars. 0 (default) sets it to auto (fil upp console).
|
||||
# width of bras and space between bars in number of characters. Default witdth 3 and space 1.
|
||||
; bars = 35
|
||||
bar_width = 1
|
||||
bar_spacing = 1
|
||||
|
||||
|
||||
# Lower cutoff freq for lowest bar and higheset for highest bar
|
||||
# the bandwith of the visualizer, defaults to 50 - 10000 Hz
|
||||
# Note: there is a minimum total bandwith of 43Mhz x number of bars.
|
||||
# Cava will automaticly increase the higher cuttoff if a too low band is specified.
|
||||
lower_cutoff_freq = 50
|
||||
higher_cutoff_freq = 10000
|
||||
|
||||
|
||||
|
||||
[input]
|
||||
|
||||
# method of capturing audio, supported input methods are: 'pulse', 'alsa' or 'fifo'.
|
||||
# Defaults to 'alsa'
|
||||
#
|
||||
# for pulseaudio 'source' wil be the source. Default: 'NULL', which uses system default source
|
||||
# all pulseaudio sinks(outputs) have 'monitor' sources(inputs) associated with them
|
||||
# but the default, might be your microphone, try the command 'pacmd list-sources' to find the right one
|
||||
# you can change source here to the name of your prefered device, or cahnge your default pulseaudio source by running
|
||||
# 'pacmd set-default-source NAME|#N'
|
||||
#
|
||||
# for alsa 'source' will be the capture device. Default: 'hw:Loopback,1'
|
||||
# for fifo 'source' will be the path to fifo-file. Default: '/tmp/mpd.fifo'
|
||||
; method = alsa
|
||||
; source = hw:Loopback,1
|
||||
|
||||
; method = fifo
|
||||
; source = /tmp/mpd.fifo
|
||||
|
||||
; method = pulse
|
||||
; source = NULL
|
||||
|
||||
|
||||
|
||||
|
||||
[output]
|
||||
|
||||
# method used to draw output may be ncurses, noncurses.
|
||||
; method = ncurses
|
||||
|
||||
# visual styles, may be 'stereo' or 'mono'.
|
||||
# Stereo mirrors both channels with low frequencies in center.
|
||||
# Mono avrages both channels and outputs left to right lowest to highest frequencies
|
||||
style = stereo
|
||||
|
||||
|
||||
[color]
|
||||
|
||||
# supported colors are: red, green, yellow, magenta, cyan, white, blue, black.
|
||||
; background = black
|
||||
; foreground = red
|
||||
gradient = 1
|
||||
gradient_color_1 = '#ff0000'
|
||||
gradient_color_2 = '#220000'
|
||||
|
||||
|
||||
[smoothing]
|
||||
|
||||
# multiplier for the integral smoothing calculations. Takes values from 0 - 0.99.
|
||||
# Higher values means smoother, but less precise. 0 to disable.
|
||||
integral = 0
|
||||
|
||||
# disables or enables the so-called "Monstercat smoothing". Default: 1. Set to 0 to disable.
|
||||
monstercat = 1
|
||||
|
||||
# Set gravity multiplier for "drop off". Higher values means bars will drop faster.
|
||||
# Accepts only non-negative values. 0.5 means half gravity, 2 means double. Set to 0 to disable "drop off".
|
||||
gravity = 100
|
||||
|
||||
|
||||
# In bar height, bars that whould have been lower that this will not be drawn.
|
||||
; ignore = 0
|
||||
|
||||
|
||||
[eq]
|
||||
|
||||
# This one is tricky. You can have as much keys as you want.
|
||||
# remember to uncomment more then one key! More keys = more precision.
|
||||
# Look at readme.md on github for further explanations and examples.
|
||||
; 1 = 1 # bass
|
||||
; 2 = 3
|
||||
; 3 = 2 # midtone
|
||||
; 4 = 2
|
||||
; 5 = 1 # treble
|
|
@ -1,4 +0,0 @@
|
|||
[include]
|
||||
path = ~/.dotfiles/git/configs/common.gitconfig
|
||||
|
||||
path = ~/.dotfiles/git/profiles/ALTEN.gitconfig
|
10
git/.gitignore
vendored
Normal file
10
git/.gitignore
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
# Created by https://www.gitignore.io
|
||||
|
||||
### Vim ###
|
||||
[._]*.s[a-w][a-z]
|
||||
[._]s[a-w][a-z]
|
||||
*.un~
|
||||
Session.vim
|
||||
.netrwhist
|
||||
*~
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
gitignore
|
||||
profiles
|
||||
configs
|
|
@ -1,27 +0,0 @@
|
|||
[include]
|
||||
path = ~/.dotfiles/git/configs/lfs.gitconfig
|
||||
path = ~/.dotfiles/git/configs/delta.gitconfig
|
||||
|
||||
[push]
|
||||
default = simple
|
||||
|
||||
[core]
|
||||
excludesfile = ~/.dotfiles/git/gitignore
|
||||
|
||||
[color]
|
||||
ui = true
|
||||
|
||||
[credential]
|
||||
helper = store
|
||||
|
||||
[pull]
|
||||
; If we pull we only want to fast forward, if that is not possible we should not allow pull to work
|
||||
; Instead use fetch and then either rebase or merge
|
||||
ff = only
|
||||
; rebase = false
|
||||
|
||||
[diff]
|
||||
tool = nvimdiff
|
||||
|
||||
[init]
|
||||
defaultBranch = master
|
|
@ -1,54 +0,0 @@
|
|||
[delta "gruvmax-fang"]
|
||||
# author: https://github.com/maxfangx
|
||||
# Modified by: Dreaded_X
|
||||
# General appearance
|
||||
dark = true
|
||||
syntax-theme = gruvbox-dark
|
||||
# File
|
||||
file-style = "#FFFFFF" bold
|
||||
file-added-label = [+]
|
||||
file-copied-label = [==]
|
||||
file-modified-label = [*]
|
||||
file-removed-label = [-]
|
||||
file-renamed-label = [->]
|
||||
file-decoration-style = "#434C5E" ul
|
||||
file-decoration-style = "#84786A" ul
|
||||
# No hunk headers
|
||||
hunk-header-style = omit
|
||||
# Line numbers
|
||||
line-numbers = true
|
||||
line-numbers-left-style = "#84786A"
|
||||
line-numbers-right-style = "#84786A"
|
||||
line-numbers-minus-style = "#A02A11"
|
||||
line-numbers-plus-style = "#479B36"
|
||||
line-numbers-zero-style = "#84786A"
|
||||
line-numbers-left-format = " {nm:>3} │"
|
||||
line-numbers-right-format = " {np:>3} │"
|
||||
# Diff contents
|
||||
inline-hint-style = syntax
|
||||
minus-non-emph-style = syntax auto
|
||||
plus-non-emph-style = syntax auto
|
||||
whitespace-error-style = "#FB4934" reverse
|
||||
# Blame
|
||||
blame-code-style = syntax
|
||||
# Merge conflicts
|
||||
merge-conflict-begin-symbol = ⌃
|
||||
merge-conflict-end-symbol = ⌄
|
||||
merge-conflict-ours-diff-header-style = "#FABD2F" bold
|
||||
merge-conflict-theirs-diff-header-style = "#FABD2F" bold overline
|
||||
merge-conflict-ours-diff-header-decoration-style = ''
|
||||
merge-conflict-theirs-diff-header-decoration-style = ''
|
||||
|
||||
[core]
|
||||
pager = delta
|
||||
|
||||
[interactive]
|
||||
diffFilter = delta --color-only
|
||||
|
||||
[delta]
|
||||
features = gruvmax-fang
|
||||
navigate = true
|
||||
side-by-side = true
|
||||
|
||||
[merge]
|
||||
conflictstyle = zdiff3
|
|
@ -1,5 +0,0 @@
|
|||
[filter "lfs"]
|
||||
process = git-lfs filter-process
|
||||
required = true
|
||||
clean = git-lfs clean -- %f
|
||||
smudge = git-lfs smudge -- %f
|
|
@ -1,7 +0,0 @@
|
|||
[include]
|
||||
path = ~/.dotfiles/git/configs/common.gitconfig
|
||||
|
||||
path = ~/.dotfiles/git/profiles/Dreaded_X.gitconfig
|
||||
|
||||
[includeIf "gitdir:~/Projects/ALTEN/"]
|
||||
path = ~/.dotfiles/git/profiles/ALTEN.gitconfig
|
|
@ -1,18 +0,0 @@
|
|||
# Created by https://www.gitignore.io/api/vim
|
||||
|
||||
### Vim ###
|
||||
# swap
|
||||
.sw[a-p]
|
||||
.*.sw[a-p]
|
||||
# session
|
||||
Session.vim
|
||||
# temporary
|
||||
.netrwhist
|
||||
*~
|
||||
# auto-generated tag files
|
||||
tags
|
||||
|
||||
# End of https://www.gitignore.io/api/vim
|
||||
|
||||
# Make sure we do not include vimlocal files
|
||||
.vimlocal
|
|
@ -1,6 +0,0 @@
|
|||
[user]
|
||||
name = Tim Huizinga
|
||||
email = tim.huizinga@alten.nl
|
||||
|
||||
[commit]
|
||||
gpgsign = false
|
|
@ -1,7 +0,0 @@
|
|||
[user]
|
||||
name = Dreaded_X
|
||||
email = tim@huizinga.dev
|
||||
signingkey = CD17A34CBFB21DE9A73D47EB76BDEC4E165D8AD9
|
||||
|
||||
[commit]
|
||||
gpgsign = true
|
30
gtk/.config/gtk-3.0/gtk.css
Normal file
30
gtk/.config/gtk-3.0/gtk.css
Normal file
|
@ -0,0 +1,30 @@
|
|||
window.ssd separator:first-child + headerbar:backdrop,
|
||||
window.ssd separator:first-child + headerbar,
|
||||
window.ssd headerbar:first-child:backdrop,
|
||||
window.ssd headerbar:first-child,
|
||||
window.ssd headerbar:last-child:backdrop,
|
||||
window.ssd headerbar:last-child,
|
||||
window.ssd stack headerbar:first-child:backdrop,
|
||||
window.ssd stack headerbar:first-child,
|
||||
window.ssd stack headerbar:last-child:backdrop,
|
||||
window.ssd stack headerbar:last-child,
|
||||
window.ssd decoration,
|
||||
window.ssd headerbar.titlebar {
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
window.ssd headerbar * {
|
||||
margin-top: -100px;
|
||||
color: #222d32; /* May need to tweak, this matches Adwaita Dark */
|
||||
}
|
||||
|
||||
window.ssd headerbar.titlebar,
|
||||
window.ssd headerbar.titlebar button.titlebutton {
|
||||
border: none;
|
||||
font-size: 0;
|
||||
height: 0;
|
||||
margin: 0;
|
||||
max-height: 0;
|
||||
min-height: 0;
|
||||
padding: 0;
|
||||
}
|
|
@ -1,24 +0,0 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
# Install additional dependencies
|
||||
sudo apt-get install fuse libfuse2 unzip ripgrep python3-venv xclip -y --no-install-recommends
|
||||
|
||||
# Install new version of node
|
||||
curl -fsSL https://deb.nodesource.com/setup_23.x -o /tmp/nodesource_setup.sh
|
||||
sudo -E bash /tmp/nodesource_setup.sh
|
||||
sudo apt-get install -y nodejs
|
||||
|
||||
# Install new version of neovim
|
||||
sudo rm -rf /usr/local/bin/nvim
|
||||
sudo wget https://github.com/neovim/neovim-releases/releases/download/v0.11.1/nvim-linux-x86_64.appimage -O /usr/local/bin/nvim
|
||||
sudo chmod +x /usr/local/bin/nvim
|
||||
|
||||
# Get latest version of dotfiles
|
||||
rm -rf ~/.dotfiles
|
||||
git clone https://git.huizinga.dev/Dreaded_X/dotfiles ~/.dotfiles
|
||||
mkdir -p ~/.config
|
||||
ln -s ~/.dotfiles/nvim/dot-config/nvim ~/.config/nvim
|
||||
|
||||
# Remove include paths from copied host gitconfig
|
||||
sed -i '/path = /d' ~/.gitconfig
|
69
install.sh
Executable file
69
install.sh
Executable file
|
@ -0,0 +1,69 @@
|
|||
#!/bin/bash
|
||||
# Show help
|
||||
function show_help {
|
||||
echo "Specify existing directory";
|
||||
}
|
||||
|
||||
# Ask user
|
||||
function ask {
|
||||
while true; do
|
||||
read -p "$1 [Y/n] " yn
|
||||
case $yn in
|
||||
[Nn]* ) break;;
|
||||
* ) $2; break;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
# Update submodules
|
||||
function submodule {
|
||||
git submodule update --init --recursive
|
||||
}
|
||||
# Apply patches
|
||||
function patch {
|
||||
cd $dotfiles
|
||||
git am $dotfiles/patches/*.patch
|
||||
}
|
||||
|
||||
# Comple YouCompleteMe
|
||||
function ycm {
|
||||
$dotfiles/vim/bundle/YouCompleteMe/install.sh
|
||||
}
|
||||
|
||||
# Install tmux-vim-select-pane
|
||||
function tvpane {
|
||||
sudo curl -fsSL https://raw.github.com/mislav/dotfiles/1500cd2/bin/tmux-vim-select-pane -o /usr/local/bin/tmux-vim-select-pane
|
||||
sudo chmod +x /usr/local/bin/tmux-vim-select-pane
|
||||
}
|
||||
|
||||
# Install fonts
|
||||
function fonts {
|
||||
curl -fsSL https://github.com/Lokaltog/powerline-fonts/raw/master/SourceCodePro/Sauce%20Code%20Powerline%20Regular.otf -o "$HOME/.fonts/Sauce Code Powerline Regular.otf"
|
||||
}
|
||||
|
||||
# Setup symlinks to config files
|
||||
function symlink {
|
||||
if [ ! -f ~/.tmux.conf ]; then ln -s $dotfiles/tmux.conf ~/.tmux.conf; fi
|
||||
if [ ! -f ~/.zshrc ]; then ln -s $dotfiles/zshrc ~/.zshrc; fi
|
||||
if [ ! -f ~/.vimrc ]; then ln -s $dotfiles/vimrc ~/.vimrc; fi
|
||||
if [ ! -f ~/.yaourtrc ]; then ln -s $dotfiles/yaourtrc ~/.yaourtrc; fi
|
||||
if [ ! -f ~/.gitignore ]; then ln -s $dotfiles/.gitignore ~/.gitignore; fi
|
||||
if [ ! -d ~/.vim ]; then ln -s $dotfiles/vim ~/.vim; fi
|
||||
if [ ! -d ~/.local/bin/scripts ]; then ln -s $dotfiles/scripts ~/.local/bin/scripts; fi
|
||||
echo "All symlink have been made"
|
||||
}
|
||||
|
||||
dotfiles="$1"
|
||||
if [ -z "$1" ]; then show_help; exit 0; fi;
|
||||
if [ ! -d $1 ]; then show_help; exit 0; fi;
|
||||
|
||||
cd $dotfiles
|
||||
|
||||
# Ask and execute the install script
|
||||
ask "Update submodules" submodule
|
||||
ask "Apply patches" patch
|
||||
ask "Compile YCM" ycm
|
||||
ask "Install tmux-vim-select-pane" tvpane
|
||||
ask "Install fonts" fonts
|
||||
# ask "Install gnome-terminal theme"
|
||||
ask "Make symlinks" symlink
|
6
nvim/.config/nvim/.netrwhist
Normal file
6
nvim/.config/nvim/.netrwhist
Normal file
|
@ -0,0 +1,6 @@
|
|||
let g:netrw_dirhistmax =10
|
||||
let g:netrw_dirhist_cnt =4
|
||||
let g:netrw_dirhist_1='/home/tim/.nvim'
|
||||
let g:netrw_dirhist_2='/home/tim/.dotfiles/nvim/.nvim'
|
||||
let g:netrw_dirhist_3='/home/tim/Projects/cpp/arena'
|
||||
let g:netrw_dirhist_4='/home/tim/Projects/cpp/stdany'
|
2504
nvim/.config/nvim/autoload/plug.vim
Normal file
2504
nvim/.config/nvim/autoload/plug.vim
Normal file
File diff suppressed because it is too large
Load Diff
2458
nvim/.config/nvim/autoload/plug.vim.old
Normal file
2458
nvim/.config/nvim/autoload/plug.vim.old
Normal file
File diff suppressed because it is too large
Load Diff
22
nvim/.config/nvim/compiler/gradle.vim
Normal file
22
nvim/.config/nvim/compiler/gradle.vim
Normal file
|
@ -0,0 +1,22 @@
|
|||
" Vim Compiler File
|
||||
" Compiler: gradle
|
||||
|
||||
if exists("current_compiler")
|
||||
finish
|
||||
endif
|
||||
let current_compiler = "gradle"
|
||||
|
||||
if exists(":CompilerSet") != 2 " older Vim always used :setlocal
|
||||
command -nargs=* CompilerSet setlocal <args>
|
||||
endif
|
||||
|
||||
CompilerSet makeprg=gradle
|
||||
|
||||
CompilerSet errorformat=
|
||||
\%-G:%.%\\+,
|
||||
\%E%f:\ %\\d%\\+:\ %m\ @\ line\ %l\\,\ column\ %c.,%-C%.%#,%Z%p^,
|
||||
\%E%>%f:\ %\\d%\\+:\ %m,%C\ @\ line\ %l\\,\ column\ %c.,%-C%.%#,%Z%p^,
|
||||
\%-G\\s%#,
|
||||
\%-GBUILD\ SUCCESSFUL#,
|
||||
\%-GTotal\ \time:\ %.%#
|
||||
|
204
nvim/.config/nvim/init.vim
Normal file
204
nvim/.config/nvim/init.vim
Normal file
|
@ -0,0 +1,204 @@
|
|||
call plug#begin('~/.dotfiles/nvim/.config/nvim/plugged')
|
||||
" Plug 'kien/ctrlp.vim'
|
||||
" Plug 'FelikZ/ctrlp-py-matcher'
|
||||
Plug 'Raimondi/delimitMate'
|
||||
Plug 'morhetz/gruvbox'
|
||||
" Plug 'Yggdroot/indentLine'
|
||||
Plug 'scrooloose/nerdtree'
|
||||
Plug 'godlygeek/tabular'
|
||||
" Plug 'majutsushi/tagbar'
|
||||
Plug 'tomtom/tcomment_vim'
|
||||
Plug 'bling/vim-airline'
|
||||
Plug 'tommcdo/vim-exchange'
|
||||
Plug 'tpope/vim-surround'
|
||||
Plug 'christoomey/vim-tmux-navigator'
|
||||
Plug 'MarcWeber/vim-addon-mw-utils'
|
||||
Plug 'tomtom/tlib_vim'
|
||||
Plug 'SirVer/ultisnips'
|
||||
Plug 'honza/vim-snippets'
|
||||
" Plug 'beyondmarc/glsl.vim'
|
||||
Plug 'tpope/vim-dispatch'
|
||||
" Plug 'freitass/todo.txt-vim'
|
||||
Plug 'tpope/vim-unimpaired'
|
||||
Plug 'milkypostman/vim-togglelist'
|
||||
Plug 'Valloric/YouCompleteMe'
|
||||
" Plug 'Shougo/deoplete.nvim'
|
||||
" Plug 'vim-scripts/LanguageTool'
|
||||
" Plug 'pangloss/vim-javascript'
|
||||
Plug 'moll/vim-bbye'
|
||||
Plug 'tpope/vim-fugitive'
|
||||
Plug 'tikhomirov/vim-glsl'
|
||||
Plug 'rust-lang/rust.vim'
|
||||
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
|
||||
Plug 'digitaltoad/vim-pug'
|
||||
call plug#end()
|
||||
|
||||
silent! so .vimlocal
|
||||
|
||||
" let g:ctrlp_custom_ignore = '\v[\/](bin|build|docs)$'
|
||||
map <silent> <C-P> :call fzf#run(fzf#wrap('custom', {'source': 'ag -g ""'}, 0))<cr>
|
||||
let g:fzf_layout = { 'down': '~20%' }
|
||||
let g:fzf_colors =
|
||||
\ { 'fg': ['fg', 'Normal'],
|
||||
\ 'bg': ['bg', 'Normal'],
|
||||
\ 'hl': ['fg', 'Comment'],
|
||||
\ 'fg+': ['fg', 'CursorLine', 'CursorColumn', 'Normal'],
|
||||
\ 'bg+': ['bg', 'CursorLine', 'CursorColumn'],
|
||||
\ 'hl+': ['fg', 'Statement'],
|
||||
\ 'info': ['fg', 'PreProc'],
|
||||
\ 'border': ['fg', 'Ignore'],
|
||||
\ 'prompt': ['fg', 'Conditional'],
|
||||
\ 'pointer': ['fg', 'Exception'],
|
||||
\ 'marker': ['fg', 'Keyword'],
|
||||
\ 'spinner': ['fg', 'Label'],
|
||||
\ 'header': ['fg', 'Comment'] }
|
||||
|
||||
|
||||
let delimitMate_expand_cr = 1
|
||||
|
||||
set mouse=a
|
||||
|
||||
colorscheme gruvbox
|
||||
set t_Co=256
|
||||
set t_ZH=[3m
|
||||
set t_ZR=[23m
|
||||
set background=dark
|
||||
|
||||
set list lcs=tab:\│\
|
||||
|
||||
map <silent> <F2> :NERDTreeToggle<cr>
|
||||
|
||||
" map <silent> <M-2> :TagbarToggle<cr>
|
||||
" map <silent> <F3> :TagbarToggle<cr>
|
||||
|
||||
let g:airline_powerline_fonts = 1
|
||||
let g:airline#extensions#tabline#enabled = 1
|
||||
let g:airline_theme='gruvbox'
|
||||
|
||||
map <M-h> :TmuxNavigateLeft<cr>
|
||||
map <M-j> :TmuxNavigateDown<cr>
|
||||
map <M-k> :TmuxNavigateUp<cr>
|
||||
map <M-l> :TmuxNavigateRight<cr>
|
||||
|
||||
" set omnifunc=syntaxcomplete#Complete " override built-in C omnicomplete with C++ OmniCppComplete plugin
|
||||
" let OmniCpp_GlobalScopeSearch = 1
|
||||
" let OmniCpp_DisplayMode = 1
|
||||
" let OmniCpp_ShowScopeInAbbr = 0 "do not show namespace in pop-up
|
||||
" let OmniCpp_ShowPrototypeInAbbr = 1 "show prototype in pop-up
|
||||
" let OmniCpp_ShowAccess = 1 "show access in pop-up
|
||||
" let OmniCpp_SelectFirstItem = 1 "select first item in pop-up
|
||||
|
||||
set completeopt=menuone,menu,preview
|
||||
let g:ycm_confirm_extra_conf = 0
|
||||
let g:ycm_error_symbol = ''
|
||||
let g:ycm_warning_symbol = ''
|
||||
|
||||
let g:UltiSnipsExpandTrigger="<c-s>"
|
||||
|
||||
syntax on
|
||||
filetype plugin indent on
|
||||
|
||||
au BufRead,BufNewFile *.lang setfiletype lang
|
||||
|
||||
set smartindent
|
||||
set number
|
||||
set relativenumber
|
||||
set laststatus=2
|
||||
set softtabstop=4
|
||||
set tabstop=4
|
||||
set shiftwidth=4
|
||||
set noexpandtab
|
||||
set completeopt-=preview
|
||||
|
||||
" I do not remember what this is for
|
||||
" set cinkeys=0{,0},0),:,!^F,o,O,e
|
||||
|
||||
let g:languagetool_jar='$HOME/.local/bin/LanguageTool-3.2/languagetool-commandline.jar'
|
||||
let g:languagetool_lang="nl"
|
||||
|
||||
map <silent> <tab> :bn<cr>
|
||||
map <silent> <S-tab> :bp<cr>
|
||||
|
||||
map <S-J> 10j
|
||||
map <S-K> 10k
|
||||
|
||||
map <silent> <C-B> :Bdelete<cr>
|
||||
|
||||
" autocmd FileType go let &makeprg="go run %:p:h/*.go"
|
||||
" autocmd FileType go map <F10> :Make<cr>
|
||||
"
|
||||
" autocmd FileType tex map <F9> :Dispatch arara %<cr>
|
||||
"
|
||||
" autocmd FileType cpp map <F9> :Make<cr>
|
||||
" autocmd FileType cpp map <S-F9> :Make clean all<cr>
|
||||
|
||||
" if filereadable(expand("%:p:h")."/CMake/default/Makefile")
|
||||
" let &makeprg="cd CMake/default && make"
|
||||
" autocmd FileType cpp map <F10> :Make debug<cr>
|
||||
" endif
|
||||
" if filereadable(expand("%:p:h")."/build/cmake/Makefile")
|
||||
" function KeyBind(platform)
|
||||
" let &makeprg="cd cmake/configs/".a:platform." && make"
|
||||
" execute 'autocmd FileType cpp map <F10> :Start cd cmake/configs/'.a:platform.' && ./run-engine.sh; echo "\nPress [enter] to close" && read<cr>'
|
||||
" execute 'autocmd FileType cpp map <S-F10> :Start cd cmake/configs/'.a:platform.' && ./debug-engine.sh<cr>'
|
||||
" endfunction
|
||||
" call KeyBind("linux")
|
||||
" endif
|
||||
|
||||
map <silent> <F4> :call ToggleQuickfixList()<cr>
|
||||
" map <silent> <F7> :grep -F TODO -R ./src/**/*.cpp ./include/**/*.h<cr> :cw<cr>
|
||||
" map <silent> <F8> :grep -F NOTE -R ./src/**/*.cpp ./include/**/*.h<cr> :cw<cr>
|
||||
|
||||
function! NeatFoldText()
|
||||
let line = ' ' . substitute(getline(v:foldstart), '^\s*"\?\s*\|\s*"\?\s*{{' . '{\d*\s*', '', 'g') . ' '
|
||||
let lines_count = v:foldend - v:foldstart + 1
|
||||
let lines_count_text = '| ' . printf("%10s", lines_count . ' lines') . ' |'
|
||||
let foldchar = matchstr(&fillchars, 'fold:\zs.')
|
||||
let foldtextstart = strpart('+' . repeat(foldchar, v:foldlevel*2) . line, 0, (winwidth(0)*2)/3)
|
||||
let foldtextend = lines_count_text . repeat(foldchar, 8)
|
||||
let foldtextlength = strlen(substitute(foldtextstart . foldtextend, '.', 'x', 'g')) + &foldcolumn
|
||||
return foldtextstart . repeat(foldchar, winwidth(0)-foldtextlength) . foldtextend
|
||||
endfunction
|
||||
|
||||
function! MyFoldText() " {{{
|
||||
let line = getline(v:foldstart)
|
||||
|
||||
let nucolwidth = &fdc + &number * &numberwidth
|
||||
let windowwidth = winwidth(0) - nucolwidth - 3
|
||||
let foldedlinecount = v:foldend - v:foldstart
|
||||
|
||||
" expand tabs into spaces
|
||||
let onetab = strpart(' ', 0, &tabstop)
|
||||
let line = substitute(line, '\t', onetab, 'g')
|
||||
|
||||
let line = strpart(line, 0, windowwidth - 2 -len(foldedlinecount))
|
||||
let fillcharcount = windowwidth - len(line) - len(foldedlinecount)
|
||||
return line . '…' . repeat(" ",fillcharcount) . foldedlinecount . '…' . ' '
|
||||
endfunction " }}}
|
||||
|
||||
fu! CustomFoldText()
|
||||
"get first non-blank line
|
||||
let fs = v:foldstart
|
||||
while getline(fs) =~ '^\s*$' | let fs = nextnonblank(fs + 1)
|
||||
endwhile
|
||||
if fs > v:foldend
|
||||
let line = getline(v:foldstart)
|
||||
else
|
||||
let line = substitute(getline(fs), '\t', repeat(' ', &tabstop), 'g')
|
||||
endif
|
||||
|
||||
let w = winwidth(0) - &foldcolumn - (&number ? 8 : 0)
|
||||
let foldSize = 1 + v:foldend - v:foldstart
|
||||
let foldSizeStr = " " . foldSize . " lines "
|
||||
let foldLevelStr = repeat("+--", v:foldlevel)
|
||||
let lineCount = line("$")
|
||||
let foldPercentage = printf("[%.1f", (foldSize*1.0)/lineCount*100) . "%] "
|
||||
let expansionString = repeat(".", w - strwidth(foldSizeStr.line.foldLevelStr.foldPercentage))
|
||||
return line . expansionString . foldSizeStr . foldPercentage . foldLevelStr
|
||||
endf
|
||||
|
||||
" set foldtext=NeatFoldText()
|
||||
set foldtext=CustomFoldText()
|
||||
set foldcolumn=1
|
||||
au BufRead *.cpp,*.go,*.js setlocal foldmethod=syntax
|
||||
au BufRead *.cpp,*go,*.js setlocal foldnestmax=1
|
1
nvim/.config/nvim/plugged/LanguageTool
Submodule
1
nvim/.config/nvim/plugged/LanguageTool
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit e4f234b8a06e2d855e3ddcee1e9d81d203830c63
|
1
nvim/.config/nvim/plugged/YouCompleteMe
Submodule
1
nvim/.config/nvim/plugged/YouCompleteMe
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit d183f11fa72471ed6c4df595b4047dfff98abf75
|
1
nvim/.config/nvim/plugged/ctrlp-py-matcher
Submodule
1
nvim/.config/nvim/plugged/ctrlp-py-matcher
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit a0710a4937ab9dc10bc0a8b56b41fcc88534147c
|
1
nvim/.config/nvim/plugged/ctrlp.vim
Submodule
1
nvim/.config/nvim/plugged/ctrlp.vim
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 564176f01d7f3f7f8ab452ff4e1f5314de7b0981
|
1
nvim/.config/nvim/plugged/delimitMate
Submodule
1
nvim/.config/nvim/plugged/delimitMate
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 728b57a6564c1d2bdfb9b9e0f2f8c5ba3d7e0c5c
|
1
nvim/.config/nvim/plugged/deoplete.nvim
Submodule
1
nvim/.config/nvim/plugged/deoplete.nvim
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 816bea3a9a0c5a1cc53488256d452edea04cb70a
|
1
nvim/.config/nvim/plugged/glsl.vim
Submodule
1
nvim/.config/nvim/plugged/glsl.vim
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 245c52580408e8eaae178ce11735498034c0dab7
|
1
nvim/.config/nvim/plugged/gruvbox
Submodule
1
nvim/.config/nvim/plugged/gruvbox
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 16504d394e145e0372d2491e02769d241350399a
|
1
nvim/.config/nvim/plugged/indentLine
Submodule
1
nvim/.config/nvim/plugged/indentLine
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 86b9824b89cf52d4b748ea2a27885607c98c881a
|
1
nvim/.config/nvim/plugged/nerdtree
Submodule
1
nvim/.config/nvim/plugged/nerdtree
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 68572ef46143c5c7d420a6ec86f1ec4595765ce5
|
1
nvim/.config/nvim/plugged/rust.vim
Submodule
1
nvim/.config/nvim/plugged/rust.vim
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 8e75da9834abb22f8d7ece3f4ca4324a14fa18a6
|
1
nvim/.config/nvim/plugged/tabular
Submodule
1
nvim/.config/nvim/plugged/tabular
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 00e1e7fcdbc6d753e0bc8043e0d2546fa81bf367
|
1
nvim/.config/nvim/plugged/tagbar
Submodule
1
nvim/.config/nvim/plugged/tagbar
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 7b36c46d17d57db34fdb0adac9ba6382d0bb5e66
|
1
nvim/.config/nvim/plugged/tcomment_vim
Submodule
1
nvim/.config/nvim/plugged/tcomment_vim
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit a48da32365498162579bc6384584596aa7f36b1d
|
1
nvim/.config/nvim/plugged/tlib_vim
Submodule
1
nvim/.config/nvim/plugged/tlib_vim
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit c96db6151fde9d06a8fed71b7df05c6dbb3f14fe
|
1
nvim/.config/nvim/plugged/todo.txt-vim
Submodule
1
nvim/.config/nvim/plugged/todo.txt-vim
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 1e3a5e58aeb4aa508ce2e36bcb5230452812c4c3
|
1
nvim/.config/nvim/plugged/ultisnips
Submodule
1
nvim/.config/nvim/plugged/ultisnips
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 423f264e753cec260b4f14455126e6db7ba429af
|
1
nvim/.config/nvim/plugged/vim-addon-mw-utils
Submodule
1
nvim/.config/nvim/plugged/vim-addon-mw-utils
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 0c5612fa31ee434ba055e21c76f456244b3b5109
|
1
nvim/.config/nvim/plugged/vim-airline
Submodule
1
nvim/.config/nvim/plugged/vim-airline
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit c2ffb8b3ec114301795036f7bf22995746d2acaf
|
1
nvim/.config/nvim/plugged/vim-bbye
Submodule
1
nvim/.config/nvim/plugged/vim-bbye
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit a018cbc1ba63b1a8b86b7c468645e7642637ec4a
|
1
nvim/.config/nvim/plugged/vim-cpp
Submodule
1
nvim/.config/nvim/plugged/vim-cpp
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 83469fd71b0b1a8b2e20762814fcc24c7625e2d0
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 63072927d28348864a0372f5d091ff9585535ff3
|
1
nvim/.config/nvim/plugged/vim-dispatch
Submodule
1
nvim/.config/nvim/plugged/vim-dispatch
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit c5b1bbe1662d76c0aa9f6d325c3fb1b8db62ba02
|
1
nvim/.config/nvim/plugged/vim-exchange
Submodule
1
nvim/.config/nvim/plugged/vim-exchange
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 05d82b87711c6c8b9b7389bfb91c24bc4f62aa87
|
1
nvim/.config/nvim/plugged/vim-fugitive
Submodule
1
nvim/.config/nvim/plugged/vim-fugitive
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit f3ccb0c12ee4985b8808f83059830a24cc92821c
|
1
nvim/.config/nvim/plugged/vim-glsl
Submodule
1
nvim/.config/nvim/plugged/vim-glsl
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 6ea4e1983b18cf440c8f800a3e94b57338a3e99f
|
1
nvim/.config/nvim/plugged/vim-javascript
Submodule
1
nvim/.config/nvim/plugged/vim-javascript
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 1d8c2677d26d6b3950b90dc1636e63334c8efc3b
|
1
nvim/.config/nvim/plugged/vim-javascript-syntax
Submodule
1
nvim/.config/nvim/plugged/vim-javascript-syntax
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 9e019fccd738ba73713268a327ac3765646a4edd
|
1
nvim/.config/nvim/plugged/vim-matchparenalways
Submodule
1
nvim/.config/nvim/plugged/vim-matchparenalways
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit d2f514ded8061ccb91230f1c096c63bda974c8a1
|
1
nvim/.config/nvim/plugged/vim-pug
Submodule
1
nvim/.config/nvim/plugged/vim-pug
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit ddc5592f8c36bf4bd915c16b38b8c76292c2b975
|
1
nvim/.config/nvim/plugged/vim-snippets
Submodule
1
nvim/.config/nvim/plugged/vim-snippets
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 71d91aec383ad3b72d8830db5d50d9bf4a8563f6
|
1
nvim/.config/nvim/plugged/vim-surround
Submodule
1
nvim/.config/nvim/plugged/vim-surround
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit e49d6c2459e0f5569ff2d533b4df995dd7f98313
|
1
nvim/.config/nvim/plugged/vim-tmux-navigator
Submodule
1
nvim/.config/nvim/plugged/vim-tmux-navigator
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit d724094e7128acd7375cc758008f1e1688130877
|
1
nvim/.config/nvim/plugged/vim-togglelist
Submodule
1
nvim/.config/nvim/plugged/vim-togglelist
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit cafedc49860950200f28f2e1d95ab6a87b79d113
|
1
nvim/.config/nvim/plugged/vim-unimpaired
Submodule
1
nvim/.config/nvim/plugged/vim-unimpaired
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 1ac95a86c0facb1be8abec924cf79fd642cec386
|
1
nvim/.config/nvim/plugged/vim-z80
Submodule
1
nvim/.config/nvim/plugged/vim-z80
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 3b9e2b28582fbad167100e950602ccbc67cbdf39
|
13
nvim/.config/nvim/snippets/cpp.snippets
Normal file
13
nvim/.config/nvim/snippets/cpp.snippets
Normal file
|
@ -0,0 +1,13 @@
|
|||
#header
|
||||
snippet header
|
||||
#ifndef ${1:`toupper(vim_snippets#Filename('$1_H', 'UNTITLED_H'))`}
|
||||
#define $1
|
||||
|
||||
${0}
|
||||
|
||||
#endif
|
||||
|
||||
snippet incl
|
||||
#include "standard.h"
|
||||
|
||||
${0}
|
491
nvim/.config/nvim/syntax/c.vim
Normal file
491
nvim/.config/nvim/syntax/c.vim
Normal file
|
@ -0,0 +1,491 @@
|
|||
" Vim syntax file
|
||||
" Language: C
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2016 Nov 17
|
||||
|
||||
" Quit when a (custom) syntax file was already loaded
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
let s:ft = matchstr(&ft, '^\([^.]\)\+')
|
||||
|
||||
" A bunch of useful C keywords
|
||||
syn keyword cStatement goto break return continue asm
|
||||
syn keyword cLabel case default
|
||||
syn keyword cConditional if else switch
|
||||
syn keyword cRepeat while for do
|
||||
|
||||
syn keyword cTodo contained TODO FIXME XXX
|
||||
syn match cTodo contained "@todo"
|
||||
syn match cTodo contained "@note"
|
||||
|
||||
" It's easy to accidentally add a space after a backslash that was intended
|
||||
" for line continuation. Some compilers allow it, which makes it
|
||||
" unpredictable and should be avoided.
|
||||
syn match cBadContinuation contained "\\\s\+$"
|
||||
|
||||
" cCommentGroup allows adding matches for special things in comments
|
||||
syn cluster cCommentGroup contains=cTodo,cBadContinuation
|
||||
|
||||
" String and Character constants
|
||||
" Highlight special characters (those which have a backslash) differently
|
||||
syn match cSpecial display contained "\\\(x\x\+\|\o\{1,3}\|.\|$\)"
|
||||
if !exists("c_no_utf")
|
||||
syn match cSpecial display contained "\\\(u\x\{4}\|U\x\{8}\)"
|
||||
endif
|
||||
|
||||
if !exists("c_no_cformat")
|
||||
" Highlight % items in strings.
|
||||
if !exists("c_no_c99") " ISO C99
|
||||
syn match cFormat display "%\(\d\+\$\)\=[-+' #0*]*\(\d*\|\*\|\*\d\+\$\)\(\.\(\d*\|\*\|\*\d\+\$\)\)\=\([hlLjzt]\|ll\|hh\)\=\([aAbdiuoxXDOUfFeEgGcCsSpn]\|\[\^\=.[^]]*\]\)" contained
|
||||
else
|
||||
syn match cFormat display "%\(\d\+\$\)\=[-+' #0*]*\(\d*\|\*\|\*\d\+\$\)\(\.\(\d*\|\*\|\*\d\+\$\)\)\=\([hlL]\|ll\)\=\([bdiuoxXDOUfeEgGcCsSpn]\|\[\^\=.[^]]*\]\)" contained
|
||||
endif
|
||||
syn match cFormat display "%%" contained
|
||||
endif
|
||||
|
||||
" cCppString: same as cString, but ends at end of line
|
||||
if s:ft ==# "cpp" && !exists("cpp_no_cpp11") && !exists("c_no_cformat")
|
||||
" ISO C++11
|
||||
syn region cString start=+\(L\|u\|u8\|U\|R\|LR\|u8R\|uR\|UR\)\="+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,cFormat,@Spell extend
|
||||
syn region cCppString start=+\(L\|u\|u8\|U\|R\|LR\|u8R\|uR\|UR\)\="+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end='$' contains=cSpecial,cFormat,@Spell
|
||||
elseif s:ft ==# "c" && !exists("c_no_c11") && !exists("c_no_cformat")
|
||||
" ISO C99
|
||||
syn region cString start=+\%(L\|U\|u8\)\="+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,cFormat,@Spell extend
|
||||
syn region cCppString start=+\%(L\|U\|u8\)\="+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end='$' contains=cSpecial,cFormat,@Spell
|
||||
else
|
||||
" older C or C++
|
||||
syn match cFormat display "%%" contained
|
||||
syn region cString start=+L\="+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,cFormat,@Spell extend
|
||||
syn region cCppString start=+L\="+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end='$' contains=cSpecial,cFormat,@Spell
|
||||
endif
|
||||
|
||||
syn region cCppSkip contained start="^\s*\(%:\|#\)\s*\(if\>\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\(%:\|#\)\s*endif\>" contains=cSpaceError,cCppSkip
|
||||
|
||||
syn cluster cStringGroup contains=cCppString,cCppSkip
|
||||
|
||||
syn match cCharacter "L\='[^\\]'"
|
||||
syn match cCharacter "L'[^']*'" contains=cSpecial
|
||||
if exists("c_gnu")
|
||||
syn match cSpecialError "L\='\\[^'\"?\\abefnrtv]'"
|
||||
syn match cSpecialCharacter "L\='\\['\"?\\abefnrtv]'"
|
||||
else
|
||||
syn match cSpecialError "L\='\\[^'\"?\\abfnrtv]'"
|
||||
syn match cSpecialCharacter "L\='\\['\"?\\abfnrtv]'"
|
||||
endif
|
||||
syn match cSpecialCharacter display "L\='\\\o\{1,3}'"
|
||||
syn match cSpecialCharacter display "'\\x\x\{1,2}'"
|
||||
syn match cSpecialCharacter display "L'\\x\x\+'"
|
||||
|
||||
if (s:ft ==# "c" && !exists("c_no_c11")) || (s:ft ==# "cpp" && !exists("cpp_no_cpp11"))
|
||||
" ISO C11 or ISO C++ 11
|
||||
if exists("c_no_cformat")
|
||||
syn region cString start=+\%(U\|u8\=\)"+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,@Spell extend
|
||||
else
|
||||
syn region cString start=+\%(U\|u8\=\)"+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,cFormat,@Spell extend
|
||||
endif
|
||||
syn match cCharacter "[Uu]'[^\\]'"
|
||||
syn match cCharacter "[Uu]'[^']*'" contains=cSpecial
|
||||
if exists("c_gnu")
|
||||
syn match cSpecialError "[Uu]'\\[^'\"?\\abefnrtv]'"
|
||||
syn match cSpecialCharacter "[Uu]'\\['\"?\\abefnrtv]'"
|
||||
else
|
||||
syn match cSpecialError "[Uu]'\\[^'\"?\\abfnrtv]'"
|
||||
syn match cSpecialCharacter "[Uu]'\\['\"?\\abfnrtv]'"
|
||||
endif
|
||||
syn match cSpecialCharacter display "[Uu]'\\\o\{1,3}'"
|
||||
syn match cSpecialCharacter display "[Uu]'\\x\x\+'"
|
||||
endif
|
||||
|
||||
"when wanted, highlight trailing white space
|
||||
if exists("c_space_errors")
|
||||
if !exists("c_no_trail_space_error")
|
||||
syn match cSpaceError display excludenl "\s\+$"
|
||||
endif
|
||||
if !exists("c_no_tab_space_error")
|
||||
syn match cSpaceError display " \+\t"me=e-1
|
||||
endif
|
||||
endif
|
||||
|
||||
" This should be before cErrInParen to avoid problems with #define ({ xxx })
|
||||
if exists("c_curly_error")
|
||||
syn match cCurlyError "}"
|
||||
syn region cBlock start="{" end="}" contains=ALLBUT,cBadBlock,cCurlyError,@cParenGroup,cErrInParen,cCppParen,cErrInBracket,cCppBracket,@cStringGroup,@Spell fold
|
||||
else
|
||||
syn region cBlock start="{" end="}" transparent fold
|
||||
endif
|
||||
|
||||
" Catch errors caused by wrong parenthesis and brackets.
|
||||
" Also accept <% for {, %> for }, <: for [ and :> for ] (C99)
|
||||
" But avoid matching <::.
|
||||
syn cluster cParenGroup contains=cParenError,cIncluded,cSpecial,cCommentSkip,cCommentString,cComment2String,@cCommentGroup,cCommentStartError,cUserLabel,cBitField,cOctalZero,@cCppOutInGroup,cFormat,cNumber,cFloat,cOctal,cOctalError,cNumbersCom
|
||||
if exists("c_no_curly_error")
|
||||
if s:ft ==# 'cpp' && !exists("cpp_no_cpp11")
|
||||
syn region cParen transparent start='(' end=')' contains=ALLBUT,@cParenGroup,cCppParen,@cStringGroup,@Spell
|
||||
" cCppParen: same as cParen but ends at end-of-line; used in cDefine
|
||||
syn region cCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cParen,cString,@Spell
|
||||
syn match cParenError display ")"
|
||||
syn match cErrInParen display contained "^^<%\|^%>"
|
||||
else
|
||||
syn region cParen transparent start='(' end=')' end='}'me=s-1 contains=ALLBUT,cBlock,@cParenGroup,cCppParen,@cStringGroup,@Spell
|
||||
" cCppParen: same as cParen but ends at end-of-line; used in cDefine
|
||||
syn region cCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cParen,cString,@Spell
|
||||
syn match cParenError display ")"
|
||||
syn match cErrInParen display contained "^[{}]\|^<%\|^%>"
|
||||
endif
|
||||
elseif exists("c_no_bracket_error")
|
||||
if s:ft ==# 'cpp' && !exists("cpp_no_cpp11")
|
||||
syn region cParen transparent start='(' end=')' contains=ALLBUT,@cParenGroup,cCppParen,@cStringGroup,@Spell
|
||||
" cCppParen: same as cParen but ends at end-of-line; used in cDefine
|
||||
syn region cCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cParen,cString,@Spell
|
||||
syn match cParenError display ")"
|
||||
syn match cErrInParen display contained "<%\|%>"
|
||||
else
|
||||
syn region cParen transparent start='(' end=')' end='}'me=s-1 contains=ALLBUT,cBlock,@cParenGroup,cCppParen,@cStringGroup,@Spell
|
||||
" cCppParen: same as cParen but ends at end-of-line; used in cDefine
|
||||
syn region cCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cParen,cString,@Spell
|
||||
syn match cParenError display ")"
|
||||
syn match cErrInParen display contained "[{}]\|<%\|%>"
|
||||
endif
|
||||
else
|
||||
if s:ft ==# 'cpp' && !exists("cpp_no_cpp11")
|
||||
syn region cParen transparent start='(' end=')' contains=ALLBUT,@cParenGroup,cCppParen,cErrInBracket,cCppBracket,@cStringGroup,@Spell
|
||||
" cCppParen: same as cParen but ends at end-of-line; used in cDefine
|
||||
syn region cCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cErrInBracket,cParen,cBracket,cString,@Spell
|
||||
syn match cParenError display "[\])]"
|
||||
syn match cErrInParen display contained "<%\|%>"
|
||||
syn region cBracket transparent start='\[\|<::\@!' end=']\|:>' contains=ALLBUT,@cParenGroup,cErrInParen,cCppParen,cCppBracket,@cStringGroup,@Spell
|
||||
else
|
||||
syn region cParen transparent start='(' end=')' end='}'me=s-1 contains=ALLBUT,cBlock,@cParenGroup,cCppParen,cErrInBracket,cCppBracket,@cStringGroup,@Spell
|
||||
" cCppParen: same as cParen but ends at end-of-line; used in cDefine
|
||||
syn region cCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cErrInBracket,cParen,cBracket,cString,@Spell
|
||||
syn match cParenError display "[\])]"
|
||||
syn match cErrInParen display contained "[\]{}]\|<%\|%>"
|
||||
syn region cBracket transparent start='\[\|<::\@!' end=']\|:>' end='}'me=s-1 contains=ALLBUT,cBlock,@cParenGroup,cErrInParen,cCppParen,cCppBracket,@cStringGroup,@Spell
|
||||
endif
|
||||
" cCppBracket: same as cParen but ends at end-of-line; used in cDefine
|
||||
syn region cCppBracket transparent start='\[\|<::\@!' skip='\\$' excludenl end=']\|:>' end='$' contained contains=ALLBUT,@cParenGroup,cErrInParen,cParen,cBracket,cString,@Spell
|
||||
syn match cErrInBracket display contained "[);{}]\|<%\|%>"
|
||||
endif
|
||||
|
||||
if s:ft ==# 'c' || exists("cpp_no_cpp11")
|
||||
syn region cBadBlock keepend start="{" end="}" contained containedin=cParen,cBracket,cBadBlock transparent fold
|
||||
endif
|
||||
|
||||
"integer number, or floating point number without a dot and with "f".
|
||||
syn case ignore
|
||||
syn match cNumbers display transparent "\<\d\|\.\d" contains=cNumber,cFloat,cOctalError,cOctal
|
||||
" Same, but without octal error (for comments)
|
||||
syn match cNumbersCom display contained transparent "\<\d\|\.\d" contains=cNumber,cFloat,cOctal
|
||||
syn match cNumber display contained "\d\+\(u\=l\{0,2}\|ll\=u\)\>"
|
||||
"hex number
|
||||
syn match cNumber display contained "0x\x\+\(u\=l\{0,2}\|ll\=u\)\>"
|
||||
" Flag the first zero of an octal number as something special
|
||||
syn match cOctal display contained "0\o\+\(u\=l\{0,2}\|ll\=u\)\>" contains=cOctalZero
|
||||
syn match cOctalZero display contained "\<0"
|
||||
syn match cFloat display contained "\d\+f"
|
||||
"floating point number, with dot, optional exponent
|
||||
syn match cFloat display contained "\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\="
|
||||
"floating point number, starting with a dot, optional exponent
|
||||
syn match cFloat display contained "\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>"
|
||||
"floating point number, without dot, with exponent
|
||||
syn match cFloat display contained "\d\+e[-+]\=\d\+[fl]\=\>"
|
||||
if !exists("c_no_c99")
|
||||
"hexadecimal floating point number, optional leading digits, with dot, with exponent
|
||||
syn match cFloat display contained "0x\x*\.\x\+p[-+]\=\d\+[fl]\=\>"
|
||||
"hexadecimal floating point number, with leading digits, optional dot, with exponent
|
||||
syn match cFloat display contained "0x\x\+\.\=p[-+]\=\d\+[fl]\=\>"
|
||||
endif
|
||||
|
||||
" flag an octal number with wrong digits
|
||||
syn match cOctalError display contained "0\o*[89]\d*"
|
||||
syn case match
|
||||
|
||||
if exists("c_comment_strings")
|
||||
" A comment can contain cString, cCharacter and cNumber.
|
||||
" But a "*/" inside a cString in a cComment DOES end the comment! So we
|
||||
" need to use a special type of cString: cCommentString, which also ends on
|
||||
" "*/", and sees a "*" at the start of the line as comment again.
|
||||
" Unfortunately this doesn't very well work for // type of comments :-(
|
||||
syn match cCommentSkip contained "^\s*\*\($\|\s\+\)"
|
||||
syn region cCommentString contained start=+L\=\\\@<!"+ skip=+\\\\\|\\"+ end=+"+ end=+\*/+me=s-1 contains=cSpecial,cCommentSkip
|
||||
syn region cComment2String contained start=+L\=\\\@<!"+ skip=+\\\\\|\\"+ end=+"+ end="$" contains=cSpecial
|
||||
syn region cCommentL start="//" skip="\\$" end="$" keepend contains=@cCommentGroup,cComment2String,cCharacter,cNumbersCom,cSpaceError,@Spell
|
||||
if exists("c_no_comment_fold")
|
||||
" Use "extend" here to have preprocessor lines not terminate halfway a
|
||||
" comment.
|
||||
syn region cComment matchgroup=cCommentStart start="/\*" end="\*/" contains=@cCommentGroup,cCommentStartError,cCommentString,cCharacter,cNumbersCom,cSpaceError,@Spell extend
|
||||
else
|
||||
syn region cComment matchgroup=cCommentStart start="/\*" end="\*/" contains=@cCommentGroup,cCommentStartError,cCommentString,cCharacter,cNumbersCom,cSpaceError,@Spell fold extend
|
||||
endif
|
||||
else
|
||||
syn region cCommentL start="//" skip="\\$" end="$" keepend contains=@cCommentGroup,cSpaceError,@Spell
|
||||
if exists("c_no_comment_fold")
|
||||
syn region cComment matchgroup=cCommentStart start="/\*" end="\*/" contains=@cCommentGroup,cCommentStartError,cSpaceError,@Spell extend
|
||||
else
|
||||
syn region cComment matchgroup=cCommentStart start="/\*" end="\*/" contains=@cCommentGroup,cCommentStartError,cSpaceError,@Spell fold extend
|
||||
endif
|
||||
endif
|
||||
" keep a // comment separately, it terminates a preproc. conditional
|
||||
syn match cCommentError display "\*/"
|
||||
syn match cCommentStartError display "/\*"me=e-1 contained
|
||||
|
||||
syn keyword cOperator sizeof
|
||||
if exists("c_gnu")
|
||||
syn keyword cStatement __asm__
|
||||
syn keyword cOperator typeof __real__ __imag__
|
||||
endif
|
||||
syn keyword cType int long short char void
|
||||
syn keyword cType signed unsigned float double
|
||||
if !exists("c_no_ansi") || exists("c_ansi_typedefs")
|
||||
syn keyword cType size_t ssize_t off_t wchar_t ptrdiff_t sig_atomic_t fpos_t
|
||||
syn keyword cType clock_t time_t va_list jmp_buf FILE DIR div_t ldiv_t
|
||||
syn keyword cType mbstate_t wctrans_t wint_t wctype_t
|
||||
endif
|
||||
if !exists("c_no_c99") " ISO C99
|
||||
syn keyword cType _Bool bool _Complex complex _Imaginary imaginary
|
||||
syn keyword cType int8_t int16_t int32_t int64_t
|
||||
syn keyword cType uint8_t uint16_t uint32_t uint64_t
|
||||
if !exists("c_no_bsd")
|
||||
" These are BSD specific.
|
||||
syn keyword cType u_int8_t u_int16_t u_int32_t u_int64_t
|
||||
endif
|
||||
syn keyword cType int_least8_t int_least16_t int_least32_t int_least64_t
|
||||
syn keyword cType uint_least8_t uint_least16_t uint_least32_t uint_least64_t
|
||||
syn keyword cType int_fast8_t int_fast16_t int_fast32_t int_fast64_t
|
||||
syn keyword cType uint_fast8_t uint_fast16_t uint_fast32_t uint_fast64_t
|
||||
syn keyword cType intptr_t uintptr_t
|
||||
syn keyword cType intmax_t uintmax_t
|
||||
endif
|
||||
if exists("c_gnu")
|
||||
syn keyword cType __label__ __complex__ __volatile__
|
||||
endif
|
||||
|
||||
syn keyword cStructure struct union enum typedef
|
||||
syn keyword cStorageClass static register auto volatile extern const
|
||||
if exists("c_gnu")
|
||||
syn keyword cStorageClass inline __attribute__
|
||||
endif
|
||||
if !exists("c_no_c99") && s:ft !=# 'cpp'
|
||||
syn keyword cStorageClass inline restrict
|
||||
endif
|
||||
if !exists("c_no_c11")
|
||||
syn keyword cStorageClass _Alignas alignas
|
||||
syn keyword cOperator _Alignof alignof
|
||||
syn keyword cStorageClass _Atomic
|
||||
syn keyword cOperator _Generic
|
||||
syn keyword cStorageClass _Noreturn noreturn
|
||||
syn keyword cOperator _Static_assert static_assert
|
||||
syn keyword cStorageClass _Thread_local thread_local
|
||||
syn keyword cType char16_t char32_t
|
||||
endif
|
||||
|
||||
if !exists("c_no_ansi") || exists("c_ansi_constants") || exists("c_gnu")
|
||||
if exists("c_gnu")
|
||||
syn keyword cConstant __GNUC__ __FUNCTION__ __PRETTY_FUNCTION__ __func__
|
||||
endif
|
||||
syn keyword cConstant __LINE__ __FILE__ __DATE__ __TIME__ __STDC__
|
||||
syn keyword cConstant __STDC_VERSION__
|
||||
syn keyword cConstant CHAR_BIT MB_LEN_MAX MB_CUR_MAX
|
||||
syn keyword cConstant UCHAR_MAX UINT_MAX ULONG_MAX USHRT_MAX
|
||||
syn keyword cConstant CHAR_MIN INT_MIN LONG_MIN SHRT_MIN
|
||||
syn keyword cConstant CHAR_MAX INT_MAX LONG_MAX SHRT_MAX
|
||||
syn keyword cConstant SCHAR_MIN SINT_MIN SLONG_MIN SSHRT_MIN
|
||||
syn keyword cConstant SCHAR_MAX SINT_MAX SLONG_MAX SSHRT_MAX
|
||||
if !exists("c_no_c99")
|
||||
syn keyword cConstant __func__ __VA_ARGS__
|
||||
syn keyword cConstant LLONG_MIN LLONG_MAX ULLONG_MAX
|
||||
syn keyword cConstant INT8_MIN INT16_MIN INT32_MIN INT64_MIN
|
||||
syn keyword cConstant INT8_MAX INT16_MAX INT32_MAX INT64_MAX
|
||||
syn keyword cConstant UINT8_MAX UINT16_MAX UINT32_MAX UINT64_MAX
|
||||
syn keyword cConstant INT_LEAST8_MIN INT_LEAST16_MIN INT_LEAST32_MIN INT_LEAST64_MIN
|
||||
syn keyword cConstant INT_LEAST8_MAX INT_LEAST16_MAX INT_LEAST32_MAX INT_LEAST64_MAX
|
||||
syn keyword cConstant UINT_LEAST8_MAX UINT_LEAST16_MAX UINT_LEAST32_MAX UINT_LEAST64_MAX
|
||||
syn keyword cConstant INT_FAST8_MIN INT_FAST16_MIN INT_FAST32_MIN INT_FAST64_MIN
|
||||
syn keyword cConstant INT_FAST8_MAX INT_FAST16_MAX INT_FAST32_MAX INT_FAST64_MAX
|
||||
syn keyword cConstant UINT_FAST8_MAX UINT_FAST16_MAX UINT_FAST32_MAX UINT_FAST64_MAX
|
||||
syn keyword cConstant INTPTR_MIN INTPTR_MAX UINTPTR_MAX
|
||||
syn keyword cConstant INTMAX_MIN INTMAX_MAX UINTMAX_MAX
|
||||
syn keyword cConstant PTRDIFF_MIN PTRDIFF_MAX SIG_ATOMIC_MIN SIG_ATOMIC_MAX
|
||||
syn keyword cConstant SIZE_MAX WCHAR_MIN WCHAR_MAX WINT_MIN WINT_MAX
|
||||
endif
|
||||
syn keyword cConstant FLT_RADIX FLT_ROUNDS
|
||||
syn keyword cConstant FLT_DIG FLT_MANT_DIG FLT_EPSILON
|
||||
syn keyword cConstant DBL_DIG DBL_MANT_DIG DBL_EPSILON
|
||||
syn keyword cConstant LDBL_DIG LDBL_MANT_DIG LDBL_EPSILON
|
||||
syn keyword cConstant FLT_MIN FLT_MAX FLT_MIN_EXP FLT_MAX_EXP
|
||||
syn keyword cConstant FLT_MIN_10_EXP FLT_MAX_10_EXP
|
||||
syn keyword cConstant DBL_MIN DBL_MAX DBL_MIN_EXP DBL_MAX_EXP
|
||||
syn keyword cConstant DBL_MIN_10_EXP DBL_MAX_10_EXP
|
||||
syn keyword cConstant LDBL_MIN LDBL_MAX LDBL_MIN_EXP LDBL_MAX_EXP
|
||||
syn keyword cConstant LDBL_MIN_10_EXP LDBL_MAX_10_EXP
|
||||
syn keyword cConstant HUGE_VAL CLOCKS_PER_SEC NULL
|
||||
syn keyword cConstant LC_ALL LC_COLLATE LC_CTYPE LC_MONETARY
|
||||
syn keyword cConstant LC_NUMERIC LC_TIME
|
||||
syn keyword cConstant SIG_DFL SIG_ERR SIG_IGN
|
||||
syn keyword cConstant SIGABRT SIGFPE SIGILL SIGHUP SIGINT SIGSEGV SIGTERM
|
||||
" Add POSIX signals as well...
|
||||
syn keyword cConstant SIGABRT SIGALRM SIGCHLD SIGCONT SIGFPE SIGHUP
|
||||
syn keyword cConstant SIGILL SIGINT SIGKILL SIGPIPE SIGQUIT SIGSEGV
|
||||
syn keyword cConstant SIGSTOP SIGTERM SIGTRAP SIGTSTP SIGTTIN SIGTTOU
|
||||
syn keyword cConstant SIGUSR1 SIGUSR2
|
||||
syn keyword cConstant _IOFBF _IOLBF _IONBF BUFSIZ EOF WEOF
|
||||
syn keyword cConstant FOPEN_MAX FILENAME_MAX L_tmpnam
|
||||
syn keyword cConstant SEEK_CUR SEEK_END SEEK_SET
|
||||
syn keyword cConstant TMP_MAX stderr stdin stdout
|
||||
syn keyword cConstant EXIT_FAILURE EXIT_SUCCESS RAND_MAX
|
||||
" POSIX 2001
|
||||
syn keyword cConstant SIGBUS SIGPOLL SIGPROF SIGSYS SIGURG
|
||||
syn keyword cConstant SIGVTALRM SIGXCPU SIGXFSZ
|
||||
" non-POSIX signals
|
||||
syn keyword cConstant SIGWINCH SIGINFO
|
||||
" Add POSIX errors as well
|
||||
syn keyword cConstant E2BIG EACCES EAGAIN EBADF EBADMSG EBUSY
|
||||
syn keyword cConstant ECANCELED ECHILD EDEADLK EDOM EEXIST EFAULT
|
||||
syn keyword cConstant EFBIG EILSEQ EINPROGRESS EINTR EINVAL EIO EISDIR
|
||||
syn keyword cConstant EMFILE EMLINK EMSGSIZE ENAMETOOLONG ENFILE ENODEV
|
||||
syn keyword cConstant ENOENT ENOEXEC ENOLCK ENOMEM ENOSPC ENOSYS
|
||||
syn keyword cConstant ENOTDIR ENOTEMPTY ENOTSUP ENOTTY ENXIO EPERM
|
||||
syn keyword cConstant EPIPE ERANGE EROFS ESPIPE ESRCH ETIMEDOUT EXDEV
|
||||
" math.h
|
||||
syn keyword cConstant M_E M_LOG2E M_LOG10E M_LN2 M_LN10 M_PI M_PI_2 M_PI_4
|
||||
syn keyword cConstant M_1_PI M_2_PI M_2_SQRTPI M_SQRT2 M_SQRT1_2
|
||||
endif
|
||||
if !exists("c_no_c99") " ISO C99
|
||||
syn keyword cConstant true false
|
||||
endif
|
||||
|
||||
" Accept %: for # (C99)
|
||||
syn region cPreCondit start="^\s*\zs\(%:\|#\)\s*\(if\|ifdef\|ifndef\|elif\)\>" skip="\\$" end="$" keepend contains=cComment,cCommentL,cCppString,cCharacter,cCppParen,cParenError,cNumbers,cCommentError,cSpaceError
|
||||
syn match cPreConditMatch display "^\s*\zs\(%:\|#\)\s*\(else\|endif\)\>"
|
||||
if !exists("c_no_if0")
|
||||
syn cluster cCppOutInGroup contains=cCppInIf,cCppInElse,cCppInElse2,cCppOutIf,cCppOutIf2,cCppOutElse,cCppInSkip,cCppOutSkip
|
||||
syn region cCppOutWrapper start="^\s*\zs\(%:\|#\)\s*if\s\+0\+\s*\($\|//\|/\*\|&\)" end=".\@=\|$" contains=cCppOutIf,cCppOutElse,@NoSpell fold
|
||||
syn region cCppOutIf contained start="0\+" matchgroup=cCppOutWrapper end="^\s*\zs\(%:\|#\)\s*endif\>" contains=cCppOutIf2,cCppOutElse
|
||||
if !exists("c_no_if0_fold")
|
||||
syn region cCppOutIf2 contained matchgroup=cCppOutWrapper start="0\+" end="^\s*\(%:\|#\)\s*\(else\>\|elif\s\+\(0\+\s*\($\|//\|/\*\|&\)\)\@!\|endif\>\)"me=s-1 contains=cSpaceError,cCppOutSkip,@Spell fold
|
||||
else
|
||||
syn region cCppOutIf2 contained matchgroup=cCppOutWrapper start="0\+" end="^\s*\(%:\|#\)\s*\(else\>\|elif\s\+\(0\+\s*\($\|//\|/\*\|&\)\)\@!\|endif\>\)"me=s-1 contains=cSpaceError,cCppOutSkip,@Spell
|
||||
endif
|
||||
syn region cCppOutElse contained matchgroup=cCppOutWrapper start="^\s*\zs\(%:\|#\)\s*\(else\|elif\)" end="^\s*\zs\(%:\|#\)\s*endif\>"me=s-1 contains=TOP,cPreCondit
|
||||
syn region cCppInWrapper start="^\s*\zs\(%:\|#\)\s*if\s\+0*[1-9]\d*\s*\($\|//\|/\*\||\)" end=".\@=\|$" contains=cCppInIf,cCppInElse fold
|
||||
syn region cCppInIf contained matchgroup=cCppInWrapper start="\d\+" end="^\s*\zs\(%:\|#\)\s*endif\>" contains=TOP,cPreCondit
|
||||
if !exists("c_no_if0_fold")
|
||||
syn region cCppInElse contained start="^\s*\zs\(%:\|#\)\s*\(else\>\|elif\s\+\(0*[1-9]\d*\s*\($\|//\|/\*\||\)\)\@!\)" end=".\@=\|$" containedin=cCppInIf contains=cCppInElse2 fold
|
||||
else
|
||||
syn region cCppInElse contained start="^\s*\zs\(%:\|#\)\s*\(else\>\|elif\s\+\(0*[1-9]\d*\s*\($\|//\|/\*\||\)\)\@!\)" end=".\@=\|$" containedin=cCppInIf contains=cCppInElse2
|
||||
endif
|
||||
syn region cCppInElse2 contained matchgroup=cCppInWrapper start="^\s*\zs\(%:\|#\)\s*\(else\|elif\)\([^/]\|/[^/*]\)*" end="^\s*\zs\(%:\|#\)\s*endif\>"me=s-1 contains=cSpaceError,cCppOutSkip,@Spell
|
||||
syn region cCppOutSkip contained start="^\s*\zs\(%:\|#\)\s*\(if\>\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\zs\(%:\|#\)\s*endif\>" contains=cSpaceError,cCppOutSkip
|
||||
syn region cCppInSkip contained matchgroup=cCppInWrapper start="^\s*\zs\(%:\|#\)\s*\(if\s\+\(\d\+\s*\($\|//\|/\*\||\|&\)\)\@!\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\zs\(%:\|#\)\s*endif\>" containedin=cCppOutElse,cCppInIf,cCppInSkip contains=TOP,cPreProc
|
||||
endif
|
||||
syn region cIncluded display contained start=+"+ skip=+\\\\\|\\"+ end=+"+
|
||||
syn match cIncluded display contained "<[^>]*>"
|
||||
syn match cInclude display "^\s*\zs\(%:\|#\)\s*include\>\s*["<]" contains=cIncluded
|
||||
"syn match cLineSkip "\\$"
|
||||
syn cluster cPreProcGroup contains=cPreCondit,cIncluded,cInclude,cDefine,cErrInParen,cErrInBracket,cUserLabel,cSpecial,cOctalZero,cCppOutWrapper,cCppInWrapper,@cCppOutInGroup,cFormat,cNumber,cFloat,cOctal,cOctalError,cNumbersCom,cString,cCommentSkip,cCommentString,cComment2String,@cCommentGroup,cCommentStartError,cParen,cBracket,cMulti,cBadBlock
|
||||
syn region cDefine start="^\s*\zs\(%:\|#\)\s*\(define\|undef\)\>" skip="\\$" end="$" keepend contains=ALLBUT,@cPreProcGroup,@Spell
|
||||
syn region cPreProc start="^\s*\zs\(%:\|#\)\s*\(pragma\>\|line\>\|warning\>\|warn\>\|error\>\)" skip="\\$" end="$" keepend contains=ALLBUT,@cPreProcGroup,@Spell
|
||||
|
||||
" Highlight User Labels
|
||||
syn cluster cMultiGroup contains=cIncluded,cSpecial,cCommentSkip,cCommentString,cComment2String,@cCommentGroup,cCommentStartError,cUserCont,cUserLabel,cBitField,cOctalZero,cCppOutWrapper,cCppInWrapper,@cCppOutInGroup,cFormat,cNumber,cFloat,cOctal,cOctalError,cNumbersCom,cCppParen,cCppBracket,cCppString
|
||||
if s:ft ==# 'c' || exists("cpp_no_cpp11")
|
||||
syn region cMulti transparent start='?' skip='::' end=':' contains=ALLBUT,@cMultiGroup,@Spell,@cStringGroup
|
||||
endif
|
||||
" Avoid matching foo::bar() in C++ by requiring that the next char is not ':'
|
||||
syn cluster cLabelGroup contains=cUserLabel
|
||||
syn match cUserCont display "^\s*\zs\I\i*\s*:$" contains=@cLabelGroup
|
||||
syn match cUserCont display ";\s*\zs\I\i*\s*:$" contains=@cLabelGroup
|
||||
if s:ft ==# 'cpp'
|
||||
syn match cUserCont display "^\s*\zs\%(class\|struct\|enum\)\@!\I\i*\s*:[^:]"me=e-1 contains=@cLabelGroup
|
||||
syn match cUserCont display ";\s*\zs\%(class\|struct\|enum\)\@!\I\i*\s*:[^:]"me=e-1 contains=@cLabelGroup
|
||||
else
|
||||
syn match cUserCont display "^\s*\zs\I\i*\s*:[^:]"me=e-1 contains=@cLabelGroup
|
||||
syn match cUserCont display ";\s*\zs\I\i*\s*:[^:]"me=e-1 contains=@cLabelGroup
|
||||
endif
|
||||
|
||||
syn match cUserLabel display "\I\i*" contained
|
||||
|
||||
" Avoid recognizing most bitfields as labels
|
||||
syn match cBitField display "^\s*\zs\I\i*\s*:\s*[1-9]"me=e-1 contains=cType
|
||||
syn match cBitField display ";\s*\zs\I\i*\s*:\s*[1-9]"me=e-1 contains=cType
|
||||
|
||||
if exists("c_minlines")
|
||||
let b:c_minlines = c_minlines
|
||||
else
|
||||
if !exists("c_no_if0")
|
||||
let b:c_minlines = 50 " #if 0 constructs can be long
|
||||
else
|
||||
let b:c_minlines = 15 " mostly for () constructs
|
||||
endif
|
||||
endif
|
||||
if exists("c_curly_error")
|
||||
syn sync fromstart
|
||||
else
|
||||
exec "syn sync ccomment cComment minlines=" . b:c_minlines
|
||||
endif
|
||||
|
||||
" Define the default highlighting.
|
||||
" Only used when an item doesn't have highlighting yet
|
||||
hi def link cFormat cSpecial
|
||||
hi def link cCppString cString
|
||||
hi def link cCommentL cComment
|
||||
hi def link cCommentStart cComment
|
||||
hi def link cLabel Label
|
||||
hi def link cUserLabel Label
|
||||
hi def link cConditional Conditional
|
||||
hi def link cRepeat Repeat
|
||||
hi def link cCharacter Character
|
||||
hi def link cSpecialCharacter cSpecial
|
||||
hi def link cNumber Number
|
||||
hi def link cOctal Number
|
||||
hi def link cOctalZero PreProc " link this to Error if you want
|
||||
hi def link cFloat Float
|
||||
hi def link cOctalError cError
|
||||
hi def link cParenError cError
|
||||
hi def link cErrInParen cError
|
||||
hi def link cErrInBracket cError
|
||||
hi def link cCommentError cError
|
||||
hi def link cCommentStartError cError
|
||||
hi def link cSpaceError cError
|
||||
hi def link cSpecialError cError
|
||||
hi def link cCurlyError cError
|
||||
hi def link cOperator Operator
|
||||
hi def link cStructure Structure
|
||||
hi def link cStorageClass StorageClass
|
||||
hi def link cInclude Include
|
||||
hi def link cPreProc PreProc
|
||||
hi def link cDefine Macro
|
||||
hi def link cIncluded cString
|
||||
hi def link cError Error
|
||||
hi def link cStatement Statement
|
||||
hi def link cCppInWrapper cCppOutWrapper
|
||||
hi def link cCppOutWrapper cPreCondit
|
||||
hi def link cPreConditMatch cPreCondit
|
||||
hi def link cPreCondit PreCondit
|
||||
hi def link cType Type
|
||||
hi def link cConstant Constant
|
||||
hi def link cCommentString cString
|
||||
hi def link cComment2String cString
|
||||
hi def link cCommentSkip cComment
|
||||
hi def link cString String
|
||||
hi def link cComment Comment
|
||||
hi def link cSpecial SpecialChar
|
||||
hi def link cTodo Todo
|
||||
hi def link cBadContinuation Error
|
||||
hi def link cCppOutSkip cCppOutIf2
|
||||
hi def link cCppInElse2 cCppOutIf2
|
||||
hi def link cCppOutIf2 cCppOut
|
||||
hi def link cCppOut Comment
|
||||
|
||||
let b:current_syntax = "c"
|
||||
|
||||
unlet s:ft
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
" vim: ts=8
|
119
nvim/.config/nvim/syntax/cpp.vim
Normal file
119
nvim/.config/nvim/syntax/cpp.vim
Normal file
|
@ -0,0 +1,119 @@
|
|||
" Vim syntax file
|
||||
" Language: C++
|
||||
" Current Maintainer: vim-jp (https://github.com/vim-jp/vim-cpp)
|
||||
" Previous Maintainer: Ken Shan <ccshan@post.harvard.edu>
|
||||
" Last Change: 2015 Nov 10
|
||||
|
||||
" For version 5.x: Clear all syntax items
|
||||
" For version 6.x: Quit when a syntax file was already loaded
|
||||
if version < 600
|
||||
syntax clear
|
||||
elseif exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
" Read the C syntax to start with
|
||||
if version < 600
|
||||
so <sfile>:p:h/c.vim
|
||||
else
|
||||
runtime! syntax/c.vim
|
||||
unlet b:current_syntax
|
||||
endif
|
||||
|
||||
" C++ extensions
|
||||
syn keyword cppStatement new delete this friend using
|
||||
syn keyword cppAccess public protected private
|
||||
syn keyword cppModifier inline virtual explicit export
|
||||
syn keyword cppType bool wchar_t
|
||||
syn keyword cppExceptions throw try catch
|
||||
syn keyword cppOperator operator typeid
|
||||
syn keyword cppOperator and bitor or xor compl bitand and_eq or_eq xor_eq not not_eq
|
||||
syn match cppCast "\<\(const\|static\|dynamic\|reinterpret\)_cast\s*<"me=e-1
|
||||
syn match cppCast "\<\(const\|static\|dynamic\|reinterpret\)_cast\s*$"
|
||||
syn keyword cppStorageClass mutable
|
||||
syn keyword cppStructure class typename template namespace
|
||||
syn keyword cppBoolean true false
|
||||
syn keyword cppConstant __cplusplus
|
||||
|
||||
" C++ 11 extensions
|
||||
if !exists("cpp_no_cpp11")
|
||||
syn keyword cppModifier override final
|
||||
syn keyword cppType nullptr_t
|
||||
syn keyword cppExceptions noexcept
|
||||
syn keyword cppStorageClass constexpr decltype thread_local
|
||||
syn keyword cppConstant nullptr
|
||||
syn keyword cppConstant ATOMIC_FLAG_INIT ATOMIC_VAR_INIT
|
||||
syn keyword cppConstant ATOMIC_BOOL_LOCK_FREE ATOMIC_CHAR_LOCK_FREE
|
||||
syn keyword cppConstant ATOMIC_CHAR16_T_LOCK_FREE ATOMIC_CHAR32_T_LOCK_FREE
|
||||
syn keyword cppConstant ATOMIC_WCHAR_T_LOCK_FREE ATOMIC_SHORT_LOCK_FREE
|
||||
syn keyword cppConstant ATOMIC_INT_LOCK_FREE ATOMIC_LONG_LOCK_FREE
|
||||
syn keyword cppConstant ATOMIC_LLONG_LOCK_FREE ATOMIC_POINTER_LOCK_FREE
|
||||
syn region cppRawString matchgroup=cppRawStringDelimiter start=+\%(u8\|[uLU]\)\=R"\z([[:alnum:]_{}[\]#<>%:;.?*\+\-/\^&|~!=,"']\{,16}\)(+ end=+)\z1"+ contains=@Spell
|
||||
endif
|
||||
|
||||
" C++ 14 extensions
|
||||
if !exists("cpp_no_cpp14")
|
||||
syn match cppNumber display "\<0b[01]\+\(u\=l\{0,2}\|ll\=u\)\>"
|
||||
endif
|
||||
|
||||
" The minimum and maximum operators in GNU C++
|
||||
syn match cppMinMax "[<>]?"
|
||||
|
||||
" Default highlighting
|
||||
if version >= 508 || !exists("did_cpp_syntax_inits")
|
||||
if version < 508
|
||||
let did_cpp_syntax_inits = 1
|
||||
command -nargs=+ HiLink hi link <args>
|
||||
else
|
||||
command -nargs=+ HiLink hi def link <args>
|
||||
endif
|
||||
HiLink cppAccess cppStatement
|
||||
HiLink cppCast cppStatement
|
||||
HiLink cppExceptions Exception
|
||||
HiLink cppOperator Operator
|
||||
HiLink cppStatement Statement
|
||||
HiLink cppModifier Type
|
||||
HiLink cppType Type
|
||||
HiLink cppStorageClass StorageClass
|
||||
HiLink cppStructure Structure
|
||||
HiLink cppBoolean Boolean
|
||||
HiLink cppConstant Constant
|
||||
HiLink cppRawStringDelimiter Delimiter
|
||||
HiLink cppRawString String
|
||||
HiLink cppNumber Number
|
||||
delcommand HiLink
|
||||
endif
|
||||
|
||||
|
||||
function! RawStringEnableCodeSnip(filetype,start,end,textSnipHl) abort
|
||||
let ft=toupper(a:filetype)
|
||||
let group='textGroup'.ft
|
||||
if exists('b:current_syntax')
|
||||
let s:current_syntax=b:current_syntax
|
||||
" Remove current syntax definition, as some syntax files (e.g. cpp.vim)
|
||||
" do nothing if b:current_syntax is defined.
|
||||
unlet b:current_syntax
|
||||
endif
|
||||
execute 'syntax include @'.group.' syntax/'.a:filetype.'.vim'
|
||||
try
|
||||
execute 'syntax include @'.group.' after/syntax/'.a:filetype.'.vim'
|
||||
catch
|
||||
endtry
|
||||
if exists('s:current_syntax')
|
||||
let b:current_syntax=s:current_syntax
|
||||
else
|
||||
unlet b:current_syntax
|
||||
endif
|
||||
execute 'syntax region textSnip'.ft.'
|
||||
\ matchgroup='.a:textSnipHl.'
|
||||
\ start=+'.a:start.'+ end=+'.a:end.'+
|
||||
\ contains=@'.group
|
||||
endfunction
|
||||
|
||||
|
||||
call RawStringEnableCodeSnip("chaiscript", 'R"chaiscript(', ')chaiscript"', 'cppRawString')
|
||||
call RawStringEnableCodeSnip("lua", 'R"lua(', ')lua"', 'cppRawString')
|
||||
|
||||
let b:current_syntax = "cpp"
|
||||
|
||||
" vim: ts=8
|
39
nvim/.config/nvim/syntax/lang.vim
Normal file
39
nvim/.config/nvim/syntax/lang.vim
Normal file
|
@ -0,0 +1,39 @@
|
|||
" quit when a syntax file was already loaded
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
" @todo \ at end of line should continue on next line
|
||||
|
||||
" Hello this is a test to see if it auto wraps the text when the text has been
|
||||
" going on for way too long
|
||||
|
||||
" syn match langSpecial display contained "\\\(x\x\+\|\o\{1,3}\|.\|$\)"
|
||||
" We only highlight valid escape characters as for now it just ignores unknown
|
||||
" thing
|
||||
syn match langSpecial display contained "\\[abfnrtv]"
|
||||
syn match langError "^.\+"
|
||||
syn keyword langTodo contained TODO FIXME XXX NOTE
|
||||
syn match langTodo contained "@todo"
|
||||
syn match langTodo contained "@note"
|
||||
syn region langSection start="^\s*\[" end="\]"
|
||||
syn match langKey "^.\{-}\ze="
|
||||
syn match langValue "[#=]\zs.*$" contains=langSub,langSpecial,langValue
|
||||
syn match langValue contained "\\\n.\+" contains=langValue
|
||||
" syn match langSub "{[^}]\+}" " This is for fmt support
|
||||
syn match langSub "{\d\+}"
|
||||
syn match langComment "[#;].*$" contains=langTodo
|
||||
|
||||
hi def link langTodo Todo
|
||||
hi def link langSpecial Special
|
||||
hi def link langSection Type
|
||||
hi def link langKey Identifier
|
||||
hi def link langValue String
|
||||
hi def link langValue2 String
|
||||
hi def link langSub Constant
|
||||
hi def link langComment Comment
|
||||
hi def link langError Error
|
||||
|
||||
|
||||
let b:current_syntax = "lang"
|
||||
|
||||
" vim: sts=2 sw=2 et
|
4
nvim/dot-config/nvim/.gitignore
vendored
4
nvim/dot-config/nvim/.gitignore
vendored
|
@ -1,4 +0,0 @@
|
|||
tags
|
||||
test.sh
|
||||
.luarc.json
|
||||
nvim
|
|
@ -1,130 +0,0 @@
|
|||
# kickstart.nvim
|
||||
|
||||
### Introduction
|
||||
|
||||
A starting point for Neovim that is:
|
||||
|
||||
* Small
|
||||
* Single-file (with examples of moving to multi-file)
|
||||
* Documented
|
||||
* Modular
|
||||
|
||||
This repo is meant to be used as by **YOU** to begin your Neovim journey; remove the things you don't use and add what you miss.
|
||||
|
||||
Distribution Alternatives:
|
||||
- [LazyVim](https://www.lazyvim.org/): A delightful distribution maintained by @folke (the author of lazy.nvim, the package manager used here)
|
||||
|
||||
### Installation
|
||||
|
||||
Kickstart.nvim targets *only* the latest ['stable'](https://github.com/neovim/neovim/releases/tag/stable) and latest ['nightly'](https://github.com/neovim/neovim/releases/tag/nightly) of Neovim. If you are experiencing issues, please make sure you have the latest versions.
|
||||
|
||||
* Backup your previous configuration
|
||||
* (Recommended) Fork this repo (so that you have your own copy that you can modify).
|
||||
* Clone the kickstart repo into `$HOME/.config/nvim/` (Linux/Mac) or `~/AppData/Local/nvim/` (Windows)
|
||||
* If you don't want to include it as a git repo, you can just clone it and then move the files to this location
|
||||
* Start Neovim (`nvim`) and allow `lazy.nvim` to complete installation.
|
||||
* Restart Neovim
|
||||
* **You're ready to go!**
|
||||
|
||||
Additional system requirements:
|
||||
- Make sure to review the readmes of the plugins if you are experiencing errors. In particular:
|
||||
- [ripgrep](https://github.com/BurntSushi/ripgrep#installation) is required for multiple [telescope](https://github.com/nvim-telescope/telescope.nvim#suggested-dependencies) pickers.
|
||||
- See as well [Windows Installation](#Windows-Installation)
|
||||
|
||||
### Configuration And Extension
|
||||
|
||||
* Inside of your fork, feel free to modify any file you like! It's your fork!
|
||||
* Then there are two primary configuration options available:
|
||||
* Include the `lua/kickstart/plugins/*` files in your configuration.
|
||||
* Add new configuration in `lua/custom/plugins/*` files, which will be auto sourced using `lazy.nvim`
|
||||
* NOTE: To enable this, you need to uncomment `{ import = 'custom.plugins' }` in your `init.lua`
|
||||
|
||||
You can also merge updates/changes from the repo back into your fork, to keep up-to-date with any changes for the default configuration
|
||||
|
||||
#### Example: Adding an autopairs plugin
|
||||
|
||||
In the file: `lua/custom/plugins/autopairs.lua`, add:
|
||||
|
||||
```lua
|
||||
-- File: lua/custom/plugins/autopairs.lua
|
||||
|
||||
return {
|
||||
"windwp/nvim-autopairs",
|
||||
config = function()
|
||||
require("nvim-autopairs").setup {}
|
||||
end,
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
This will automatically install `nvim-autopairs` and enable it on startup. For more information, see documentation for [lazy.nvim](https://github.com/folke/lazy.nvim).
|
||||
|
||||
#### Example: Adding a file tree plugin
|
||||
|
||||
In the file: `lua/custom/plugins/filetree.lua`, add:
|
||||
|
||||
```lua
|
||||
-- Unless you are still migrating, remove the deprecated commands from v1.x
|
||||
vim.cmd([[ let g:neo_tree_remove_legacy_commands = 1 ]])
|
||||
|
||||
return {
|
||||
"nvim-neo-tree/neo-tree.nvim",
|
||||
version = "*",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"nvim-tree/nvim-web-devicons", -- not strictly required, but recommended
|
||||
"MunifTanjim/nui.nvim",
|
||||
},
|
||||
config = function ()
|
||||
require('neo-tree').setup {}
|
||||
end,
|
||||
}
|
||||
```
|
||||
|
||||
This will install the tree plugin and add the command `:NeoTree` for you. You can explore the documentation at [neo-tree.nvim](https://github.com/nvim-neo-tree/neo-tree.nvim) for more information.
|
||||
|
||||
#### Example: Adding a file to change default options
|
||||
|
||||
To change default options, you can add a file in the `/after/plugin/` folder (see `:help load-plugins`) to include your own options, keymaps, autogroups, and more. The following is an example `defaults.lua` file (located at `$HOME/.config/nvim/after/plugin/defaults.lua`).
|
||||
|
||||
```lua
|
||||
vim.opt.relativenumber = true
|
||||
|
||||
vim.keymap.set('n', '<leader>sr', require('telescope.builtin').resume, { desc = '[S]earch [R]esume' })
|
||||
```
|
||||
|
||||
### Contribution
|
||||
|
||||
Pull-requests are welcome. The goal of this repo is not to create a Neovim configuration framework, but to offer a starting template that shows, by example, available features in Neovim. Some things that will not be included:
|
||||
|
||||
* Custom language server configuration (null-ls templates)
|
||||
* Theming beyond a default colorscheme necessary for LSP highlight groups
|
||||
|
||||
Each PR, especially those which increase the line count, should have a description as to why the PR is necessary.
|
||||
|
||||
### FAQ
|
||||
|
||||
* What should I do if I already have a pre-existing neovim configuration?
|
||||
* You should back it up, then delete all files associated with it.
|
||||
* This includes your existing init.lua and the neovim files in `~/.local` which can be deleted with `rm -rf ~/.local/share/nvim/`
|
||||
* You may also want to look at the [migration guide for lazy.nvim](https://github.com/folke/lazy.nvim#-migration-guide)
|
||||
* What if I want to "uninstall" this configuration:
|
||||
* See [lazy.nvim uninstall](https://github.com/folke/lazy.nvim#-uninstalling) information
|
||||
* Are there any cool videos about this plugin?
|
||||
* Current iteration of kickstart (coming soon)
|
||||
* Here is one about the previous iteration of kickstart: [video introduction to Kickstart.nvim](https://youtu.be/stqUbv-5u2s).
|
||||
|
||||
### Windows Installation
|
||||
|
||||
Installation may require installing build tools, and updating the run command for `telescope-fzf-native`
|
||||
|
||||
See `telescope-fzf-native` documention for [more details](https://github.com/nvim-telescope/telescope-fzf-native.nvim#installation)
|
||||
|
||||
This requires:
|
||||
|
||||
- Install CMake, and the Microsoft C++ Build Tools on Windows
|
||||
|
||||
```lua
|
||||
{'nvim-telescope/telescope-fzf-native.nvim', build = 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build' }
|
||||
```
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
-- Install lazy package manager
|
||||
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)
|
||||
|
||||
-- Setup
|
||||
require("keymaps")
|
||||
require("options")
|
||||
require("autocmds")
|
||||
require("lsp")
|
||||
|
||||
-- Configure plugins
|
||||
require("lazy").setup({
|
||||
{ import = "themes" },
|
||||
{ import = "plugins" },
|
||||
}, {
|
||||
install = {
|
||||
colorscheme = {
|
||||
"gruvbox",
|
||||
},
|
||||
},
|
||||
change_detection = {
|
||||
notify = false,
|
||||
},
|
||||
rocks = {
|
||||
enabled = false,
|
||||
},
|
||||
ui = {
|
||||
border = require("symbols.window").border,
|
||||
backdrop = 100,
|
||||
},
|
||||
})
|
|
@ -1,49 +0,0 @@
|
|||
{
|
||||
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
|
||||
"actions-preview.nvim": { "branch": "master", "commit": "36513ad213855d497b7dd3391a24d1d75d58e36f" },
|
||||
"blink.cmp": { "branch": "main", "commit": "022521a8910a5543b0251b21c9e1a1e989745796" },
|
||||
"bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" },
|
||||
"conform.nvim": { "branch": "master", "commit": "6feb2f28f9a9385e401857b21eeac3c1b66dd628" },
|
||||
"eyeliner.nvim": { "branch": "main", "commit": "8f197eb30cecdf4c2cc9988a5eecc6bc34c0c7d6" },
|
||||
"fidget.nvim": { "branch": "main", "commit": "d9ba6b7bfe29b3119a610892af67602641da778e" },
|
||||
"friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "8bdaccdb897945a3c99c1ad8df94db0ddf5c8790" },
|
||||
"gruvbox.nvim": { "branch": "main", "commit": "00e38a379bab3389e187b3953566d67d494dfddd" },
|
||||
"guess-indent.nvim": { "branch": "main", "commit": "84a4987ff36798c2fc1169cbaff67960aed9776f" },
|
||||
"inc-rename.nvim": { "branch": "main", "commit": "2eaff20526ff6101337b84f4b0d238c11f47d7f4" },
|
||||
"kubernetes.nvim": { "branch": "main", "commit": "44daf998345628a1a7034e3aaa31f4e05e4dde7c" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
|
||||
"lazydev.nvim": { "branch": "main", "commit": "2367a6c0a01eb9edb0464731cc0fb61ed9ab9d2c" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "0c6cca9f2c63dadeb9225c45bc92bb95a151d4af" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "67da97f8c2fd12d05427bb485ce07ee6418e0a51" },
|
||||
"mason-tool-installer.nvim": { "branch": "main", "commit": "93a9ff9b34c91c0cb0f7de8d5f7e4abce51d8903" },
|
||||
"mason.nvim": { "branch": "main", "commit": "8024d64e1330b86044fed4c8494ef3dcd483a67c" },
|
||||
"neo-tree.nvim": { "branch": "v3.x", "commit": "f481de16a0eb59c985abac8985e3f2e2f75b4875" },
|
||||
"nui.nvim": { "branch": "main", "commit": "7cd18e73cfbd70e1546931b7268b3eebaeff9391" },
|
||||
"nvim-colorizer.lua": { "branch": "master", "commit": "517df88cf2afb36652830df2c655df2da416a0ae" },
|
||||
"nvim-dap": { "branch": "master", "commit": "b0f983507e3702f073bfe1516846e58b56d4e42f" },
|
||||
"nvim-dap-virtual-text": { "branch": "master", "commit": "fbdb48c2ed45f4a8293d0d483f7730d24467ccb6" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "03bc581e05e81d33808b42b2d7e76d70adb3b595" },
|
||||
"nvim-surround": { "branch": "main", "commit": "8dd9150ca7eae5683660ea20cec86edcd5ca4046" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
|
||||
"nvim-treesitter-textobjects": { "branch": "master", "commit": "0f051e9813a36481f48ca1f833897210dbcfffde" },
|
||||
"nvim-ts-autotag": { "branch": "main", "commit": "a1d526af391f6aebb25a8795cbc05351ed3620b5" },
|
||||
"peek.nvim": { "branch": "master", "commit": "5820d937d5414baea5f586dc2a3d912a74636e5b" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
|
||||
"ros-nvim": { "branch": "main", "commit": "1ad64cd3a1e144dfea67890845f9da2e82d96900" },
|
||||
"schema-companion.nvim": { "branch": "main", "commit": "7d662b6c1497fdd82e3e8836eb122f5c4b0d8277" },
|
||||
"schemastore.nvim": { "branch": "main", "commit": "59d6bfa8c109675065f68a81664c17557cc19a9c" },
|
||||
"scrollEOF.nvim": { "branch": "master", "commit": "2575109749b4bf3a0bf979a17947b3c1e8c5137e" },
|
||||
"smart-open.nvim": { "branch": "0.2.x", "commit": "560d8f16e17977c8303db6f9660db58a4415ca41" },
|
||||
"smart-splits.nvim": { "branch": "master", "commit": "5aa2dd82d56cde2f01aef4e902c961e2f7a5453e" },
|
||||
"snacks.nvim": { "branch": "main", "commit": "bc0630e43be5699bb94dadc302c0d21615421d93" },
|
||||
"sqlite.lua": { "branch": "master", "commit": "50092d60feb242602d7578398c6eb53b4a8ffe7b" },
|
||||
"telescope-fzy-native.nvim": { "branch": "master", "commit": "282f069504515eec762ab6d6c89903377252bf5b" },
|
||||
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7" },
|
||||
"todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" },
|
||||
"trouble.nvim": { "branch": "main", "commit": "85bedb7eb7fa331a2ccbecb9202d8abba64d37b3" },
|
||||
"ultimate-autopair.nvim": { "branch": "v0.6", "commit": "b24b97c538b71b6de0ce9d84e47df27b6ecafd76" },
|
||||
"undotree": { "branch": "master", "commit": "b951b87b46c34356d44aa71886aecf9dd7f5788a" },
|
||||
"which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" }
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
return {
|
||||
settings = {
|
||||
basedpyright = {
|
||||
analysis = {
|
||||
typeCheckingMode = "standard",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
return {
|
||||
cmd = { "clangd", "--offset-encoding=utf-16", "--clang-tidy" },
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
return {
|
||||
settings = {
|
||||
json = {
|
||||
validate = { enable = true },
|
||||
schemas = require("schemastore").json.schemas(),
|
||||
},
|
||||
},
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
return {
|
||||
settings = {
|
||||
Lua = {
|
||||
workspace = { checkThirdParty = false },
|
||||
telemetry = { enable = false },
|
||||
},
|
||||
},
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
return {
|
||||
settings = {
|
||||
["rust-analyzer"] = {
|
||||
check = {
|
||||
command = "clippy",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
return {
|
||||
init_options = {
|
||||
diagnosticSeverity = "Hint",
|
||||
},
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
return require("schema-companion").setup_client({
|
||||
settings = {
|
||||
yaml = {},
|
||||
},
|
||||
})
|
|
@ -1,26 +0,0 @@
|
|||
-- Highlight on yank
|
||||
vim.api.nvim_create_autocmd("TextYankPost", {
|
||||
callback = function()
|
||||
vim.highlight.on_yank({ higroup = "YankHighlight" })
|
||||
end,
|
||||
})
|
||||
|
||||
-- show cursor line only in active window
|
||||
vim.api.nvim_create_autocmd({ "InsertLeave", "WinEnter" }, {
|
||||
callback = function()
|
||||
local ok, cl = pcall(vim.api.nvim_win_get_var, 0, "auto-cursorline")
|
||||
if ok and cl then
|
||||
vim.wo.cursorline = true
|
||||
vim.api.nvim_win_del_var(0, "auto-cursorline")
|
||||
end
|
||||
end,
|
||||
})
|
||||
vim.api.nvim_create_autocmd({ "InsertEnter", "WinLeave" }, {
|
||||
callback = function()
|
||||
local cl = vim.wo.cursorline
|
||||
if cl then
|
||||
vim.api.nvim_win_set_var(0, "auto-cursorline", cl)
|
||||
vim.wo.cursorline = false
|
||||
end
|
||||
end,
|
||||
})
|
|
@ -1,17 +0,0 @@
|
|||
vim.g.mapleader = " "
|
||||
vim.g.maplocalleader = " "
|
||||
|
||||
vim.keymap.set({ "n", "v" }, "<Space>", "<Nop>", { noremap = true, silent = true })
|
||||
|
||||
-- Remap for dealing with word wrap
|
||||
vim.keymap.set("n", "k", "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true })
|
||||
vim.keymap.set("n", "j", "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true })
|
||||
|
||||
-- Some nice adjustments
|
||||
vim.keymap.set("n", "<C-d>", "<C-d>zz")
|
||||
vim.keymap.set("n", "<C-u>", "<C-u>zz")
|
||||
vim.keymap.set("n", "n", "nzz")
|
||||
vim.keymap.set("n", "N", "Nzz")
|
||||
|
||||
-- Clear search highlight by pressing esc
|
||||
vim.keymap.set("n", "<Esc>", "<cmd>nohlsearch<CR>")
|
|
@ -1,154 +0,0 @@
|
|||
local diagnostic = require("symbols.diagnostic")
|
||||
local methods = vim.lsp.protocol.Methods
|
||||
|
||||
local map = function(keys, func, desc, mode, bufnr)
|
||||
mode = mode or "n"
|
||||
vim.keymap.set(mode, keys, func, { desc = desc, buffer = bufnr })
|
||||
end
|
||||
|
||||
-- General keymaps
|
||||
map("[d", function()
|
||||
vim.diagnostic.jump({ count = -1 })
|
||||
end, "Go to previous diagnostic message")
|
||||
map("]d", function()
|
||||
vim.diagnostic.jump({ count = 1 })
|
||||
end, "Go to next diagnostic message")
|
||||
|
||||
map("[e", function()
|
||||
vim.diagnostic.jump({ count = -1, severity = vim.diagnostic.severity.ERROR })
|
||||
end, "Go to previous error message")
|
||||
map("]e", function()
|
||||
vim.diagnostic.jump({ count = 1, severity = vim.diagnostic.severity.ERROR })
|
||||
end, "Go to next error message")
|
||||
|
||||
map("<leader>e", vim.diagnostic.open_float, "Open floating diagnostic message")
|
||||
|
||||
map("<leader>th", function()
|
||||
vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled())
|
||||
end, "Toggle inlay hints")
|
||||
|
||||
map("gra", function()
|
||||
require("actions-preview").code_actions()
|
||||
end, "Code actions", { "n", "x" })
|
||||
map("grD", vim.lsp.buf.declaration, "Goto declaration")
|
||||
map("grd", function()
|
||||
require("telescope.builtin").lsp_definitions({ jump_type = "never" })
|
||||
end, "Goto definition")
|
||||
|
||||
map("grt", function()
|
||||
require("telescope.builtin").lsp_type_definitions()
|
||||
end, "Type definition")
|
||||
map("grr", function()
|
||||
require("telescope.builtin").lsp_references()
|
||||
end, "Goto references")
|
||||
map("gri", function()
|
||||
require("telescope.builtin").lsp_implementations()
|
||||
end, "Goto implementation")
|
||||
|
||||
map("<leader>ss", function()
|
||||
require("telescope.builtin").lsp_document_symbols()
|
||||
end, "Document symbols")
|
||||
map("<leader>sS", function()
|
||||
require("telescope.builtin").lsp_dynamic_workspace_symbols()
|
||||
end, "Workspace symbols")
|
||||
|
||||
-- Provide a placeholder rename keymap, otherwise the rename appears to works until you hit enter at which point it will fail
|
||||
map("grn", function()
|
||||
vim.api.nvim_echo({ { "Rename are not available in current buffer" } }, true, { err = true })
|
||||
end, "Rename")
|
||||
|
||||
---@param client vim.lsp.Client
|
||||
---@param bufnr integer
|
||||
local function on_attach(client, bufnr)
|
||||
-- Setup actual rename keymap if it is available
|
||||
if client:supports_method(methods.textDocument_rename, bufnr) then
|
||||
vim.keymap.set("n", "grn", function()
|
||||
return ":IncRename " .. vim.fn.expand("<cword>")
|
||||
end, { buffer = bufnr, expr = true, desc = "Rename" })
|
||||
end
|
||||
|
||||
-- Disable lsp based syntax highlighting, I don't like it
|
||||
-- TODO: Switch to this once it is available
|
||||
-- vim.lsp.document_color.enable(false, bufnr)
|
||||
if client.server_capabilities.semanticTokensProvider then
|
||||
client.server_capabilities.semanticTokensProvider = nil
|
||||
end
|
||||
|
||||
-- Highlight references under cursor
|
||||
if client:supports_method(methods.textDocument_documentHighlight) then
|
||||
local lsp_hover_hl = vim.api.nvim_create_augroup("LspHoverHighlight", { clear = false })
|
||||
vim.api.nvim_create_autocmd({ "CursorHold", "CursorHoldI" }, {
|
||||
buffer = bufnr,
|
||||
group = lsp_hover_hl,
|
||||
callback = vim.lsp.buf.document_highlight,
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd({ "CursorMoved", "CursorMovedI" }, {
|
||||
buffer = bufnr,
|
||||
group = lsp_hover_hl,
|
||||
callback = vim.lsp.buf.clear_references,
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
vim.diagnostic.config({
|
||||
severity_sort = true,
|
||||
signs = {
|
||||
numhl = {
|
||||
[vim.diagnostic.severity.ERROR] = "DiagnosticNumError",
|
||||
[vim.diagnostic.severity.WARN] = "DiagnosticNumWarn",
|
||||
[vim.diagnostic.severity.HINT] = "DiagnosticNumHint",
|
||||
[vim.diagnostic.severity.INFO] = "DiagnosticNumInfo",
|
||||
},
|
||||
text = {
|
||||
[vim.diagnostic.severity.ERROR] = "",
|
||||
[vim.diagnostic.severity.WARN] = "",
|
||||
[vim.diagnostic.severity.HINT] = "",
|
||||
[vim.diagnostic.severity.INFO] = "",
|
||||
},
|
||||
},
|
||||
float = {
|
||||
severity_sort = false,
|
||||
header = "",
|
||||
suffix = function(d)
|
||||
local code = d.code and string.format(" (%s)", d.code) or ""
|
||||
|
||||
return string.format("%s [%s]", code, d.source), "NormalFloat"
|
||||
end,
|
||||
},
|
||||
virtual_text = {
|
||||
prefix = function(d)
|
||||
return diagnostic[d.severity]
|
||||
end,
|
||||
virt_text_pos = "eol_right_align",
|
||||
},
|
||||
})
|
||||
|
||||
local register_capability = vim.lsp.handlers[methods.client_registerCapability]
|
||||
vim.lsp.handlers[methods.client_registerCapability] = function(err, res, ctx)
|
||||
local client = vim.lsp.get_client_by_id(ctx.client_id)
|
||||
if not client then
|
||||
return
|
||||
end
|
||||
|
||||
on_attach(client, vim.api.nvim_get_current_buf())
|
||||
|
||||
return register_capability(err, res, ctx)
|
||||
end
|
||||
|
||||
vim.api.nvim_create_autocmd("LspAttach", {
|
||||
desc = "Configure LSP keymaps",
|
||||
callback = function(args)
|
||||
local client = vim.lsp.get_client_by_id(args.data.client_id)
|
||||
if not client then
|
||||
return
|
||||
end
|
||||
|
||||
on_attach(client, args.buf)
|
||||
end,
|
||||
})
|
||||
|
||||
-- Manually enable rust analyzer, if installed
|
||||
if vim.fn.executable("rust_analyzer") then
|
||||
vim.lsp.enable("rust_analyzer")
|
||||
end
|
|
@ -1,71 +0,0 @@
|
|||
local window = require("symbols.window")
|
||||
|
||||
-- Set highlight on search
|
||||
vim.o.hlsearch = true
|
||||
|
||||
-- Make line numbers default
|
||||
vim.wo.number = true
|
||||
vim.wo.relativenumber = true
|
||||
|
||||
-- Enable mouse mode
|
||||
vim.o.mouse = "a"
|
||||
|
||||
-- Sync clipboard between OS and Neovim.
|
||||
-- Remove this option if you want your OS clipboard to remain independent.
|
||||
-- See `:help 'clipboard'`
|
||||
vim.o.clipboard = "unnamedplus"
|
||||
|
||||
-- Enable break indent
|
||||
vim.o.breakindent = true
|
||||
|
||||
-- Save undo history
|
||||
vim.o.undofile = true
|
||||
|
||||
-- Case insensitive searching UNLESS /C or capital in search
|
||||
vim.o.ignorecase = true
|
||||
vim.o.smartcase = true
|
||||
|
||||
-- Keep signcolumn on by default
|
||||
vim.wo.signcolumn = "yes"
|
||||
|
||||
-- Decrease update time
|
||||
vim.o.updatetime = 250
|
||||
vim.o.timeout = true
|
||||
vim.o.timeoutlen = 300
|
||||
|
||||
-- Set completeopt to have a better completion experience
|
||||
-- vim.o.completeopt = "menuone,noselect"
|
||||
|
||||
-- NOTE: You should make sure your terminal supports this
|
||||
vim.o.termguicolors = true
|
||||
|
||||
-- Default tab settings
|
||||
-- Tab settings are automatically detected by vim-sleuth
|
||||
-- Can be overridden by .editorconfig and modeline
|
||||
vim.o.tabstop = 4
|
||||
vim.o.softtabstop = 4
|
||||
vim.o.shiftwidth = 4
|
||||
vim.o.expandtab = false
|
||||
vim.o.smarttab = true
|
||||
|
||||
-- Ask for confirmation instead of failing
|
||||
vim.o.confirm = true
|
||||
|
||||
-- Turn on cursorline
|
||||
vim.o.cursorline = true
|
||||
|
||||
-- Don't show mode, powerline already shows it
|
||||
vim.o.showmode = false
|
||||
|
||||
-- Minimum number of screen lines above and below the cursor
|
||||
vim.o.scrolloff = 10
|
||||
|
||||
-- Highlight tabs and trailing whitespace
|
||||
vim.o.listchars = "trail:~,tab:¦⁃,nbsp:␣"
|
||||
vim.o.list = true
|
||||
|
||||
-- Fold settings
|
||||
vim.o.foldlevelstart = 99
|
||||
|
||||
-- Windows borders
|
||||
vim.o.winborder = window.border
|
|
@ -1,28 +0,0 @@
|
|||
-- https://github.com/aznhe21/actions-preview.nvim
|
||||
--- @module "lazy"
|
||||
--- @type LazySpec
|
||||
return {
|
||||
"aznhe21/actions-preview.nvim",
|
||||
opts = function()
|
||||
local hl = require("actions-preview.highlight")
|
||||
return {
|
||||
backend = { "telescope" },
|
||||
highlight_command = {
|
||||
hl.delta(),
|
||||
},
|
||||
telescope = {
|
||||
sorting_strategy = "ascending",
|
||||
layout_strategy = "vertical",
|
||||
layout_config = {
|
||||
width = 0.8,
|
||||
height = 0.9,
|
||||
prompt_position = "top",
|
||||
preview_cutoff = 20,
|
||||
preview_height = function(_, _, max_lines)
|
||||
return max_lines - 15
|
||||
end,
|
||||
},
|
||||
},
|
||||
}
|
||||
end,
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
-- https://github.com/altermo/ultimate-autopair.nvim
|
||||
--- @module "lazy"
|
||||
--- @type LazySpec
|
||||
return {
|
||||
"altermo/ultimate-autopair.nvim",
|
||||
event = { "InsertEnter", "CmdlineEnter" },
|
||||
branch = "v0.6",
|
||||
--- @module "ultimate-autopair"
|
||||
--- @type prof.def.conf
|
||||
opts = {
|
||||
fastwarp = {
|
||||
faster = true,
|
||||
},
|
||||
-- Fix single quotes in rust
|
||||
config_internal_pairs = {
|
||||
{
|
||||
"'",
|
||||
"'",
|
||||
multiline = false,
|
||||
nft = {},
|
||||
suround = true,
|
||||
cond = function(fn)
|
||||
if fn.get_ft() ~= "rust" then
|
||||
return true
|
||||
end
|
||||
return not fn.in_node({ "bounded_type", "reference_type", "type_arguments", "type_parameters" })
|
||||
end,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
|
@ -1,115 +0,0 @@
|
|||
-- https://github.com/saghen/blink.cmp
|
||||
--- @module "lazy"
|
||||
--- @type LazySpec
|
||||
return {
|
||||
"saghen/blink.cmp",
|
||||
dependencies = { "rafamadriz/friendly-snippets" },
|
||||
event = "InsertEnter",
|
||||
|
||||
-- use a release tag to download pre-built binaries
|
||||
version = "1.*",
|
||||
|
||||
--- @module "blink-cmp"
|
||||
--- @type blink.cmp.Config
|
||||
opts = {
|
||||
keymap = {
|
||||
preset = "default",
|
||||
["<C-space>"] = { "show", "show_documentation", "hide_documentation" },
|
||||
["<C-u>"] = { "scroll_documentation_up" },
|
||||
["<C-d>"] = { "scroll_documentation_down" },
|
||||
|
||||
["<CR>"] = { "accept", "fallback" },
|
||||
["<Esc>"] = {
|
||||
function(cmp)
|
||||
if cmp.is_visible() then
|
||||
cmp.cancel()
|
||||
if cmp.get_selected_item_idx() ~= nil or cmp.snippet_active() then
|
||||
return true
|
||||
end
|
||||
elseif cmp.snippet_active() then
|
||||
vim.snippet.stop()
|
||||
end
|
||||
end,
|
||||
"fallback",
|
||||
},
|
||||
|
||||
["<Tab>"] = { "select_next", "snippet_forward", "fallback" },
|
||||
["<S-Tab>"] = { "select_prev", "snippet_backward", "fallback" },
|
||||
["<Up>"] = { "select_prev", "fallback" },
|
||||
["<Down>"] = { "select_next", "fallback" },
|
||||
["<C-p>"] = { "select_prev", "fallback_to_mappings" },
|
||||
["<C-n>"] = { "select_next", "fallback_to_mappings" },
|
||||
|
||||
["<C-k>"] = { "show_signature", "hide_signature", "fallback" },
|
||||
},
|
||||
|
||||
appearance = {
|
||||
nerd_font_variant = "normal",
|
||||
},
|
||||
|
||||
completion = {
|
||||
ghost_text = {
|
||||
enabled = true,
|
||||
},
|
||||
list = {
|
||||
selection = {
|
||||
preselect = false,
|
||||
},
|
||||
},
|
||||
documentation = {
|
||||
auto_show = true,
|
||||
auto_show_delay_ms = 0,
|
||||
},
|
||||
menu = {
|
||||
auto_show = true,
|
||||
draw = {
|
||||
columns = {
|
||||
{ "label", "label_description", gap = 1 },
|
||||
{ "kind", "source_name", gap = 1 },
|
||||
},
|
||||
components = {
|
||||
source_name = {
|
||||
text = function(ctx)
|
||||
if ctx.source_id ~= "snippets" then
|
||||
return "[" .. ctx.source_name .. "]"
|
||||
end
|
||||
end,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
signature = {
|
||||
enabled = true,
|
||||
trigger = {
|
||||
show_on_accept = true,
|
||||
show_on_insert = true,
|
||||
},
|
||||
},
|
||||
|
||||
sources = {
|
||||
default = {
|
||||
"lazydev",
|
||||
"lsp",
|
||||
"path",
|
||||
"snippets",
|
||||
"buffer",
|
||||
},
|
||||
providers = {
|
||||
lazydev = {
|
||||
name = "LazyDev",
|
||||
module = "lazydev.integrations.blink",
|
||||
score_offset = 100,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
cmdline = {
|
||||
enabled = false,
|
||||
},
|
||||
|
||||
fuzzy = { implementation = "prefer_rust_with_warning" },
|
||||
},
|
||||
opts_extend = { "sources.default" },
|
||||
}
|
|
@ -1,54 +0,0 @@
|
|||
-- https://github.com/akinsho/bufferline.nvim
|
||||
local diagnostic = require("symbols.diagnostic")
|
||||
local file = require("symbols.file")
|
||||
|
||||
--- @module "lazy"
|
||||
--- @type LazySpec
|
||||
return {
|
||||
"akinsho/bufferline.nvim",
|
||||
--- @module "bufferline"
|
||||
--- @type bufferline.UserConfig
|
||||
opts = {
|
||||
options = {
|
||||
show_buffer_icons = false,
|
||||
show_buffer_close_icons = false,
|
||||
diagnostics = "nvim_lsp",
|
||||
separator_style = "thick",
|
||||
left_trunc_marker = "",
|
||||
right_trunc_marker = "",
|
||||
sort_by = "insert_at_end",
|
||||
indicator = {
|
||||
style = "none",
|
||||
},
|
||||
modified_icon = file.modified,
|
||||
---@diagnostic disable-next-line: unused-local
|
||||
diagnostics_indicator = function(count, level, diagnostics_dict, context)
|
||||
local s = " "
|
||||
for e, n in pairs(diagnostics_dict) do
|
||||
local sym = e == "error" and diagnostic.error .. " "
|
||||
or (e == "warning" and diagnostic.warn .. " ")
|
||||
or (e == "info" and diagnostic.info .. " " or diagnostic.hint .. " ")
|
||||
s = s .. n .. sym
|
||||
end
|
||||
return s
|
||||
end,
|
||||
},
|
||||
},
|
||||
init = function()
|
||||
-- Setup keybinds to move between buffers
|
||||
vim.keymap.set("n", "<tab>", function()
|
||||
require("bufferline").cycle(1)
|
||||
end, { silent = true, desc = "Goto next buffer" })
|
||||
vim.keymap.set("n", "<S-tab>", function()
|
||||
require("bufferline").cycle(-1)
|
||||
end, { silent = true, desc = "Goto previous buffer" })
|
||||
|
||||
-- Setup keybinds to move buffers around
|
||||
vim.keymap.set("n", "<leader>b[", function()
|
||||
require("bufferline").move(-1)
|
||||
end, { silent = true, desc = "Move buffer to left" })
|
||||
vim.keymap.set("n", "<leader>b]", function()
|
||||
require("bufferline").move(1)
|
||||
end, { silent = true, desc = "Move buffer to right" })
|
||||
end,
|
||||
}
|
|
@ -1,22 +0,0 @@
|
|||
-- https://github.com/NvChad/nvim-colorizer.lua
|
||||
--- @module "lazy"
|
||||
--- @type LazySpec
|
||||
return {
|
||||
"NvChad/nvim-colorizer.lua",
|
||||
opts = {
|
||||
lazy_load = true,
|
||||
filetypes = {
|
||||
"*", -- Enable color highlighting for all files
|
||||
"!neo-tree", -- Exclude neo-tree
|
||||
},
|
||||
buftypes = {
|
||||
"*",
|
||||
"!prompt",
|
||||
"!popup",
|
||||
},
|
||||
always_update = true,
|
||||
user_default_options = {
|
||||
names = false,
|
||||
},
|
||||
},
|
||||
}
|
|
@ -1,17 +0,0 @@
|
|||
-- https://github.com/numToStr/Comment.nvim
|
||||
--- @module "lazy"
|
||||
--- @type LazySpec
|
||||
return {
|
||||
"numToStr/Comment.nvim",
|
||||
event = "VeryLazy",
|
||||
--- @module "Comment"
|
||||
--- @type CommentConfig
|
||||
opts = {
|
||||
toggler = {
|
||||
block = "gBc",
|
||||
},
|
||||
opleader = {
|
||||
block = "gB",
|
||||
},
|
||||
},
|
||||
}
|
|
@ -1,73 +0,0 @@
|
|||
-- https://github.com/stevearc/conform.nvim
|
||||
local formatters_by_ft = {
|
||||
c = { "clang-format" },
|
||||
cpp = { "clang-format" },
|
||||
go = { "goimports" },
|
||||
python = { "ruff_organize_imports", "ruff_format" },
|
||||
rust = { "rustfmt" },
|
||||
javascript = { "prettierd" },
|
||||
javascriptreact = { "prettierd" },
|
||||
typescript = { "prettierd" },
|
||||
typescriptreact = { "prettierd" },
|
||||
css = { "prettierd" },
|
||||
markdown = { "prettierd" },
|
||||
yaml = { "prettierd" },
|
||||
lua = { "stylua" },
|
||||
json = { "prettierd" },
|
||||
toml = { "taplo" },
|
||||
-- ["*"] = { "injected" },
|
||||
["_"] = { "trim_whitespace", "trim_newlines" },
|
||||
}
|
||||
|
||||
--- @module "lazy"
|
||||
--- @type LazySpec
|
||||
return {
|
||||
"stevearc/conform.nvim",
|
||||
event = { "BufWritePre" },
|
||||
cmd = { "ConformInfo" },
|
||||
keys = {
|
||||
{
|
||||
-- Customize or remove this keymap to your liking
|
||||
"<leader>f",
|
||||
function()
|
||||
require("conform").format({ async = true, lsp_fallback = true })
|
||||
end,
|
||||
mode = "",
|
||||
desc = "Format buffer",
|
||||
},
|
||||
},
|
||||
--- @module "conform"
|
||||
--- @type conform.setupOpts
|
||||
opts = {
|
||||
formatters_by_ft = formatters_by_ft,
|
||||
notify_on_error = false,
|
||||
format_on_save = function(bufnr)
|
||||
if vim.g.disable_autoformat or vim.b[bufnr].disable_autoformat then
|
||||
return
|
||||
end
|
||||
--- @type conform.FormatOpts
|
||||
return { lsp_format = "fallback" }
|
||||
end,
|
||||
},
|
||||
init = function()
|
||||
vim.api.nvim_create_user_command("FormatDisable", function(args)
|
||||
if args.bang then
|
||||
-- FormatDisable! will disable formatting just for this buffer
|
||||
vim.b.disable_autoformat = true
|
||||
else
|
||||
vim.g.disable_autoformat = true
|
||||
end
|
||||
end, {
|
||||
desc = "Disable autoformat-on-save",
|
||||
bang = true,
|
||||
})
|
||||
|
||||
vim.api.nvim_create_user_command("FormatEnable", function()
|
||||
vim.b.disable_autoformat = false
|
||||
vim.g.disable_autoformat = false
|
||||
end, {
|
||||
desc = "Re-enable autoformat-on-save",
|
||||
})
|
||||
vim.o.formatexpr = "v:lua.require'conform'.formatexpr()"
|
||||
end,
|
||||
}
|
|
@ -1,102 +0,0 @@
|
|||
-- https://github.com/mfussenegger/nvim-dap
|
||||
--- @module "lazy"
|
||||
--- @type LazySpec
|
||||
return {
|
||||
{
|
||||
enabled = false,
|
||||
"mfussenegger/nvim-dap",
|
||||
config = function()
|
||||
local dap = require("dap")
|
||||
dap.adapters.cppdbg = {
|
||||
id = "cppdbg",
|
||||
type = "executable",
|
||||
command = "OpenDebugAD7",
|
||||
}
|
||||
|
||||
dap.configurations.cpp = {
|
||||
{
|
||||
name = "Launch file",
|
||||
type = "cppdbg",
|
||||
request = "launch",
|
||||
program = function()
|
||||
return vim.fn.input("Path to executable: ", vim.fn.getcwd() .. "/", "file")
|
||||
end,
|
||||
cwd = "${workspaceFolder}",
|
||||
-- stopAtEntry = true,
|
||||
},
|
||||
-- {
|
||||
-- name = "Attach to gdbserver :1234",
|
||||
-- type = "cppdbg",
|
||||
-- request = "launch",
|
||||
-- MIMode = "gdb",
|
||||
-- miDebuggerServerAddress = "localhost:1234",
|
||||
-- miDebuggerPath = "/usr/bin/gdb",
|
||||
-- cwd = "${workspaceFolder}",
|
||||
--
|
||||
-- program = function()
|
||||
-- return vim.fn.input("Path to executable: ", vim.fn.getcwd() .. "/", "file")
|
||||
-- end,
|
||||
-- },
|
||||
}
|
||||
|
||||
dap.configurations.c = dap.configurations.cpp
|
||||
dap.configurations.rust = dap.configurations.cpp
|
||||
|
||||
dap.defaults.fallback.force_external_terminal = true
|
||||
dap.defaults.fallback.external_terminal = {
|
||||
command = "tmux",
|
||||
args = { "new-window" },
|
||||
}
|
||||
|
||||
vim.keymap.set("n", "<F5>", function()
|
||||
require("dap").continue()
|
||||
end, { desc = "Continue" })
|
||||
vim.keymap.set("n", "<F10>", function()
|
||||
require("dap").step_over()
|
||||
end, { desc = "Step over" })
|
||||
vim.keymap.set("n", "<F11>", function()
|
||||
require("dap").step_into()
|
||||
end, { desc = "Step into" })
|
||||
vim.keymap.set("n", "<F12>", function()
|
||||
require("dap").step_out()
|
||||
end, { desc = "Step out" })
|
||||
vim.keymap.set("n", "<Leader>bp", function()
|
||||
require("dap").toggle_breakpoint()
|
||||
end, { desc = "Breakpoint" })
|
||||
-- vim.keymap.set("n", "<Leader>lp", function()
|
||||
-- require("dap").set_breakpoint(nil, nil, vim.fn.input("Log point message: "))
|
||||
-- end)
|
||||
vim.keymap.set("n", "<Leader>dr", function()
|
||||
require("dap").repl.open()
|
||||
end, { desc = "Debug repl" })
|
||||
-- vim.keymap.set("n", "<Leader>dl", function()
|
||||
-- require("dap").run_last()
|
||||
-- end)
|
||||
vim.keymap.set({ "n", "v" }, "<Leader>dh", function()
|
||||
require("dap.ui.widgets").hover()
|
||||
end, { desc = "Debug hover" })
|
||||
vim.keymap.set("n", "<Leader>df", function()
|
||||
local widgets = require("dap.ui.widgets")
|
||||
widgets.centered_float(widgets.frames)
|
||||
end, { desc = "Debug frames" })
|
||||
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = "dap-float",
|
||||
callback = function()
|
||||
vim.api.nvim_buf_set_keymap(0, "n", "q", "<cmd>close!<CR>", { noremap = true, silent = true })
|
||||
end,
|
||||
})
|
||||
end,
|
||||
},
|
||||
{
|
||||
enabled = false,
|
||||
"theHamsta/nvim-dap-virtual-text",
|
||||
dependencies = {
|
||||
"mfussenegger/nvim-dap",
|
||||
},
|
||||
opts = {
|
||||
virt_text_pos = "eol",
|
||||
only_first_definition = false,
|
||||
},
|
||||
},
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
-- https://github.com/jinh0/eyeliner.nvim
|
||||
--- @module "lazy"
|
||||
--- @type LazySpec
|
||||
return {
|
||||
"jinh0/eyeliner.nvim",
|
||||
dependencies = {
|
||||
{
|
||||
"ellisonleao/gruvbox.nvim",
|
||||
opts = {
|
||||
overrides = {
|
||||
EyelinerPrimary = { bold = true, underline = true },
|
||||
EyelinerSecondary = { underline = true },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
opts = {
|
||||
highlight_on_key = true,
|
||||
},
|
||||
}
|
|
@ -1,16 +0,0 @@
|
|||
-- https://github.com/j-hui/fidget.nvim
|
||||
--- @module "lazy"
|
||||
--- @type LazySpec
|
||||
return {
|
||||
"j-hui/fidget.nvim",
|
||||
event = "LspAttach",
|
||||
opts = {
|
||||
notification = {
|
||||
window = {
|
||||
border = require("symbols.window").border,
|
||||
y_padding = 1,
|
||||
x_padding = 2,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
|
@ -1,73 +0,0 @@
|
|||
-- https://github.com/lewis6991/gitsigns.nvim
|
||||
--- @module "lazy"
|
||||
--- @type LazySpec
|
||||
return {
|
||||
-- Adds git related signs to the gutter, as well as utilities for managing changes
|
||||
"lewis6991/gitsigns.nvim",
|
||||
event = { "BufWritePost", "BufReadPre" },
|
||||
--- @module "gitsigns"
|
||||
--- @type Gitsigns.Config
|
||||
opts = {
|
||||
signs = {
|
||||
add = { text = "+" },
|
||||
change = { text = "~" },
|
||||
delete = { text = "_" },
|
||||
topdelete = { text = "‾" },
|
||||
changedelete = { text = "~" },
|
||||
untracked = { text = "|" },
|
||||
},
|
||||
signs_staged = {
|
||||
add = { text = "+" },
|
||||
change = { text = "~" },
|
||||
delete = { text = "_" },
|
||||
topdelete = { text = "‾" },
|
||||
changedelete = { text = "~" },
|
||||
untracked = { text = "|" },
|
||||
},
|
||||
attach_to_untracked = true,
|
||||
current_line_blame_opts = {
|
||||
virt_text_pos = "eol",
|
||||
virt_text_priority = 1,
|
||||
delay = 200,
|
||||
},
|
||||
},
|
||||
init = function()
|
||||
vim.keymap.set("n", "gs", function()
|
||||
require("gitsigns.actions").stage_hunk()
|
||||
end, { desc = "(Un)stage hunk" })
|
||||
vim.keymap.set("n", "gS", function()
|
||||
require("gitsigns.actions").stage_buffer()
|
||||
end, { desc = "Stage buffer" })
|
||||
vim.keymap.set("v", "gs", function()
|
||||
require("gitsigns.actions").stage_hunk({ vim.fn.line("."), vim.fn.line("v") })
|
||||
end, { desc = "(Un)stage selection" })
|
||||
|
||||
vim.keymap.set("n", "gd", function()
|
||||
require("gitsigns.actions").preview_hunk()
|
||||
end, { desc = "Diff hunk" })
|
||||
|
||||
vim.keymap.set("n", "<leader>tb", function()
|
||||
require("gitsigns.actions").toggle_current_line_blame()
|
||||
end, { desc = "Line blame" })
|
||||
vim.keymap.set("n", "gb", function()
|
||||
require("gitsigns.actions").blame_line()
|
||||
end, { desc = "View blame" })
|
||||
|
||||
vim.keymap.set("n", "<leader>gr", function()
|
||||
require("gitsigns.actions").reset_hunk()
|
||||
end, { desc = "Reset hunk" })
|
||||
vim.keymap.set("n", "<leader>gR", function()
|
||||
require("gitsigns.actions").reset_buffer()
|
||||
end, { desc = "Reset buffer" })
|
||||
vim.keymap.set("v", "<leader>gr", function()
|
||||
require("gitsigns.actions").reset_hunk({ vim.fn.line("."), vim.fn.line("v") })
|
||||
end, { desc = "Git reset selection" })
|
||||
|
||||
vim.keymap.set("n", "]g", function()
|
||||
require("gitsigns.actions").nav_hunk("next")
|
||||
end, { desc = "Next hunk" })
|
||||
vim.keymap.set("n", "[g", function()
|
||||
require("gitsigns.actions").nav_hunk("prev")
|
||||
end, { desc = "Previous hunk" })
|
||||
end,
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
-- https://github.com/NMAC427/guess-indent.nvim
|
||||
--- @module "lazy"
|
||||
--- @type LazySpec
|
||||
return {
|
||||
"NMAC427/guess-indent.nvim",
|
||||
cmd = "GuessIndent",
|
||||
event = { "BufReadPre" },
|
||||
--- @module "guess-indent"
|
||||
--- @type GuessIndentConfig
|
||||
opts = {},
|
||||
}
|
|
@ -1,14 +0,0 @@
|
|||
-- https://github.com/smjonas/inc-rename.nvim
|
||||
--- @module "lazy"
|
||||
--- @type LazySpec
|
||||
return {
|
||||
"smjonas/inc-rename.nvim",
|
||||
cmd = "IncRename",
|
||||
-- We can't load on just the command otherwise the preview does not work
|
||||
event = "LspAttach",
|
||||
--- @module "inc_rename"
|
||||
--- @type inc_rename.UserConfig
|
||||
opts = {
|
||||
preview_empty_name = true,
|
||||
},
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
-- https://github.com/diogo464/kubernetes.nvim
|
||||
--- @module "lazy"
|
||||
--- @type LazySpec
|
||||
return {
|
||||
"diogo464/kubernetes.nvim",
|
||||
ft = "yaml",
|
||||
opts = {
|
||||
schema_strict = true,
|
||||
schema_generate_always = false,
|
||||
},
|
||||
}
|
|
@ -1,16 +0,0 @@
|
|||
-- https://github.com/folke/lazydev.nvim
|
||||
--- @module "lazy"
|
||||
--- @type LazySpec
|
||||
return {
|
||||
"folke/lazydev.nvim",
|
||||
ft = "lua",
|
||||
--- @module "lazydev"
|
||||
--- @type lazydev.Config
|
||||
opts = {
|
||||
library = {
|
||||
-- See the configuration section for more details
|
||||
-- Load luvit types when the `vim.uv` word is found
|
||||
{ path = "${3rd}/luv/library", words = { "vim%.uv" } },
|
||||
},
|
||||
},
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
-- https://github.com/neovim/nvim-lspconfig
|
||||
--- @module "lazy"
|
||||
--- @type LazySpec
|
||||
return {
|
||||
"neovim/nvim-lspconfig",
|
||||
cmd = { "LspInfo", "LspStart", "LspStop", "LspRestart" },
|
||||
}
|
|
@ -1,55 +0,0 @@
|
|||
-- https://github.com/nvim-lualine/lualine.nvim
|
||||
|
||||
local function get_schema()
|
||||
if vim.bo.filetype ~= "yaml" then
|
||||
return ""
|
||||
end
|
||||
|
||||
local schema = require("schema-companion.context").get_buffer_schema()
|
||||
if schema.name == "none" then
|
||||
return ""
|
||||
end
|
||||
return schema.name
|
||||
end
|
||||
|
||||
--- @module "lazy"
|
||||
--- @type LazySpec
|
||||
return {
|
||||
"nvim-lualine/lualine.nvim",
|
||||
opts = {
|
||||
options = {
|
||||
icons_enabled = true,
|
||||
theme = "gruvbox",
|
||||
component_separators = { left = "", right = "" },
|
||||
section_separators = { left = "", right = "" },
|
||||
},
|
||||
sections = {
|
||||
lualine_b = {
|
||||
"branch",
|
||||
"diff",
|
||||
{
|
||||
"diagnostics",
|
||||
symbols = require("symbols.diagnostic"),
|
||||
},
|
||||
},
|
||||
lualine_c = {
|
||||
{
|
||||
"filename",
|
||||
path = 1,
|
||||
symbols = require("symbols.file"),
|
||||
},
|
||||
},
|
||||
lualine_x = {
|
||||
"encoding",
|
||||
{ "fileformat", icons_enabled = false },
|
||||
"filetype",
|
||||
get_schema,
|
||||
},
|
||||
},
|
||||
inactive_sections = {
|
||||
lualine_c = {
|
||||
{ "filename", path = 1 },
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
-- https://github.com/mason-org/mason-lspconfig.nvim
|
||||
--- @module "lazy"
|
||||
--- @type LazySpec
|
||||
return {
|
||||
"mason-org/mason-lspconfig.nvim",
|
||||
cmd = { "LspInstall", "LspUninstall" },
|
||||
event = { "BufNewFile", "BufReadPre" },
|
||||
--- @module "mason-lspconfig"
|
||||
--- @type MasonLspconfigSettings
|
||||
opts = {},
|
||||
dependencies = {
|
||||
"mason-org/mason.nvim",
|
||||
"neovim/nvim-lspconfig",
|
||||
},
|
||||
}
|
|
@ -1,49 +0,0 @@
|
|||
--- https://github.com/WhoIsSethDaniel/mason-tool-installer.nvim
|
||||
local ensure_installed = {
|
||||
-- LSP
|
||||
"typos_lsp",
|
||||
"clangd",
|
||||
"basedpyright",
|
||||
"lua_ls",
|
||||
{
|
||||
"gopls",
|
||||
condition = function()
|
||||
return vim.fn.executable("go") > 0
|
||||
end,
|
||||
},
|
||||
"jsonls",
|
||||
"yamlls",
|
||||
"taplo",
|
||||
"neocmake",
|
||||
-- Formatter
|
||||
"clang-format",
|
||||
{
|
||||
"goimports",
|
||||
condition = function()
|
||||
return vim.fn.executable("go") > 0
|
||||
end,
|
||||
},
|
||||
"ruff",
|
||||
"prettierd",
|
||||
"stylua",
|
||||
}
|
||||
|
||||
--- @module "lazy"
|
||||
--- @type LazySpec
|
||||
return {
|
||||
"WhoIsSethDaniel/mason-tool-installer.nvim",
|
||||
dependencies = {
|
||||
"mason-org/mason.nvim",
|
||||
},
|
||||
event = "VeryLazy",
|
||||
opts = {
|
||||
ensure_installed = ensure_installed,
|
||||
auto_update = true,
|
||||
},
|
||||
config = function(_, opts)
|
||||
require("mason-tool-installer").setup(opts)
|
||||
|
||||
-- VeryLazy happens _after_ VimEnter, so we have to manually call this
|
||||
require("mason-tool-installer").run_on_start()
|
||||
end,
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
-- https://github.com/mason-org/mason.nvim
|
||||
--- @module "lazy"
|
||||
--- @type LazySpec
|
||||
return {
|
||||
"mason-org/mason.nvim",
|
||||
cmd = { "Mason", "MasonUpdate", "MasonInstall", "MasonUninstall", "MasonUninstallAll", "MasonLog" },
|
||||
--- @module "mason"
|
||||
--- @type MasonSettings
|
||||
opts = {},
|
||||
}
|
|
@ -1,102 +0,0 @@
|
|||
-- https://github.com/nvim-neo-tree/neo-tree.nvim
|
||||
local fold = require("symbols.fold")
|
||||
local file = require("symbols.file")
|
||||
|
||||
--- @module "lazy"
|
||||
--- @type LazySpec
|
||||
return {
|
||||
"nvim-neo-tree/neo-tree.nvim",
|
||||
branch = "v3.x",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"MunifTanjim/nui.nvim",
|
||||
},
|
||||
cmd = { "Neotree" },
|
||||
keys = {
|
||||
{ "<F2>", "<cmd>Neotree toggle reveal<cr>", desc = "Open floating Neo-tree window" },
|
||||
},
|
||||
-- netrw hijack does not work when lazy loading
|
||||
lazy = false,
|
||||
--- @module "neo-tree"
|
||||
--- @type neotree.Config
|
||||
opts = {
|
||||
close_if_last_window = true,
|
||||
popup_border_style = require("symbols.window").border,
|
||||
source_selector = {
|
||||
winbar = true,
|
||||
show_scrolled_off_parent_node = true,
|
||||
sources = {
|
||||
{
|
||||
source = "filesystem",
|
||||
display_name = " Files ",
|
||||
},
|
||||
{
|
||||
source = "buffers",
|
||||
display_name = " Buffers ",
|
||||
},
|
||||
{
|
||||
source = "git_status",
|
||||
display_name = " Git ",
|
||||
},
|
||||
},
|
||||
show_separator_on_edge = true,
|
||||
},
|
||||
default_component_configs = {
|
||||
diagnostics = {
|
||||
highlights = {
|
||||
hint = "DiagnosticHint",
|
||||
info = "DiagnosticInfo",
|
||||
warn = "DiagnosticWarn",
|
||||
error = "DiagnosticError",
|
||||
},
|
||||
},
|
||||
icon = {
|
||||
folder_closed = fold.closed,
|
||||
folder_open = fold.open,
|
||||
folder_empty = fold.empty,
|
||||
folder_empty_open = fold.open,
|
||||
default = file.icon,
|
||||
},
|
||||
modified = {
|
||||
symbol = file.modified,
|
||||
},
|
||||
name = {
|
||||
use_git_status_colors = false,
|
||||
},
|
||||
git_status = {
|
||||
symbols = require("symbols.git"),
|
||||
},
|
||||
type = {
|
||||
enabled = false,
|
||||
},
|
||||
last_modified = {
|
||||
enabled = false,
|
||||
},
|
||||
symlink_target = {
|
||||
enabled = true,
|
||||
},
|
||||
},
|
||||
filesystem = {
|
||||
follow_current_file = {
|
||||
enabled = true,
|
||||
},
|
||||
hijack_netrw_behavior = "open_current",
|
||||
use_libuv_file_watcher = true,
|
||||
scan_mode = "deep",
|
||||
},
|
||||
window = {
|
||||
popup = {
|
||||
title = function()
|
||||
return ""
|
||||
end,
|
||||
},
|
||||
position = "float",
|
||||
mappings = {
|
||||
["<C-c>"] = "close_window",
|
||||
["<esc>"] = "close_window",
|
||||
["<tab>"] = "next_source",
|
||||
["<S-tab>"] = "prev_source",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user