Neovim 0.5.0 migration #1

Merged
esensar merged 75 commits from neovim-0.5.0 into main 2021-07-05 09:34:51 +00:00
199 changed files with 2714 additions and 10710 deletions

View File

@ -143,6 +143,7 @@ link_vim: check_os
@echo "Linking vim files..."
$(call link,vim,.vim)
$(call link,ideavimrc,.ideavimrc)
$(call link,vsvimrc,.vsvimrc)
.PHONY: link_apps_config
link_apps_config: check_os
@ -296,8 +297,10 @@ install_asdf: check_os
.PHONY: install_vim
install_vim: check_os link_vim
@echo "Installing vim packages..."
@echo "\n\n\n" | vim +PlugInstall +qall
@echo "Vim package installation is no longer done automatically!"
@echo "Start Vim or NeoVim and run:"
@echo "For NeoVim: :PackerInstall"
@echo "For Vim: :PlugInstall"
.PHONY: oh_my_zsh
oh_my_zsh: check_os

View File

@ -1,9 +1,7 @@
azote
bitwarden-bin
libspotify
nerd-fonts-source-code-pro
nwg-launchers
python-pyspotify
slack-desktop
spotify
todoist-electron
todoist-appimage
ulauncher

View File

@ -18,9 +18,7 @@ flex
gcc
git
gnome-themes-extra
grub
gtk-chtheme
intel-ucode
kdeconnect
libtool
linux
@ -33,9 +31,7 @@ mesa
ncmpcpp
neovim
newsboat
ntfs-3g
openssh
os-prober
patch
pkgconf
pulseaudio
@ -43,7 +39,6 @@ pulseaudio-alsa
python-pip
python2
python2-pip
ranger
sudo
sway
swayidle

View File

@ -43,6 +43,8 @@ flutter/
ibus
pulse
discord
lutris
cef_user_data
QtProject.conf
QtProject/
@ -62,3 +64,10 @@ stetic
xbuild
Bitwarden
kwalletrc
Thunar
xfce4
Element
NuGet
Microsoft*
.mono
tlpui

View File

@ -3,6 +3,6 @@
<version>1</version>
</component>
<component name="whatsNew">
<shownVersion>4.1.1</shownVersion>
<shownVersion>4.1.2</shownVersion>
</component>
</application>

View File

@ -1,21 +1,6 @@
<code_scheme name="Default" version="173">
<JetCodeStyleSettings>
<option name="PACKAGES_TO_USE_STAR_IMPORTS">
<value>
<package name="java.util" alias="false" withSubpackages="false" />
<package name="kotlinx.android.synthetic" alias="false" withSubpackages="true" />
<package name="io.ktor" alias="false" withSubpackages="true" />
</value>
</option>
<option name="PACKAGES_IMPORT_LAYOUT">
<value>
<package name="" alias="false" withSubpackages="true" />
<package name="java" alias="false" withSubpackages="true" />
<package name="javax" alias="false" withSubpackages="true" />
<package name="kotlin" alias="false" withSubpackages="true" />
<package name="" alias="true" withSubpackages="true" />
</value>
</option>
<option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" />
</JetCodeStyleSettings>
<codeStyleSettings language="XML">
<option name="FORCE_REARRANGE_MODE" value="1" />
@ -130,4 +115,7 @@
</rules>
</arrangement>
</codeStyleSettings>
<codeStyleSettings language="kotlin">
<option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" />
</codeStyleSettings>
</code_scheme>

View File

@ -3,6 +3,6 @@
<version>1</version>
</component>
<component name="whatsNew">
<shownVersion>4.2.0rc18</shownVersion>
<shownVersion>4.2.0rc21</shownVersion>
</component>
</application>

View File

@ -1 +0,0 @@
org.jetbrains.kotlin

View File

@ -0,0 +1,3 @@
<profile version="1.0">
<option name="myName" value="Default" />
</profile>

View File

@ -1,6 +1,6 @@
<application>
<component name="DefaultFont">
<option name="FONT_SIZE" value="13" />
<option name="FONT_FAMILY" value="SauceCodePro Nerd Font" />
<option name="FONT_FAMILY" value="SauceCodePro Nerd Font Mono" />
</component>
</application>

View File

@ -2,6 +2,7 @@
<component name="FileTypeManager" version="18">
<extensionMap>
<mapping ext="gradle.kts" type="Kotlin" />
<mapping ext="klib" type="ARCHIVE" />
<mapping ext="main.kts" type="Kotlin" />
<removed_mapping ext="apk" approved="true" type="ARCHIVE" />
<removed_mapping ext="psd" approved="true" type="Image" />

View File

@ -151,7 +151,6 @@
<plugin>
<option name="myPluginId" value="org.jetbrains.kotlin" />
<option name="myPluginName" value="Kotlin" />
<option name="myBundled" value="true" />
</plugin>
</value>
</entry>
@ -538,7 +537,6 @@
<plugin>
<option name="myPluginId" value="org.jetbrains.kotlin" />
<option name="myPluginName" value="Kotlin" />
<option name="myBundled" value="true" />
</plugin>
</value>
</entry>
@ -556,7 +554,6 @@
<plugin>
<option name="myPluginId" value="org.jetbrains.kotlin" />
<option name="myPluginName" value="Kotlin" />
<option name="myBundled" value="true" />
</plugin>
</value>
</entry>
@ -565,7 +562,6 @@
<plugin>
<option name="myPluginId" value="org.jetbrains.kotlin" />
<option name="myPluginName" value="Kotlin" />
<option name="myBundled" value="true" />
</plugin>
</value>
</entry>
@ -574,7 +570,6 @@
<plugin>
<option name="myPluginId" value="org.jetbrains.kotlin" />
<option name="myPluginName" value="Kotlin" />
<option name="myBundled" value="true" />
</plugin>
</value>
</entry>
@ -583,7 +578,6 @@
<plugin>
<option name="myPluginId" value="org.jetbrains.kotlin" />
<option name="myPluginName" value="Kotlin" />
<option name="myBundled" value="true" />
</plugin>
</value>
</entry>
@ -592,7 +586,6 @@
<plugin>
<option name="myPluginId" value="org.jetbrains.kotlin" />
<option name="myPluginName" value="Kotlin" />
<option name="myBundled" value="true" />
</plugin>
</value>
</entry>
@ -601,7 +594,6 @@
<plugin>
<option name="myPluginId" value="org.jetbrains.kotlin" />
<option name="myPluginName" value="Kotlin" />
<option name="myBundled" value="true" />
</plugin>
</value>
</entry>

View File

@ -42,8 +42,8 @@
</ViewImpl>
<TabImpl>
<option name="displayName" value="Debugger" />
<option name="leftProportion" value="0.19978343" />
<option name="rightProportion" value="0.19978343" />
<option name="leftProportion" value="0.19956498" />
<option name="rightProportion" value="0.19956498" />
</TabImpl>
<TabImpl>
<option name="bottomProportion" value="0.0" />

View File

@ -0,0 +1,5 @@
<application>
<component name="UISettings">
<option name="OVERRIDE_NONIDEA_LAF_FONTS" value="true" />
</component>
</application>

View File

@ -1 +0,0 @@
nugetorgadd.trk

View File

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
</packageSources>
</configuration>

View File

@ -6,4 +6,4 @@ Contains configurations for many applications, most importantly:
- `sway` - Wayland compositor
- `newsboat` - my RSS reader
- `alacritty` - my terminal emulator
- `coc` - `coc.nvim` plugin settings for `neovim`
- `coc` - `coc.nvim` plugin settings for `vim`

View File

@ -3,3 +3,4 @@ alt_send_esc: true
import:
- ~/.config/alacritty/font.yml
- ~/.config/alacritty/colors.yml
- ~/.config/alacritty/keymap.yml

View File

@ -0,0 +1,76 @@
key_bindings:
- { key: A, mods: Alt, chars: "\x1ba" }
- { key: B, mods: Alt, chars: "\x1bb" }
- { key: C, mods: Alt, chars: "\x1bc" }
- { key: D, mods: Alt, chars: "\x1bd" }
- { key: E, mods: Alt, chars: "\x1be" }
- { key: F, mods: Alt, chars: "\x1bf" }
- { key: G, mods: Alt, chars: "\x1bg" }
- { key: H, mods: Alt, chars: "\x1bh" }
- { key: I, mods: Alt, chars: "\x1bi" }
- { key: J, mods: Alt, chars: "\x1bj" }
- { key: K, mods: Alt, chars: "\x1bk" }
- { key: L, mods: Alt, chars: "\x1bl" }
- { key: M, mods: Alt, chars: "\x1bm" }
- { key: N, mods: Alt, chars: "\x1bn" }
- { key: O, mods: Alt, chars: "\x1bo" }
- { key: P, mods: Alt, chars: "\x1bp" }
- { key: Q, mods: Alt, chars: "\x1bq" }
- { key: R, mods: Alt, chars: "\x1br" }
- { key: S, mods: Alt, chars: "\x1bs" }
- { key: T, mods: Alt, chars: "\x1bt" }
- { key: U, mods: Alt, chars: "\x1bu" }
- { key: V, mods: Alt, chars: "\x1bv" }
- { key: W, mods: Alt, chars: "\x1bw" }
- { key: X, mods: Alt, chars: "\x1bx" }
- { key: Y, mods: Alt, chars: "\x1by" }
- { key: Z, mods: Alt, chars: "\x1bz" }
- { key: A, mods: Alt|Shift, chars: "\x1bA" }
- { key: B, mods: Alt|Shift, chars: "\x1bB" }
- { key: C, mods: Alt|Shift, chars: "\x1bC" }
- { key: D, mods: Alt|Shift, chars: "\x1bD" }
- { key: E, mods: Alt|Shift, chars: "\x1bE" }
- { key: F, mods: Alt|Shift, chars: "\x1bF" }
- { key: G, mods: Alt|Shift, chars: "\x1bG" }
- { key: H, mods: Alt|Shift, chars: "\x1bH" }
- { key: I, mods: Alt|Shift, chars: "\x1bI" }
- { key: J, mods: Alt|Shift, chars: "\x1bJ" }
- { key: K, mods: Alt|Shift, chars: "\x1bK" }
- { key: L, mods: Alt|Shift, chars: "\x1bL" }
- { key: M, mods: Alt|Shift, chars: "\x1bM" }
- { key: N, mods: Alt|Shift, chars: "\x1bN" }
- { key: O, mods: Alt|Shift, chars: "\x1bO" }
- { key: P, mods: Alt|Shift, chars: "\x1bP" }
- { key: Q, mods: Alt|Shift, chars: "\x1bQ" }
- { key: R, mods: Alt|Shift, chars: "\x1bR" }
- { key: S, mods: Alt|Shift, chars: "\x1bS" }
- { key: T, mods: Alt|Shift, chars: "\x1bT" }
- { key: U, mods: Alt|Shift, chars: "\x1bU" }
- { key: V, mods: Alt|Shift, chars: "\x1bV" }
- { key: W, mods: Alt|Shift, chars: "\x1bW" }
- { key: X, mods: Alt|Shift, chars: "\x1bX" }
- { key: Y, mods: Alt|Shift, chars: "\x1bY" }
- { key: Z, mods: Alt|Shift, chars: "\x1bZ" }
- { key: Key1, mods: Alt, chars: "\x1b1" }
- { key: Key2, mods: Alt, chars: "\x1b2" }
- { key: Key3, mods: Alt, chars: "\x1b3" }
- { key: Key4, mods: Alt, chars: "\x1b4" }
- { key: Key5, mods: Alt, chars: "\x1b5" }
- { key: Key6, mods: Alt, chars: "\x1b6" }
- { key: Key7, mods: Alt, chars: "\x1b7" }
- { key: Key8, mods: Alt, chars: "\x1b8" }
- { key: Key9, mods: Alt, chars: "\x1b9" }
- { key: Key0, mods: Alt, chars: "\x1b0" }
- { key: Space, mods: Control, chars: "\x00" } # Ctrl + Space
- { key: Grave, mods: Alt, chars: "\x1b`" } # Alt + `
- { key: Grave, mods: Alt|Shift, chars: "\x1b~" } # Alt + ~
- { key: Period, mods: Alt, chars: "\x1b." } # Alt + .
- { key: Key8, mods: Alt|Shift, chars: "\x1b*" } # Alt + *
- { key: Key3, mods: Alt|Shift, chars: "\x1b#" } # Alt + #
- { key: Period, mods: Alt|Shift, chars: "\x1b>" } # Alt + >
- { key: Comma, mods: Alt|Shift, chars: "\x1b<" } # Alt + <
- { key: Minus, mods: Alt|Shift, chars: "\x1b_" } # Alt + _
- { key: Key5, mods: Alt|Shift, chars: "\x1b%" } # Alt + %
- { key: Key6, mods: Alt|Shift, chars: "\x1b^" } # Alt + ^
- { key: Backslash, mods: Alt, chars: "\x1b\\" } # Alt + \
- { key: Backslash, mods: Alt|Shift, chars: "\x1b|" } # Alt + |

View File

@ -0,0 +1,367 @@
# This is the default config file.
# It also shows all the default values, if you don't create the file.
# All URL values may omit the scheme and/or port, as well as the beginning double slash
# Valid URL examples:
# gemini://example.com
# //example.com
# example.com
# example.com:123
[a-general]
# Press Ctrl-H to access it
home = "gemini://gemini.circumlunar.space"
# Follow up to 5 Gemini redirects without prompting.
# A prompt is always shown after the 5th redirect and for redirects to protocols other than Gemini.
# If set to false, a prompt will be shown before following redirects.
auto_redirect = false
# What command to run to open a HTTP(S) URL.
# Set to "default" to try to guess the browser, or set to "off" to not open HTTP(S) URLs.
# If a command is set, than the URL will be added (in quotes) to the end of the command.
# A space will be prepended to the URL.
#
# The best to define a command is using a string array.
# Examples:
# http = ['firefox']
# http = ['custom-browser', '--flag', '--option=2']
# http = ['/path/with spaces/in it/firefox']
#
# Note the use of single quotes, so that backslashes will not be escaped.
# Using just a string will also work, but it is deprecated, and will degrade if
# you use paths with spaces.
http = 'default'
# Any URL that will accept a query string can be put here
search = "gemini://gus.guru/search"
# Whether colors will be used in the terminal
color = true
# Whether ANSI color codes from the page content should be rendered
ansi = true
# Whether to replace list asterisks with unicode bullets
bullets = true
# Whether to show link after link text
show_link = false
# A number from 0 to 1, indicating what percentage of the terminal width the left margin should take up.
left_margin = 0.15
# The max number of columns to wrap a page's text to. Preformatted blocks are not wrapped.
max_width = 100
# 'downloads' is the path to a downloads folder.
# An empty value means the code will find the default downloads folder for your system.
# If the path does not exist it will be created.
# Note the use of single quotes, so that backslashes will not be escaped.
downloads = ''
# Max size for displayable content in bytes - after that size a download window pops up
page_max_size = 2097152 # 2 MiB
# Max time it takes to load a page in seconds - after that a download window pops up
page_max_time = 10
# Whether to replace tab numbers with emoji favicons, which are cached.
emoji_favicons = false
# When a scrollbar appears. "never", "auto", and "always" are the only valid values.
# "auto" means the scrollbar only appears when the page is longer than the window.
scrollbar = "auto"
[auth]
# Authentication settings
# Note the use of single quotes for values, so that backslashes will not be escaped.
[auth.certs]
# Client certificates
# Set domain name equal to path to client cert
# "example.com" = 'mycert.crt'
[auth.keys]
# Client certificate keys
# Set domain name equal to path to key for the client cert above
# "example.com" = 'mycert.key'
[keybindings]
# If you have a non-US keyboard, use bind_tab1 through bind_tab0 to
# setup the shift-number bindings: Eg, for US keyboards (the default):
# bind_tab1 = "!"
# bind_tab2 = "@"
# bind_tab3 = "#"
# bind_tab4 = "$"
# bind_tab5 = "%"
# bind_tab6 = "^"
# bind_tab7 = "&"
# bind_tab8 = "*"
# bind_tab9 = "("
# bind_tab0 = ")"
# Whitespace is not allowed in any of the keybindings! Use 'Space' and 'Tab' to bind to those keys.
# Multiple keys can be bound to one command, just use a TOML array.
# To add the Alt modifier, the binding must start with Alt-, should be reasonably universal
# Ctrl- won't work on all keys, see this for a list:
# https://github.com/gdamore/tcell/blob/cb1e5d6fa606/key.go#L83
# An example of a TOML array for multiple keys being bound to one command is the default
# binding for reload:
# bind_reload = ["R","Ctrl-R"]
# One thing to note here is that "R" is capitalization sensitive, so it means shift-r.
# "Ctrl-R" means both ctrl-r and ctrl-shift-R (this is a quirk of what ctrl-r means on
# an ANSI terminal)
# The default binding for opening the bottom bar for entering a URL or link number is:
# bind_bottom = "Space"
# This is how to get the Spacebar as a keybinding, if you try to use " ", it won't work.
# And, finally, an example of a simple, unmodified character is:
# bind_edit = "e"
# This binds the "e" key to the command to edit the current URL.
# The bind_link[1-90] options are for the commands to go to the first 10 links on a page,
# typically these are bound to the number keys:
# bind_link1 = "1"
# bind_link2 = "2"
# bind_link3 = "3"
# bind_link4 = "4"
# bind_link5 = "5"
# bind_link6 = "6"
# bind_link7 = "7"
# bind_link8 = "8"
# bind_link9 = "9"
# bind_link0 = "0"
# All keybindings:
#
# bind_bottom
# bind_edit
# bind_home
# bind_bookmarks
# bind_add_bookmark
# bind_save
# bind_reload
# bind_back
# bind_forward
# bind_pgup
# bind_pgdn
# bind_new_tab
# bind_close_tab
# bind_next_tab
# bind_prev_tab
# bind_quit
# bind_help
# bind_sub: for viewing the subscriptions page
# bind_add_sub
[url-handlers]
# Allows setting the commands to run for various URL schemes.
# E.g. to open FTP URLs with FileZilla set the following key:
# ftp = 'filezilla'
# You can set any scheme to "off" or "" to disable handling it, or
# just leave the key unset.
#
# DO NOT use this for setting the HTTP command.
# Use the http setting in the "a-general" section above.
#
# NOTE: These settings are overrided by the ones in the proxies section.
# Note the use of single quotes, so that backslashes will not be escaped.
# This is a special key that defines the handler for all URL schemes for which
# no handler is defined.
other = 'off'
# [[mediatype-handlers]] section
# ---------------------------------
#
# Specify what applications will open certain media types.
# By default your default application will be used to open the file when you select "Open".
# You only need to configure this section if you want to override your default application,
# or do special things like streaming.
#
# Note the use of single quotes for commands, so that backslashes will not be escaped.
#
#
# To open jpeg files with the feh command:
#
# [[mediatype-handlers]]
# cmd = ['feh']
# types = ["image/jpeg"]
#
# Each command that you specify must come under its own [[mediatype-handlers]]. You may
# specify as many [[mediatype-handlers]] as you want to setup multiple commands.
#
# If the subtype is omitted then the specified command will be used for the
# entire type:
#
# [[mediatype-handlers]]
# command = ['vlc', '--flag']
# types = ["audio", "video"]
#
# A catch-all handler can by specified with "*".
# Note that there are already catch-all handlers in place for all OSes,
# that open the file using your default application. This is only if you
# want to override that.
#
# [[mediatype-handlers]]
# cmd = ['some-command']
# types = [
# "application/pdf",
# "*",
# ]
#
# You can also choose to stream the data instead of downloading it all before
# opening it. This is especially useful for large video or audio files, as
# well as radio streams, which will never complete. You can do this like so:
#
# [[mediatype-handlers]]
# cmd = ['vlc', '-']
# types = ["audio", "video"]
# stream = true
#
# This uses vlc to stream all video and audio content.
# By default stream is set to off for all handlers
#
#
# If you want to always open a type in its viewer without the download or open
# prompt appearing, you can add no_prompt = true
#
# [[mediatype-handlers]]
# cmd = ['feh']
# types = ["image"]
# no_prompt = true
#
# Note: Multiple handlers cannot be defined for the same full media type, but
# still there needs to be an order for which handlers are used. The following
# order applies regardless of the order written in the config:
#
# 1. Full media type: "image/jpeg"
# 2. Just type: "image"
# 3. Catch-all: "*"
[cache]
# Options for page cache - which is only for text pages
# Increase the cache size to speed up browsing at the expense of memory
# Zero values mean there is no limit
max_size = 0 # Size in bytes
max_pages = 30 # The maximum number of pages the cache will store
# How long a page will stay in cache, in seconds.
timeout = 1800 # 30 mins
[proxies]
# Allows setting a Gemini proxy for different schemes.
# The settings are similar to the url-handlers section above.
# E.g. to open a gopher page by connecting to a Gemini proxy server:
# gopher = "example.com:123"
#
# Port 1965 is assumed if no port is specified.
#
# NOTE: These settings override any external handlers specified in
# the url-handlers section.
#
# Note that HTTP and HTTPS are treated as separate protocols here.
[subscriptions]
# For tracking feeds and pages
# Whether a pop-up appears when viewing a potential feed
popup = true
# How often to check for updates to subscriptions in the background, in seconds.
# Set it to 0 to disable this feature. You can still update individual feeds
# manually, or restart the browser.
#
# Note Amfora will check for updates on browser start no matter what this setting is.
update_interval = 1800 # 30 mins
# How many subscriptions can be checked at the same time when updating.
# If you have many subscriptions you may want to increase this for faster
# update times. Any value below 1 will be corrected to 1.
workers = 3
# The number of subscription updates displayed per page.
entries_per_page = 20
[theme]
# This section is for changing the COLORS used in Amfora.
# These colors only apply if 'color' is enabled above.
# Colors can be set using a W3C color name, or a hex value such as "#ffffff".
# Note that not all colors will work on terminals that do not have truecolor support.
# If you want to stick to the standard 16 or 256 colors, you can get
# a list of those here: https://jonasjacek.github.io/colors/
# DO NOT use the names from that site, just the hex codes.
# Definitions:
# bg = background
# fg = foreground
# dl = download
# btn = button
# hdg = heading
# bkmk = bookmark
# modal = a popup window/box in the middle of the screen
# EXAMPLES:
# hdg_1 = "green"
# hdg_2 = "#5f0000"
# Available keys to set:
# bg: background for pages, tab row, app in general
# tab_num: The number/highlight of the tabs at the top
# tab_divider: The color of the divider character between tab numbers: |
# bottombar_label: The color of the prompt that appears when you press space
# bottombar_text: The color of the text you type
# bottombar_bg
# scrollbar: The scrollbar that appears on the right for long pages
# hdg_1
# hdg_2
# hdg_3
# amfora_link: A link that Amfora supports viewing. For now this is only gemini://
# foreign_link: HTTP(S), Gopher, etc
# link_number: The silver number that appears to the left of a link
# regular_text: Normal gemini text, and plaintext documents
# quote_text
# preformatted_text
# list_text
# btn_bg: The bg color for all modal buttons
# btn_text: The text color for all modal buttons
# dl_choice_modal_bg
# dl_choice_modal_text
# dl_modal_bg
# dl_modal_text
# info_modal_bg
# info_modal_text
# error_modal_bg
# error_modal_text
# yesno_modal_bg
# yesno_modal_text
# tofu_modal_bg
# tofu_modal_text
# subscription_modal_bg
# subscription_modal_text
# input_modal_bg
# input_modal_text
# input_modal_field_bg: The bg of the input field, where you type the text
# input_modal_field_text: The color of the text you type
# bkmk_modal_bg
# bkmk_modal_text
# bkmk_modal_label
# bkmk_modal_field_bg
# bkmk_modal_field_text

View File

@ -1 +0,0 @@
pynvim

View File

@ -16,7 +16,17 @@ abbr -a batdiff "git diff --name-only --diff-filter=d | xargs bat --diff"
source ~/.config/fish/platform_config/$MACHINE_TYPE.fish
source ~/.asdf/asdf.fish
if [ -f /opt/asdf-vm/asdf.sh ]
set -gx ASDF_DIR /opt/asdf-vm
set -gx ASDF_CONFIG_FILE $XDG_CONFIG_HOME/asdf/asdfrc
set -gx ASDF_DATA_DIR $XDG_DATA_HOME/asdf
source $ASDF_DIR/asdf.sh
else
source ~/.asdf/asdf.fish
if [ -f ~/.asdf/plugins/dotnet-core/set-dotnet-home.fish ]
. ~/.asdf/plugins/dotnet-core/set-dotnet-home.fish
end
end
eval (asdf exec direnv hook fish | source)

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,2 @@
editor_settings-3.tres
projects/*

View File

@ -0,0 +1,2 @@
extends %BASE%

View File

@ -0,0 +1,5 @@
extends %BASE%
func _ready()%VOID_RETURN%:
%TS%pass

View File

@ -3,7 +3,8 @@
fields=0 48 17 18 38 39 40 2 46 47 49 1
sort_key=46
sort_direction=1
hide_threads=0
tree_sort_key=0
tree_sort_direction=1
hide_kernel_threads=1
hide_userland_threads=0
shadow_other_users=0
@ -12,15 +13,27 @@ show_program_path=1
highlight_base_name=0
highlight_megabytes=1
highlight_threads=1
highlight_changes=0
highlight_changes_delay_secs=5
find_comm_in_cmdline=1
strip_exe_from_cmdline=1
show_merged_command=0
tree_view=1
tree_view_always_by_pid=0
header_margin=1
detailed_cpu_time=0
cpu_count_from_zero=0
cpu_count_from_one=1
show_cpu_usage=1
show_cpu_frequency=0
show_cpu_temperature=0
degree_fahrenheit=0
update_process_names=0
account_guest_in_cpu_meter=0
color_scheme=0
enable_mouse=1
delay=15
left_meters=AllCPUs Memory Swap
left_meter_modes=1 1 1
right_meters=Tasks LoadAverage Uptime
right_meter_modes=2 2 2
right_meters=Tasks LoadAverage Uptime Systemd
right_meter_modes=2 2 2 2
hide_function_bar=0

View File

@ -1,5 +1,194 @@
gesture: swipe right 3 xdotool key super+Tab
gesture: swipe left 3 xdotool key super+shift+Tab
# Configuration file for libinput-gestures.
# Mark Blakeney, Sep 2015
#
# The default configuration file exists at /etc/libinput-gestures.conf
# but a user can create a personal custom configuration file at
# ~/.config/libinput-gestures.conf.
#
# Lines starting with '#' and blank lines are ignored. Currently
# "gesture" and "device" configuration keywords are supported as
# described below. The keyword can optionally be appended with a ":" (to
# maintain compatibility with original format configuration files).
#
# Each gesture line has 3 [or 4] arguments separated by whitespace:
#
# action motion [finger_count] command
#
# where action and motion is either:
# swipe up
# swipe down
# swipe left
# swipe right
# swipe left_up
# swipe left_down
# swipe right_up
# swipe right_down
# pinch in
# pinch out
# pinch clockwise
# pinch anticlockwise
#
# command is the remainder of the line and is any valid shell command +
# arguments.
#
# finger_count is a single numeric digit and is optional (and is
# typically 3 or 4). If specified then the command is executed when
# exactly that number of fingers is used in the gesture. If not
# specified then the command is executed when that gesture is executed
# with any number of fingers. Gesture lines specified with finger_count
# have priority over the same gesture specified without any
# finger_count.
#
# Typically command will be _internal, or xdotool. See "man xdotool" for
# the many things you can action with that tool. Note that unfortunately
# xdotool does not work with native Wayland clients.
gesture: pinch out 5 xdotool key super+q
gesture: swupe up 3 xdotool key super+space
###############################################################################
# SWIPE GESTURES:
###############################################################################
# Note the default is an "internal" command that uses wmctrl to switch
# workspaces and, unlike xdotool, works on both Xorg and Wayland (via
# XWayland). It also can be configured for vertical and horizontal
# switching over tabular workspaces, as per the example below. You can
# also add "-w" to the internal command to allow wrapping workspaces.
# Ensure you install wmctrl if you use _internal.
# Move to next workspace (works for GNOME/KDE/etc on Wayland and Xorg)
# gesture swipe up _internal ws_up
# NOTE ABOUT FINGER COUNT:
# The above command will configure this command for all fingers (i.e. 3
# for 4) but to configure it for 3 fingers only, change it to:
# gesture swipe up 3 _internal ws_up
# Then you can configure something else for 4 fingers or leave 4 fingers
# unconfigured. You can configure an explicit finger count like this for
# all example commands in this configuration file.
#
# gesture swipe up xdotool key super+Page_Down
# Move to prev workspace (works for GNOME/KDE/etc on Wayland and Xorg)
# gesture swipe down _internal ws_down
# gesture swipe down xdotool key super+Page_Up
# Browser go forward (works only for Xorg, and Xwayland clients)
gesture swipe left swaymsg workspace next
# Browser go back (works only for Xorg, and Xwayland clients)
gesture swipe right swaymsg workspace prev
# NOTE: If you don't use "natural" scrolling direction for your touchpad
# then you may want to swap the above default left/right and up/down
# configurations.
# Optional extended swipe gestures, e.g. for browser tab navigation:
#
# Jump to next open browser tab
# gesture swipe right_up xdotool key control+Tab
#
# Jump to previous open browser tab
# gesture swipe left_up xdotool key control+shift+Tab
#
# Close current browser tab
# gesture swipe left_down xdotool key control+w
#
# Reopen and jump to last closed browser tab
# gesture swipe right_down xdotool key control+shift+t
# Example of 8 static workspaces, e.g. using KDE virtual-desktops,
# arranged in 2 rows of 4 columns across using swipe up/down/left/right
# to navigate in fixed planes. You can also add the "-w/--wrap" option
# to allow wrapping in any direction. You must configure your virtual
# desktops with the same column dimension.
# gesture swipe up _internal --cols 4 ws_up
# gesture swipe down _internal --cols 4 ws_down
# gesture swipe left _internal --cols 4 ws_left
# gesture swipe right _internal --cols 4 ws_right
#
# Example of 16 static workspaces, e.g. using KDE virtual-desktops,
# arranged in 4 rows of 4 columns across using swipe up/down/left/right
# to navigate in fixed planes, and also using swipe
# left_up/left_down/right_up/right_down to navigate diagonally. You can
# also add the "-w/--wrap" option to allow wrapping in any direction
# and/or diagonally. You must configure your virtual desktops with the
# same column dimension.
# gesture swipe up _internal --cols 4 ws_up
# gesture swipe down _internal --cols 4 ws_down
# gesture swipe left _internal --cols 4 ws_left
# gesture swipe right _internal --cols 4 ws_right
# gesture swipe left_up _internal --cols 4 ws_left_up
# gesture swipe left_down _internal --cols 4 ws_left_down
# gesture swipe right_up _internal --cols 4 ws_right_up
# gesture swipe right_down _internal --cols 4 ws_right_down
# Example virtual desktop switching for Ubuntu Unity/Compiz. The
# _internal command does not work for Compiz but you can explicitly
# configure the swipe commands to work for a Compiz virtual 2
# dimensional desktop as follows:
# gesture swipe up xdotool key ctrl+alt+Up
# gesture swipe down xdotool key ctrl+alt+Down
# gesture swipe left xdotool key ctrl+alt+Left
# gesture swipe right xdotool key ctrl+alt+Right
# Example to change audio volume:
# Note this only works on an Xorg desktop (not Wayland).
# gesture swipe up xdotool key XF86AudioRaiseVolume
# gesture swipe down xdotool key XF86AudioLowerVolume
###############################################################################
# PINCH GESTURES:
###############################################################################
# GNOME SHELL open/close overview (works for GNOME on Xorg only)
# gesture pinch in xdotool key super+s
# gesture pinch out xdotool key super+s
# KDE Plasma open/close overview
# gesture pinch in xdotool key ctrl+F9
# gesture pinch out xdotool key ctrl+F9
# GNOME SHELL open/close overview (works for GNOME on Wayland and Xorg)
# Note since GNOME 3.24 on Wayland this is implemented natively so no
# real point configuring for Wayland.
# gesture pinch in dbus-send --session --type=method_call --dest=org.gnome.Shell /org/gnome/Shell org.gnome.Shell.Eval string:'Main.overview.toggle();'
# gesture pinch out dbus-send --session --type=method_call --dest=org.gnome.Shell /org/gnome/Shell org.gnome.Shell.Eval string:'Main.overview.toggle();'
# Optional extended pinch gestures:
# gesture pinch clockwise <whatever command>
# gesture pinch anticlockwise <whatever command>
###############################################################################
# This application normally determines your touchpad device
# automatically. Some users may have multiple touchpads but by default
# we use only the first one found. However, you can choose to specify
# the explicit device name to use. Run "libinput list-devices" to work
# out the name of your device (from the "Device:" field). Then add a
# device line specifying that name, e.g:
#
# device DLL0665:01 06CB:76AD Touchpad
#
# If the device name starts with a '/' then it is instead considered as
# the explicit device path although since device paths can change
# through reboots this is best to be a symlink. E.g. instead of specifying
# /dev/input/event12, you should use the corresponding full path link
# under /dev/input/by-path/ or /dev/input/by-id/.
#
# You can choose to use ALL touchpad devices by setting the device name
# to "all". E.g. Do this if you have multiple touchpads which you want
# to use in parallel. This reduces performance slightly so only set this
# if you have to.
#
# device all
###############################################################################
# You can set a minimum travel distance threshold before swipe gestures
# are actioned using the swipe_threshold configuration command.
# Specify this value in dots. The default is 0.
# E.g. set it to 100 dots with "swipe_threshold 100".
# swipe_threshold 0
###############################################################################
# You can set a timeout on gestures from start to end. The default is
# the value commented below. It can be any value in float secs >= 0.
# 0 = no timeout. E.g. set it to 2 secs with "timeout 2".
# timeout 1.5

View File

@ -1,9 +1,5 @@
# Folder for emails
set folder = "~/.mail"
# Mailbox type
set mbox_type = Maildir
# Directory to pool for new mail
set spoolfile = +Inbox
# Directory to save sent messages into
set record = +Sent
# Directory to save drafts into
@ -27,3 +23,16 @@ auto_view text/html
# Order to try and show multipart emails
alternative_order text/plain text/enriched text/html
set editor = "vim"
source accounts/personal
# Mailbox type
set mbox_type = Maildir
# Directory to pool for new mail
set spoolfile = +Inbox
mailboxes = +Inbox
set imap_check_subscribed
source /usr/share/doc/neomutt/vim-keys/vim-keys.rc
macro index,pager A "<save-message>=Archive<enter>" "Archive Message"

View File

@ -37,3 +37,8 @@ https://martinfowler.com/feed.atom blog development "~Martin Fowler Blog"
https://feeds.feedburner.com/GDBcode blog development google "~Google Developers Blog"
https://feeds.feedburner.com/blogspot/hsDu blog development google android "~Google Android Developers Blog"
https://www.smashingmagazine.com/feed blog development web "~Smashing Magazine Web Dev Blog"
https://devblogs.microsoft.com/dotnet/feed/ blog development dotnet "~DotNet Blog"
https://dragan.rocks/feed.xml blog development clojure "~Dragan Djuric Blog"
http://planet.clojure.in/atom.xml blog development clojure "~Planet Clojure"
https://godotengine.org/rss.xml blog development gamedev godot "~Godot Engine Blog"
https://www.unrealengine.com/en-US/rss blog development gamedev unreal "~Unreal Engine Blog"

View File

@ -1,3 +1,11 @@
## NeoVim config
## My NeoVim configuration
Current NeoVim configuration only reads .vim config, since both are currently shared. Complete migration to NeoVim and lua based config is planned.
Configuration is separated into directories:
- `plugin` for logical collection of functionalities into a simple plugin
- `colors` my colorscheme
- `compiler` for compiler plugins
- `ftdetect` for autocommands for detecting file types
- `undodir` is just a placeholder for configured undo directory
- `spell` for spelling dictionary
- `after` with same directory structure for loading after plugins - allows easy overrides, most `ftplugins` are here
- `lua` for all lua config files, with `ftplugin` and `plugin` too, enabled by [astronauta](https://github.com/tjdevries/astronauta.nvim)

View File

@ -0,0 +1,3 @@
## Filetype plugins
All filetype plugins should be located in this /after dir to ensure no defaults or other plugins override these settings.

View File

@ -0,0 +1,2 @@
setlocal ts=2 sts=2 sw=2 expandtab autoindent
let b:undo_ftplugin .= '|setlocal ts< sts< sw< expandtab< autoindent<'

View File

@ -0,0 +1,2 @@
setlocal ts=4 sts=4 sw=4 expandtab autoindent
let b:undo_ftplugin = '|setlocal ts< sts< sw< expandtab< autoindent<'

View File

@ -0,0 +1,5 @@
setlocal ts=2 sts=2 sw=2 expandtab autoindent
let b:undo_ftplugin .= '|setlocal ts< sts< sw< expandtab< autoindent<'
compiler elixir
let b:undo_ftplugin .= '|compiler<'

View File

@ -0,0 +1,7 @@
setlocal foldmethod=expr
setlocal tabstop=4
nnoremap <buffer> <F4> :GodotRunLast<CR>
nnoremap <buffer> <F5> :GodotRun<CR>
nnoremap <buffer> <F6> :GodotRunCurrent<CR>
nnoremap <buffer> <F7> :GodotRunFZF<CR>
let b:undo_ftplugin .= '|setlocal foldmethod< tabstop<'

View File

@ -0,0 +1,4 @@
setlocal textwidth=72
setlocal spell
setlocal cc=+1
let b:undo_ftplugin .= '|setlocal textwidth< spell< cc<'

View File

@ -0,0 +1,4 @@
require('jdtls').start_or_attach {
cmd = {'jdtls-startup.sh'};
on_attach = require'lsp.servers'.jdtls_on_attach;
}

View File

@ -0,0 +1,2 @@
setlocal ts=2 sts=2 sw=2 expandtab autoindent
let b:undo_ftplugin .= '|setlocal ts< sts< sw< expandtab< autoindent<'

View File

@ -0,0 +1,2 @@
setlocal ts=2 sts=2 sw=2 expandtab autoindent
let b:undo_ftplugin .= '|setlocal ts< sts< sw< expandtab< autoindent<'

View File

@ -0,0 +1,11 @@
" -----------------------------------------------------------------------------
" - Python file plugin -
" -----------------------------------------------------------------------------
" Without this, weird issues occurred with asdf + direnv + python virtualenv
setlocal shell=/bin/sh
setlocal textwidth=79
setlocal cc=+1
let b:undo_ftplugin .= "|setlocal shell< textwidth< cc<"

View File

@ -0,0 +1,3 @@
setlocal textwidth=78
setlocal spell
let b:undo_ftplugin .= '|setlocal textwidth< spell<'

View File

@ -0,0 +1,5 @@
## Plugin overrides
This directory should mostly be used to configure specific plugins, by running after them.
In some cases it may be required to run some code before plugin, in which case /plugin dir can be used.
Other than this, custom plugins should be located in /plugin dir, unless plugin explicitly overrides some other plugin, in which case, it would probably be better to either disable other plugin or just override it with that plugin specific file.

View File

@ -0,0 +1,13 @@
" -----------------------------------------------------------------------------
" - vim-grepper configuration -
" -----------------------------------------------------------------------------
let g:grepper = {}
let g:grepper.tools = ['rg', 'git', 'grep']
" Search for the current word (similar to *)
nnoremap <Leader>* :Grepper -cword -noprompt<CR>
" Search for the current selection
nmap gs <Plug>(GrepperOperator)
xmap gs <Plug>(GrepperOperator)

View File

@ -0,0 +1,6 @@
" -----------------------------------------------------------------------------
" - Neovim python host -
" Explicit declaration of python host program to "prevent suprises"
" -----------------------------------------------------------------------------
let g:python_host_prog = $HOME.'/.asdf/shims/python2'
let g:python3_host_prog = $HOME.'/.asdf/shims/python3'

View File

@ -0,0 +1,2 @@
" More natural auto complete
let g:SuperTabDefaultCompletionType = "<c-n>"

View File

@ -0,0 +1,14 @@
" -----------------------------------------------------------------------------
" - Vim-test and general testing config -
" -----------------------------------------------------------------------------
" make test commands execute using dispatch.vim
let test#strategy = "dispatch"
let test#csharp#runner = "dotnettest"
" Map test running commands
nmap <silent> <Leader>tn :TestNearest<CR>
nmap <silent> <Leader>tf :TestFile<CR>
nmap <silent> <Leader>ts :TestSuite<CR>
nmap <silent> <Leader>tl :TestLast<CR>
nmap <silent> <Leader>tg :TestVisit<CR>

View File

@ -0,0 +1,3 @@
## Compiler settings
Used just to set up makeprg and compile errors parsing

View File

@ -0,0 +1,19 @@
" Vim compiler file
" Compiler: Elixir Script Compiler
if exists('current_compiler')
finish
endif
let current_compiler = "elixir"
let s:save_cpo = &cpo
set cpo&vim
if exists(':CompilerSet') != 2
command -nargs=* CompilerSet setlocal <args>
endif
CompilerSet makeprg=elixir\ %
let &cpo = s:save_cpo
unlet s:save_cpo

View File

@ -0,0 +1,30 @@
" Vim Compiler File
" Compiler: gradle
if exists("current_compiler")
finish
endif
let current_compiler = "gradle"
let s:save_cpo = &cpo
set cpo&vim
if exists(":CompilerSet") != 2
command -nargs=* CompilerSet setlocal <args>
endif
CompilerSet makeprg=gradle
CompilerSet errorformat=
\%E[ant:scalac]\ %f:%l:\ error:\ %m,
\%W[ant:scalac]\ %f:%l:\ warning:\ %m,
\%E%.%#:compile%\\w%#Java%f:%l:\ error:\ %m,%-Z%p^,%-C%.%#,
\%W%.%#:compile%\\w%#Java%f:%l:\ warning:\ %m,%-Z%p^,%-C%.%#,
\%E%f:%l:\ error:\ %m,%-Z%p^,%-C%.%#,
\%W%f:%l:\ warning:\ %m,%-Z%p^,%-C%.%#,
\%E%f:\ %\\d%\\+:\ %m\ @\ line\ %l\\,\ column\ %c.,%-C%.%#,%Z%p^,
\%E%>%f:\ %\\d%\\+:\ %m,%C\ @\ line\ %l\\,\ column\ %c.,%-C%.%#,%Z%p^,
\%-G%.%#
let &cpo = s:save_cpo
unlet s:save_cpo

View File

@ -0,0 +1,30 @@
" Vim Compiler File
" Compiler: gradlew
if exists("current_compiler")
finish
endif
let current_compiler = "gradlew"
let s:save_cpo = &cpo
set cpo&vim
if exists(":CompilerSet") != 2
command -nargs=* CompilerSet setlocal <args>
endif
CompilerSet makeprg=./gradlew
CompilerSet errorformat=
\%E[ant:scalac]\ %f:%l:\ error:\ %m,
\%W[ant:scalac]\ %f:%l:\ warning:\ %m,
\%E%.%#:compile%\\w%#Java%f:%l:\ error:\ %m,%-Z%p^,%-C%.%#,
\%W%.%#:compile%\\w%#Java%f:%l:\ warning:\ %m,%-Z%p^,%-C%.%#,
\%E%f:%l:\ error:\ %m,%-Z%p^,%-C%.%#,
\%W%f:%l:\ warning:\ %m,%-Z%p^,%-C%.%#,
\%E%f:\ %\\d%\\+:\ %m\ @\ line\ %l\\,\ column\ %c.,%-C%.%#,%Z%p^,
\%E%>%f:\ %\\d%\\+:\ %m,%C\ @\ line\ %l\\,\ column\ %c.,%-C%.%#,%Z%p^,
\%-G%.%#
let &cpo = s:save_cpo
unlet s:save_cpo

View File

@ -0,0 +1,2 @@
" gradle syntax highlighting
au BufNewFile,BufRead *.gradle set filetype=groovy

View File

@ -0,0 +1,44 @@
if require('init.first_load')() then
return
end
vim.cmd [[filetype plugin on]]
vim.cmd [[filetype indent on]]
vim.cmd [[syntax on]]
vim.api.nvim_exec('let $OVIMHOME = $HOME."/.vim"', false)
vim.api.nvim_exec('let $VIMHOME = $HOME."/.config/nvim"', false)
vim.api.nvim_exec('let $NVIMHOME = $HOME."/.local/share/nvim"', false)
vim.api.nvim_exec('let $VIMPLUGINS = expand($VIMHOME."/lua/personal/plugins.lua")', false)
-- Leader config to <Space>
vim.g.mapleader = ' '
-- Globals taken from TJ config
-- Helpful for configuration
-- Might be removed in future version of NeoVim
require('init.globals')
require('init.plugins')
require('init.options')
require('lsp')
-- Colorscheme
vim.cmd('syntax on')
require('init.colors')
vim.api.nvim_set_keymap('n', 'Q', 'gq', {})
vim.api.nvim_set_keymap('i', '<C-U>', '<C-G>u<C-U>', {noremap = true})
vim.cmd('command! Wq :wq')
vim.cmd('command! W :w')
vim.api.nvim_set_keymap('n', '<Leader>c', ':ccl <bar> lcl<CR>', {noremap = true})
-- Allow recursive searches
vim.cmd('set path+=**')
-- automatically rebalance windows on vim resize
vim.cmd('autocmd VimResized * :wincmd =')

View File

@ -1,3 +0,0 @@
set runtimepath^=~/.vim runtimepath+=~/.vim/after
let &packpath = &runtimepath
source ~/.vim/vimrc

View File

@ -0,0 +1,83 @@
-------------------------------------------------------------------------------
-- - Fugitive.vim extensions library -
-------------------------------------------------------------------------------
-- Generates url for creating PR for current branch
-- Tested only with github.com
-- Works regardless of ssh or https for origin config
-- Hardcoded to use 'origin' remote
local function get_pr_url(...)
local origin_url = vim.fn['fugitive#RemoteUrl']('origin')
origin_url = string.gsub(origin_url, '.git$', '')
origin_url = string.gsub(origin_url, ':', '/')
origin_url = string.gsub(origin_url, 'git@', 'https://')
-- Remove prefix if it is available, for some of common git services
local common_services = {'github.com', 'bitbucket.org', 'gitlab.com'}
for k,service in pairs(common_services) do
if (string.find(origin_url, service, 1, true))
then
-- Common mechanism for managing multiple SSH keys
origin_url = string.gsub(origin_url, '://.*' .. service, '://' .. service)
end
end
-- This part probably only works on github
local pr_url
if (select('#', ...) == 0)
then
pr_url = origin_url .. '/compare/' .. vim.fn.FugitiveHead() .. '?expand=1'
else
pr_url = origin_url .. '/compare/' .. select(1, ...) .. '...' .. vim.fn.FugitiveHead() .. '?expand=1'
end
return pr_url
end
-------------------------------------------------------------------------------
-- - Public API -
-------------------------------------------------------------------------------
local M = {}
-- Shorcut to push directly to current branch on origin
-- Similar to `ggpush` in fish config
function M.push_origin()
vim.cmd('Git push origin ' .. vim.fn.FugitiveHead())
end
-- Shorcut to pull directly from current branch on origin
-- Similar to `ggpull` in fish config
function M.pull_origin()
vim.cmd('Git pull origin ' .. vim.fn.FugitiveHead())
end
-- Prints current branches PR url (not saved to :messages)
-- Makes it easy to use terminal for opening url on click
function M.print_pr_url(...)
vim.cmd('echo "' .. get_pr_url(...) .. '"')
end
-- Copies current branches PR url to system clipboard
function M.copy_pr_url(...)
vim.cmd('let @+ = "' .. get_pr_url(...) .. '"')
end
-- Opens current banches PR url in default browser
-- Utilizes netrw browse, meaning it should behave same as netrw
function M.open_new_pr(...)
vim.fn['netrw#BrowseX'](get_pr_url(...), 0)
end
-- Creates new branch and checks out to it
-- Similar to `gcb` in fish config
function M.create_branch(branch)
vim.cmd('Git checkout -b ' .. branch)
end
-- Switches to branch
function M.checkout_branch(branch)
vim.cmd('Git checkout ' .. branch)
end
return M

View File

@ -0,0 +1,4 @@
vim.o.termguicolors = true -- Does not look good with gruvbox
vim.o.background = "dark"
vim.g.gruvbox_italic = 1
vim.cmd([[colorscheme gruvbox]])

View File

@ -0,0 +1,35 @@
-- Adopted from https://github.com/tjdevries/config_manager/blob/master/xdg_config/nvim/lua/tj/first_load.lua
local download_packer = function()
if vim.fn.input("Download Packer? (y for yes)") ~= "y" then
return
end
local directory = string.format(
'%s/site/pack/packer/start/',
vim.fn.stdpath('data')
)
vim.fn.mkdir(directory, 'p')
local out = vim.fn.system(string.format(
'git clone %s %s',
'https://github.com/wbthomason/packer.nvim',
directory .. '/packer.nvim'
))
print(out)
print("Downloading packer.nvim...")
vim.api.nvim_command('PackerCompile')
vim.api.nvim_command('PackerInstall')
print("( You'll need to restart now )")
end
return function()
if not pcall(require, 'packer') then
download_packer()
return true
end
return false
end

View File

@ -0,0 +1,19 @@
-------------------------------------------------------------------------------
-- - Adopted from TJ config (https://github.com/tjdevries/config_manager/blob/master/xdg_config/nvim/lua/tj/globals/init.lua) -
-------------------------------------------------------------------------------
P = function(v)
print(vim.inspect(v))
return v
end
if pcall(require, 'plenary') then
RELOAD = require('plenary.reload').reload_module
R = function(name)
RELOAD(name)
return require(name)
end
end
-- `vim.opt`
require('init.globals.opt')

View File

@ -0,0 +1,263 @@
--[[ To use a more declarative syntax, you could do something like this:
local function set_opts(opts_table)
for k, v in pairs(opts_table) do
vim.opt[k] = v
end
end
set_opts {
mouse = 'n',
fillchars = { eob = "~" },
}
--]]
--[[ Global option names
For those wondering how to get the values at the top level,
you could use Lua's `setfenv` function to set the environment
equal to the vim.opt dict
cc @mccanch
setfenv(function()
mouse = 'n'
end, vim.opt)()
--]]
local if_nil = function(a, b)
if a == nil then
return b
end
return a
end
local singular_values = {
['boolean'] = true,
['number'] = true,
['nil'] = true,
}
local set_key_value = function(t, key_value_str)
assert(string.find(key_value_str, ":"), "Must have a :" .. tostring(key_value_str))
local key, value = unpack(vim.split(key_value_str, ":"))
key = vim.trim(key)
value = vim.trim(value)
t[key] = value
end
local convert_vimoption_to_lua = function(option, val)
-- Short circuit if we've already converted!
if type(val) == 'table' then
return val
end
if singular_values[type(val)] then
return val
end
if type(val) == "string" then
-- TODO: Bad hax I think
if string.find(val, ":") then
local result = {}
local items = vim.split(val, ",")
for _, item in ipairs(items) do
set_key_value(result, item)
end
return result
else
return vim.split(val, ",")
end
end
end
-- local concat_keys = function(t, sep)
-- return table.concat(vim.tbl_keys(t), sep)
-- end
local concat_key_values = function(t, sep, divider)
local final = {}
for k, v in pairs(t) do
table.insert(final, string.format('%s%s%s', k, divider, v))
end
table.sort(final)
return table.concat(final, sep)
end
local remove_duplicate_values = function(t)
local result = {}
for _, v in ipairs(t) do
result[v] = true
end
return vim.tbl_keys(result)
end
local remove_value = function(t, val)
if vim.tbl_islist(t) then
local remove_index = nil
for i, v in ipairs(t) do
if v == val then
remove_index = i
end
end
if remove_index then
table.remove(t, remove_index)
end
else
t[val] = nil
end
return t
end
local add_value = function(current, new)
if singular_values[type(current)] then
error(
"This is not possible to do. Please do something different: "
.. tostring(current)
.. " // "
.. tostring(new)
)
end
if type(new) == 'string' then
if vim.tbl_islist(current) then
table.insert(current, new)
else
set_key_value(current, new)
end
return current
elseif type(new) == 'table' then
if vim.tbl_islist(current) then
assert(vim.tbl_islist(new))
vim.list_extend(current, new)
else
assert(not vim.tbl_islist(new), vim.inspect(new) .. vim.inspect(current))
current = vim.tbl_extend("force", current, new)
end
return current
else
error("Unknown type")
end
end
local convert_lua_to_vimoption = function(t)
if vim.tbl_islist(t) then
t = remove_duplicate_values(t)
table.sort(t)
return table.concat(t, ',')
else
return concat_key_values(t, ',', ':')
end
end
local clean_value = function(v)
if singular_values[type(v)] then
return v
end
local result = v:gsub('^,', '')
return result
end
local opt_mt
opt_mt = {
__index = function(t, k)
if k == '_value' then
return rawget(t, k)
end
return setmetatable({ _option = k, }, opt_mt)
end,
__newindex = function(t, k, v)
if k == '_value' then
return rawset(t, k, v)
end
if type(v) == 'table' then
local new_value
if getmetatable(v) ~= opt_mt then
new_value = v
else
assert(v._value, "Must have a value to set this")
new_value = v._value
end
vim.o[k] = convert_lua_to_vimoption(new_value)
return
end
if v == nil then
v = ''
end
-- TODO: Figure out why nvim_set_option doesn't override values the same way.
-- @bfredl said he will fix this for me, so I can just use nvim_set_option
if type(v) == 'boolean' then
vim.o[k] = clean_value(v)
if v then
vim.cmd(string.format("set %s", k))
else
vim.cmd(string.format("set no%s", k))
end
else
vim.cmd(string.format("set %s=%s", k, clean_value(v)))
end
end,
__add = function(left, right)
--[[
set.wildignore = set.wildignore + 'hello'
set.wildignore = set.wildignore + { '*.o', '*~', }
--]]
assert(left._option, "must have an option key")
if left._option == 'foldcolumn' then
error("not implemented for foldcolumn.. use a string")
end
local existing = if_nil(left._value, vim.o[left._option])
local current = convert_vimoption_to_lua(left._option, existing)
if not current then
left._value = convert_vimoption_to_lua(right)
end
left._value = add_value(current, right)
return left
end,
__sub = function(left, right)
assert(left._option, "must have an option key")
local existing = if_nil(left._value, vim.o[left._option])
local current = convert_vimoption_to_lua(left._option, existing)
if not current then
return left
end
left._value = remove_value(current, right)
return left
end
}
vim.opt = setmetatable({}, opt_mt)
return {
convert_vimoption_to_lua = convert_vimoption_to_lua,
opt = vim.opt,
opt_mt = opt_mt
}

View File

@ -0,0 +1,33 @@
local opt = vim.opt
opt.wildignore = '__pycache__'
opt.wildignore = opt.wildignore + { '*.o' , '*~', '*.pyc', '*pycache*' }
-- Indentation config
opt.tabstop = 2
opt.tabstop = 2
opt.shiftwidth = 2
opt.autoindent = true
-- Line numbers
opt.number = true
opt.relativenumber = true
-- Misc
opt.backspace = 'indent,eol,start' -- Allow backspacing over everything in insert mode
opt.ttimeoutlen = 50
opt.backup = false -- do not keep a backup file, use versions instead
opt.history = 50 -- Keep 50 lines of command line history
opt.ruler = true -- Show the cursor position all the time
opt.laststatus = 2 -- Always display the status line
opt.swapfile = false -- Disable swapfile
opt.undofile = true -- Enable undofile (auto supported in NeoVim)
opt.showcmd = true -- Display incomplete commands
opt.incsearch = true -- Do incremental searching
opt.autoread = true -- Reload files changed outside
opt.hidden = true -- Allow leaving unsaved buffers
opt.inccommand = 'nosplit' -- Enable live preview of text replacement
opt.hlsearch = true
opt.mouse = 'a'
opt.encoding = "utf-8"

View File

@ -0,0 +1,96 @@
return require('packer').startup {
function(use)
use 'wbthomason/packer.nvim'
-- Tpope general improvements --
use 'tpope/vim-sensible' -- Sane defaults
use 'tpope/vim-endwise' -- Add closing statements automatically for if, function etc
use 'tpope/vim-surround' -- Surround with ', ", etc
use 'tpope/vim-fugitive' -- Git integration
use 'tpope/vim-vinegar' -- Netrw improvements
use 'tpope/vim-obsession' -- Session.vim management
use 'tpope/vim-dadbod' -- Database access
use 'kristijanhusak/vim-dadbod-ui' -- UI For Dadbod
use 'tpope/vim-speeddating' -- <C-A> and <C-X> for dates
use 'tpope/vim-dispatch' -- Dispatch command
use 'tpope/vim-projectionist' -- Project config file!
use 'tpope/vim-unimpaired' -- Additional [ and ] mappings
use 'tpope/vim-repeat' -- Better . repeat
use 'tpope/vim-commentary' -- Commenting motion
use 'tpope/vim-sleuth' -- Intendation heuristics
-- General improvements --
use 'airblade/vim-gitgutter' -- Git signs
use 'godlygeek/tabular' -- Tabular command for alignment
-- use { 'Shougo/vimproc.vim', run = 'make' } -- Not really used
use 'vim-scripts/utl.vim' -- Universal text linking
use { --
'mbbill/undotree', --
cmd = 'UndotreeToggle' --
} -- Undos in a tree for easy access
use 'mhinz/vim-grepper' -- Grepper command - improved grepping throughout project
use 'radenling/vim-dispatch-neovim' -- vim-dispatch for neovim - uses terminal
use 'wellle/targets.vim' -- Additional targets for inside and around motions
use 'flazz/vim-colorschemes' -- All popular colorschemes
use 'romainl/vim-qf' -- Quickfix list upgrades
use 'romainl/vim-devdocs' -- Quick DevDocs.io search using :DD
-- Tools --
use 'direnv/direnv.vim' -- Integration with Direnv
use 'vim-test/vim-test' -- Running tests from vim
use 'dense-analysis/ale' -- Asynchronous Lint Engine - used for linting, not for LSP
use 'nathunsmitty/nvim-ale-diagnostic' -- Neovim LSP + ALE integration
use 'mfussenegger/nvim-dap' -- Debug Adapter Protocol
use 'theHamsta/nvim-dap-virtual-text' -- Virtual text display for DAP
-- Snippets --
if vim.g.loaded_python3_provider ~= 0 --
then --
use 'SirVer/ultisnips' -- Snippets in python format
use 'honza/vim-snippets' -- Collection of snippets for UltiSnips
end --
-- Language support --
use 'sheerun/vim-polyglot' -- All popular languages
use 'tpope/vim-rails' -- Enables all rails command through vim and integrates with projectionist
use 'c-brenn/phoenix.vim' -- Similar to vim-rails, but for phoenix
use 'tpope/vim-salve' -- Clojure integration with projectionist
use 'tpope/vim-fireplace' -- Clojure REPL and integration
use 'vimwiki/vimwiki' -- Vimwiki - personal wiki in vim
use 'esensar/vimwiki-reviews-lua' -- Vimwiki extension for periodic reviews
use 'ledger/vim-ledger' -- Support for ledger-cli format
use 'tandrewnichols/vim-docile' -- Support for vim doc.txt format
use 'habamax/vim-godot' -- Godot engine (and script) support
use 'guns/vim-sexp' -- Precision editing for S-expressions
use( -- Simpler keymaps for vim-sexp
'tpope/vim-sexp-mappings-for-regular-people'
)
-- Treesitter --
use { --
'nvim-treesitter/nvim-treesitter', --
run = ':TSUpdate' --
} -- Treesitter integration
use 'nvim-treesitter/playground' -- TSPlaygroundToggle - access treesitter data
-- LSP --
use 'neovim/nvim-lspconfig' -- Easy LSP Config
use 'alexaandru/nvim-lspupdate' -- Easy install and update for many LSP servers
use 'hrsh7th/nvim-compe' -- LSP completion integration
use 'nvim-lua/lsp_extensions.nvim' -- LSP extensions (like closing labels for Dart)
-- LSP language specific
use 'tjdevries/nlua.nvim' -- Built-in Lua integration with LSP
use 'akinsho/flutter-tools.nvim' -- Additional flutter integrations
use 'mfussenegger/nvim-jdtls' -- Additional java integrations
-- Lua support --
use 'tjdevries/astronauta.nvim' -- Support for lua ftplugins and plugins
use 'nvim-lua/popup.nvim' -- Popup API integration - needed for some plugins
use 'nvim-lua/plenary.nvim' -- Lua helpers
-- Telescope --
use 'nvim-telescope/telescope.nvim' -- Fuzzy searcher
use 'nvim-telescope/telescope-dap.nvim' -- DAP integration for Telescope
end
}

View File

@ -0,0 +1,40 @@
-------------------------------------------------------------------------------
-- - LSP completion config -
-------------------------------------------------------------------------------
-- Set completeopt to have a better completion experience
vim.o.completeopt = "menuone,noselect"
require'compe'.setup {
enabled = true;
autocomplete = true;
debug = false;
min_length = 1;
preselect = 'enable';
throttle_time = 80;
source_timeout = 200;
incomplete_delay = 400;
max_abbr_width = 100;
max_kind_width = 100;
max_menu_width = 100;
documentation = true;
source = {
path = true;
buffer = true;
calc = true;
nvim_lsp = true;
nvim_lua = true;
ultisnips = true;
};
}
local function set_keymap(...) vim.api.nvim_set_keymap(...) end
local default_opts = {noremap = true, silent = true, expr = true}
set_keymap('i', '<C-Space>', 'compe#complete()', default_opts)
set_keymap('i', '<C-y>', "compe#confirm('<C-y>')", default_opts)
set_keymap('i', '<C-e>', "compe#close('<C-e>')", default_opts)
set_keymap('i', '<C-f>', "compe#scroll({ 'delta': +4 })", default_opts)
set_keymap('i', '<C-d>', "compe#scroll({ 'delta': -4 })", default_opts)

View File

@ -0,0 +1,16 @@
-------------------------------------------------------------------------------
-- - LSP diagnostics config -
-------------------------------------------------------------------------------
require("nvim-ale-diagnostic")
vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with(
vim.lsp.diagnostic.on_publish_diagnostics, {
underline = false,
virtual_text = false,
signs = true,
update_in_insert = false,
}
)
vim.g.diagnostic_enable_virtual_text = 1

View File

@ -0,0 +1,7 @@
-------------------------------------------------------------------------------
-- - LSP configuration -
-------------------------------------------------------------------------------
require("lsp.diagnostic")
require("lsp.servers")
require("lsp.completion")

View File

@ -0,0 +1,75 @@
-------------------------------------------------------------------------------
-- - LSP servers configuration -
-------------------------------------------------------------------------------
local lspconfig = require("lspconfig")
local on_attach = function(client, bufnr)
local function buf_set_keymap(...) vim.api.nvim_buf_set_keymap(bufnr, ...) end
local function buf_set_option(...) vim.api.nvim_buf_set_option(bufnr, ...) end
buf_set_option('omnifunc', 'v:lua.vim.lsp.omnifunc')
local default_opts = {noremap = true, silent = true}
-- Lsp keymaps
buf_set_keymap('n', '<C-]>', '<cmd>lua vim.lsp.buf.definition()<CR>', default_opts)
buf_set_keymap('n', 'gD', '<cmd>lua vim.lsp.buf.declaration()<CR>', default_opts)
buf_set_keymap('n', 'gr', '<cmd>lua vim.lsp.buf.references()<CR>', default_opts)
buf_set_keymap('n', 'gi', '<cmd>lua vim.lsp.buf.implementation()<CR>', default_opts)
buf_set_keymap('n', '<Leader>rn', '<cmd>lua vim.lsp.buf.rename()<CR>', default_opts)
buf_set_keymap('n', '<C-k>', '<cmd>lua vim.lsp.buf.signature_help()<CR>', default_opts)
buf_set_keymap('n', 'K', '<cmd>lua vim.lsp.buf.hover()<CR>', default_opts)
buf_set_keymap('n', '<A-CR>', '<cmd>lua vim.lsp.buf.code_action()<CR>', default_opts)
buf_set_keymap('n', '<Leader>ac', '<cmd>lua vim.lsp.buf.code_action()<CR>', default_opts)
buf_set_keymap('n', '<Leader>a', '<cmd>lua vim.lsp.buf.code_action_range()<CR>', default_opts)
end
-- Lsp default language servers
local servers = { "bashls", "clangd", "jsonls", "pyright", "rust_analyzer", "kotlin_language_server", "vimls", "clojure_lsp", "gopls", "gdscript", "tsserver" }
for _, lsp in ipairs(servers) do
lspconfig[lsp].setup { on_attach = on_attach }
end
-- Lua bultin lsp
require('nlua.lsp.nvim').setup(lspconfig, {
on_attach = on_attach,
-- Include globals you want to tell the LSP are real :)
globals = {}
})
-- Flutter tools
require('flutter-tools').setup {
lsp = {
on_attach = on_attach
}
}
-- Dotnet LS
local pid = vim.fn.getpid()
local omnisharp_bin = vim.fn.glob('$HOME') .. "/lsp/dotnet/omnisharp/run"
lspconfig.omnisharp.setup {
cmd = { omnisharp_bin, "--languageserver" , "--hostPID", tostring(pid) };
on_attach = on_attach;
}
-- JDTLS (Java)
-- Can't be local currently, because autocommand has to be used
jdtls_on_attach = function(client, bufnr)
local function buf_set_keymap(...) vim.api.nvim_buf_set_keymap(bufnr, ...) end
local function buf_set_option(...) vim.api.nvim_buf_set_option(bufnr, ...) end
buf_set_option('omnifunc', 'v:lua.vim.lsp.omnifunc')
local default_opts = {noremap = true, silent = true}
on_attach(client, bufnr)
buf_set_keymap('n', '<A-CR>', "<cmd>lua require('jdtls').code_action()<CR>", default_opts)
buf_set_keymap('n', '<Leader>ac', "<cmd>lua require('jdtls').code_action()<CR>", default_opts)
end
return {
jdtls_on_attach = jdtls_on_attach
}

View File

@ -0,0 +1,4 @@
## Plugins
This directory should be mostly used to group custom functionalities together into a "plugin".
In some cases this can be used to set up plugin settings, if it is required to be run before plugin (othwerise use /after/plugin).

View File

@ -0,0 +1,84 @@
-------------------------------------------------------------------------------
-- - NeoVim DAP (Debug Adapter Protocol) config -
-------------------------------------------------------------------------------
local dap = require('dap')
dap.adapters.python = {
type = 'executable';
command = 'python';
args = { '-m', 'debugpy.adapter' };
}
dap.configurations.python = {
{
-- The first three options are required by nvim-dap
type = 'python'; -- the type here established the link to the adapter definition: `dap.adapters.python`
request = 'launch';
name = "Launch file";
program = "${file}"; -- This configuration will launch the current file if used.
},
}
local netcoredbg_bin = vim.fn.glob('$HOME') .. "/dap/netcoredbg/netcoredbg"
dap.adapters.netcoredbg = {
type = 'executable',
command = netcoredbg_bin,
args = {'--interpreter=vscode'}
}
dap.configurations.cs = {
{
type = "netcoredbg",
name = "launch - netcoredbg",
request = "launch",
program = function()
return vim.fn.input('Path to dll', vim.fn.getcwd() .. '/bin/Debug/', 'file')
end,
},
}
-- Nvim DAP Treesitter integration
vim.g.dap_virtual_text = true
-- Keymaps
local function set_keymap(...) vim.api.nvim_set_keymap(...) end
local default_opts = {noremap = true, silent = true}
set_keymap('n', '<Leader>db', "<cmd>lua require'dap'.toggle_breakpoint()<CR>", default_opts)
set_keymap('n', '<Leader>dc', "<cmd>lua require'dap'.continue()<CR>", default_opts)
set_keymap('n', '<Leader>dso', "<cmd>lua require'dap'.step_over()<CR>", default_opts)
set_keymap('n', '<Leader>dsi', "<cmd>lua require'dap'.step_into()<CR>", default_opts)
set_keymap('n', '<Leader>dro', "<cmd>lua require'dap'.open()<CR>", default_opts)
-- Debugger Hover map
local api = vim.api
local keymap_restore = {}
dap.listeners.after['event_initialized']['me'] = function()
for _, buf in pairs(api.nvim_list_bufs()) do
local keymaps = api.nvim_buf_get_keymap(buf, 'n')
for _, keymap in pairs(keymaps) do
if keymap.lhs == "K" then
table.insert(keymap_restore, keymap)
api.nvim_buf_del_keymap(buf, 'n', 'K')
end
end
end
api.nvim_set_keymap(
'n', 'K', '<Cmd>lua require("dap.ui.variables").hover()<CR>', { silent = true })
end
dap.listeners.after['event_terminated']['me'] = function()
for _, keymap in pairs(keymap_restore) do
api.nvim_buf_set_keymap(
keymap.buffer,
keymap.mode,
keymap.lhs,
keymap.rhs,
{ silent = keymap.silent == 1 }
)
end
keymap_restore = {}
end

View File

@ -0,0 +1,16 @@
-------------------------------------------------------------------------------
-- - Fugitive.vim setup and extra commands -
-------------------------------------------------------------------------------
vim.cmd[[command! -nargs=0 Ggpush :lua require('fugitive_extensions').push_origin()]]
vim.cmd[[command! -nargs=0 Ggpull :lua require('fugitive_extensions').pull_origin()]]
vim.cmd[[command! -nargs=? Gpropen :lua require('fugitive_extensions').open_new_pr(<f-args>)]]
vim.cmd[[command! -nargs=? Gpr Gpropen <args>]]
vim.cmd[[command! -nargs=? Gprprint :lua require('fugitive_extensions').print_pr_url(<f-args>)]]
vim.cmd[[command! -nargs=? Gprcopy :lua require('fugitive_extensions').copy_pr_url(<f-args>)]]
vim.cmd[[command! -nargs=1 Gcbranch :lua require('fugitive_extensions').create_branch(<f-args>)]]
vim.cmd[[command! -nargs=0 Gcmaster :lua require('fugitive_extensions').checkout_branch('main')]]
vim.cmd[[command! -nargs=0 Gcm Gcmaster]]
vim.cmd[[command! -nargs=0 Gcdev :lua require('fugitive_extensions').checkout_branch('develop')]]
vim.cmd[[command! -nargs=1 Gcheckout :lua require('fugitive_extensions').checkout_branch(<f-args>)]]
vim.cmd[[command! -nargs=1 Gc Gcheckout <args>]]

View File

@ -0,0 +1,366 @@
local log = require "vim.lsp.log"
local vim_readme_template = {
"# Name",
"",
"## Requirements",
"",
"## Installation",
"",
"## Usage",
"",
"### Commands",
"",
"### Keymaps",
"",
"## License",
"",
"[LICENSE NAME](LICENSE)"
}
local vim_doc_template = {
"*{}.txt* Description",
"",
"INTRODUCTION *{}*",
"",
"Description",
"",
"CONTENTS *{}-contents*",
"",
" 1. Overview |{}-overview|",
" 2. Requirements |{}-requirements|",
" 3. Installation |{}-installation|",
" 4. Usage |{}-usage|",
" 5. Commands |{}-commands|",
" 6. Functions |{}-functions|",
" 7. Mappings |{}-mappings|",
" 8. Plugs |{}-plugs|",
" 9. Options |{}-options|",
" 10. Issues |{}-issues|",
" 11. Contributing |{}-contributing|",
" 12. Version |{}-version|",
" 13. License |{}-license|",
"",
"OVERVIEW *{}-overview*",
"",
"REQUIREMENTS *{}-requirements*",
"",
"INSTALLATION *{}-installation*",
"",
" 1. Plug <https://github.com/junegunn/vim-plug>",
"",
" Add the following to your vimrc, or something sourced therein: >",
"",
" Plug 'esensar/{}'",
"<",
" Then install via `:PlugInstall`",
"",
" 2. Pathogen <https://github.com/tpope/vim-pathogen> >",
"",
" cd ~/.vim/bundle",
" git clone https://github.com/esensar/{}.git",
"<",
" Then run `:Helptags`",
"",
" 3. Manual",
"",
" Clone this repository and copy the files in plugin/, autoload/, and doc/",
" to their respective directories in your vimfiles, or copy the text from",
" the github repository into new files in those directories. Make sure to",
" run `:helptags`.",
"",
"USAGE *{}-usage*",
"",
"COMMANDS *{}-commands*",
"",
"FUNCTIONS *{}-functions*",
"",
"MAPPINGS *{}-mappings*",
"",
"PLUGS *{}-plugs*",
"",
"OPTIONS *{}-options*",
"",
"ISSUES *{}-issues*",
"",
"If you experience issues using {}, please report them at",
"<https://github.com/esensar/{}/issues>.",
"",
"CONTRIBUTING *{}-contributing*",
"",
"Feel free to look at already reported issues at ",
"<https://github.com/esensar/{}/issues>.",
"If available, check out CONTRIBUTING.md in the repository.",
"Otherwise, feel free to create a new issue or pull request.",
"",
"VERSION *{}-version*",
"",
"Version 1.0.0",
"",
"LICENSE *{}-license*",
"",
"vim:tw=78:ts=2:ft=help:norl:"
}
local flutter_config = {
["*"] = {
start = "flutter run"
},
["lib/*.dart"] = {
alternate = "test/{}_test.dart",
type = "source"
},
["test/*_test.dart"] = {
alternate = "lib/{}.dart",
type = "test",
template = {
"import 'package:flutter_test/flutter_test.dart';",
"",
"import 'package:flutter_template/{}.dart';",
"",
"void main() {",
" testWidgets('', (WidgetTester tester) async {",
" });",
"}"
}
}
}
local python_config = {
["*.py"] = {
alternate = "tests/{dirname}/test_{basename}.py",
type = "source"
},
["tests/**/test_*.py"] = {
alternate = "{dirname}/{basename}.py",
type = "test",
template = {
"import unittest",
"from unittest import mock",
"",
"class {dirname|underscore|camelcase|capitalize}{basename|camelcase|capitalize}Test(unittest.TestCase):",
" pass",
"",
"",
"if __name__ == \"__main__\":",
" unittest.main()"
}
}
}
local dotnet_solution_config = {
["src/**/Controllers/*.cs"] = {
type = "controller",
alternate = {
"tests/{dirname}.Tests/Controllers/{basename}Tests.cs",
"tests/{dirname}.IntegrationTests/Controllers/{basename}Tests.cs"
}
},
["src/**/Models/*.cs"] = {
type = "model",
alternate = "tests/{dirname}.Tests/Models/{basename}Tests.cs"
},
["src/**/Views/*.cshtml"] = {
type = "view",
alternate = "tests/{dirname}.Tests/Views/{basename}Tests.cs"
},
["src/**/Services/*.cs"] = {
type = "service",
alternate = "tests/{dirname}.Tests/Services/{basename}Tests.cs"
},
["src/**/Extensions/*.cs"] = {
type = "extension",
alternate = "tests/{dirname}.Tests/Extensions/{basename}Tests.cs"
},
["*.csproj"] = {
type = "project"
},
["src/**/appsettings*json"] = {
type = "appsettings"
},
["src/*.cs"] = {
type = "source",
alternate = "tests/{dirname}.Tests/{basename}Tests.cs",
template = {
"using System;",
"",
"namespace {dirname|dot}",
"{",
" public class {basename}",
" {",
" }",
"}"
}
},
["tests/**.IntegrationTests/Controllers/*Tests.cs"] = {
type = "test",
alternate = "src/{dirname}/Controllers/{basename}.cs"
},
["tests/**.Tests/Controllers/*Tests.cs"] = {
type = "test",
alternate = "src/{dirname}/Controllers/{basename}.cs"
},
["tests/**.Tests/Views/*Tests.cs"] = {
type = "test",
alternate = "src/{dirname}/Views/{basename}.cs"
},
["tests/**.Tests/Models/*Tests.cs"] = {
type = "test",
alternate = "src/{dirname}/Models/{basename}.cs"
},
["tests/**.Tests/Services/*Tests.cs"] = {
type = "test",
alternate = "src/{dirname}/Services/{basename}.cs"
},
["tests/**.Tests/Extensions/*Tests.cs"] = {
type = "test",
alternate = "src/{dirname}/Extensions/{basename}.cs"
},
["tests/*Tests.cs"] = {
type = "test",
alternate = "src/{dirname}/{basename}.cs",
template = {
"using System;",
"",
"namespace {dirname|dot}",
"{",
" public class {basename}Tests",
" {",
" }",
"}"
}
}
}
local vim_plugin_config = {
["doc/*.txt"] = {
type = "help",
template = vim_doc_template
},
["autoload/*.vim"] = {
type = "autoload",
alternate = "test/{}.vader"
},
["test/*.vader"] = {
type = "test",
altername = "autoload/{}.vim"
},
["plugin/*.vim"] = {
type = "plugin",
template = {
"if exists(\"g:loaded_{}\") || &cp | finish | endif",
"",
"let g:loaded_{} = 1"
}
},
["README.md"] = {
template = vim_readme_template
}
}
local lua_vim_plugin_config = {
["doc/*.txt"] = {
type = "help",
template = vim_doc_template
},
["plugin/*.vim"] = {
type = "plugin",
template = {
"if exists(\"g:loaded_{}\") || &cp | finish | endif",
"",
"let g:loaded_{} = 1"
}
},
["lua/*.lua"] = {
type = "source",
alternate = "test/{}.lua"
},
["test/*.lua"] = {
type = "test",
alternate = "lua/{}.lua"
},
["README.md"] = {
template = vim_readme_template
}
}
local csharp_project_config = {
["*"] = {
start = "dotnet run",
console = "dotnet fsi"
}
}
local java_project_config = {
["src/main/java/*.java"] = {
type = "source",
template = {
"package {dirname|dot};",
"",
"public class {basename} {open}",
"{close}"
},
alternate = "src/test/java/{}Test.java"
},
["src/test/java/*Test.java"] = {
type = "test",
template = {
"package {dirname|dot};",
"",
"public class {basename}Test {open}",
"{close}"
},
alternate = "src/main/java/{}.java"
},
["src/main/java/module-info.java"] = {
type = "moduleinfo",
},
["src/main/java/**/package-info.java"] = {
type = "packageinfo",
}
}
local function c_project_config(source_extension, header_extension)
return {
["*"] = {
start = "make run"
},
["src/*." .. source_extension] = {
type = "source",
alternate = {
"src/{}." .. header_extension,
"test/{}." .. source_extension,
"include/{project|basename}/{}." .. header_extension,
}
},
["test/*." .. source_extension] = {
type = "test",
alternate = {
"src/{}." .. header_extension
}
},
["src/*." .. header_extension] = {
type = "header",
alternate = {
"src/{}." .. source_extension
}
},
["include/{project|basename}/*." .. header_extension] = {
type = "header",
alternate = {
"src/{}." .. header_extension
}
}
}
end
vim.g.projectionist_heuristics = {
["pubspec.yaml"] = flutter_config,
["requirements.txt|pyproject.toml"] = python_config,
["*.sln"] = dotnet_solution_config,
["*.csproj"] = csharp_project_config,
["plugin/|autoload/"] = vim_plugin_config,
["src/*.cpp|test/*.cpp"] = c_project_config("cpp", "hpp"),
["src/*.c|test/*.c"] = c_project_config("c", "h"),
["lua/"] = lua_vim_plugin_config,
["build.gradle|pom.xml"] = java_project_config
}

View File

@ -0,0 +1,29 @@
-------------------------------------------------------------------------------
-- - Telescope configuration -
-------------------------------------------------------------------------------
local actions = require('telescope.actions')
require('telescope').setup {
defaults = {
mappings = {
i = {
-- Switch out M-q and C-q since C-q will be used more often
["<M-q>"] = actions.send_to_qflist + actions.open_qflist,
["<C-q>"] = actions.send_selected_to_qflist + actions.open_qflist,
},
n = {
-- Switch out M-q and C-q since C-q will be used more often
["<M-q>"] = actions.send_to_qflist + actions.open_qflist,
["<C-q>"] = actions.send_selected_to_qflist + actions.open_qflist,
}
},
}
}
require('telescope').load_extension('dap')
default_opts = {noremap = true}
local function set_keymap(...) vim.api.nvim_set_keymap(...) end
set_keymap('n', '<C-P>', "<cmd>lua require('telescope.builtin').find_files()<CR>", default_opts)
set_keymap('n', '<C-M-F>', "<cmd>lua require('telescope.builtin').live_grep()<CR>", default_opts)

View File

@ -0,0 +1,12 @@
require'nvim-treesitter.configs'.setup {
ensure_installed = "maintained", -- one of "all", "maintained" (parsers with maintainers), or a list of languages
highlight = {
enable = true, -- false will disable the whole extension
},
playground = {
enable = true,
disable = {},
updatetime = 25, -- Debounced time for highlighting nodes in the playground from source code
persist_queries = false -- Whether the query persists across vim sessions
}
}

View File

@ -0,0 +1 @@
packer_compiled.vim

View File

@ -0,0 +1,4 @@
## Plugins
This directory should be mostly used to group custom functionalities together into a "plugin".
In some cases this can be used to set up plugin settings, if it is required to be run before plugin (othwerise use /after/plugin).

View File

@ -0,0 +1,30 @@
" -----------------------------------------------------------------------------
" - ALE Plugin configuration -
" -----------------------------------------------------------------------------
" ALE Options
let g:ale_disable_lsp = 1 " Disable LSP, we have other stuff for that
let g:ale_fix_on_save = 1 " Default
" ALE Linters configuration
let g:ale_linters = {}
let g:ale_linters.python = ['flake8']
let g:ale_linters.kotlin = ['ktlint']
let g:ale_linters.clojure = []
let g:ale_linters.cs = ['OmniSharp']
let g:ale_linters.cpp = ['clangd']
" ALE Fixers configuration
let g:ale_fixers = {}
let g:ale_fixers['*'] = ['remove_trailing_lines', 'trim_whitespace']
let g:ale_fixers.python = ['autopep8', 'isort']
let g:ale_fixers.dart = ['dartfmt']
let g:ale_fixers.lua = ['luafmt']
let g:ale_fixers.go = ['gofmt']
let g:ale_fixers.cpp = ['clang-format']
" Warnings navigation
nmap <silent> [W <Plug>(ale_first)
nmap <silent> [w <Plug>(ale_previous)
nmap <silent> ]w <Plug>(ale_next)
nmap <silent> ]W <Plug>(ale_last)

View File

@ -0,0 +1,5 @@
" -----------------------------------------------------------------------------
" - Ledger-cli vim support config -
" -----------------------------------------------------------------------------
let g:ledger_extra_options = '--pedantic --explicit --check-payees'
let g:ledger_decimal_sep = ','

View File

@ -0,0 +1,5 @@
" -----------------------------------------------------------------------------
" - Netrw config -
" -----------------------------------------------------------------------------
let g:netrw_keepdir = 0

View File

@ -0,0 +1,4 @@
" -----------------------------------------------------------------------------
" - Neovim ruby host -
" -----------------------------------------------------------------------------
let g:ruby_host_prog = '~/.asdf/shims/ruby'

View File

@ -0,0 +1,19 @@
" -----------------------------------------------------------------------------
" - Scratch buffer -
" Creates a basic scratch buffer
" Adopted from https://github.com/hagsteel/vimconf/blob/master/vimrc
" -----------------------------------------------------------------------------
functio CreateScratchBuffer(vertical)
if a:vertical == 1
:vnew
else
:new
endif
:setlocal buftype=nofile
:setlocal bufhidden=hide
:setlocal noswapfile
:set ft=scratch
endfunction
:command! Scratch call CreateScratchBuffer(1)
:command! Scratchh call CreateScratchBuffer(0)

View File

@ -0,0 +1,182 @@
" -----------------------------------------------------------------------------
" - Statusline setup -
" -----------------------------------------------------------------------------
function s:UpdateColors()
let ctermbg = synIDattr(synIDtrans(hlID('StatusLine')), 'fg', 'cterm')
let guibg = synIDattr(synIDtrans(hlID('StatusLine')), 'fg', 'gui')
let idguifg1 = synIDattr(synIDtrans(hlID('Function')), 'fg', 'gui')
let idctermfg1 = synIDattr(synIDtrans(hlID('Function')), 'fg', 'cterm')
" Green in gruvbox
exec 'hi User1 guifg=' . l:idguifg1 .
\' guibg=' . l:guibg .
\' cterm=bold gui=bold'
if l:idctermfg1
exec 'hi User1 ctermfg=' . l:idctermfg1
endif
let idguifg2 = synIDattr(synIDtrans(hlID('WarningMsg')), 'fg', 'gui')
let idctermfg2 = synIDattr(synIDtrans(hlID('WarningMsg')), 'fg', 'cterm')
" Red in gruvbox
exec 'hi User2 guifg=' . l:idguifg2 .
\' guibg=' . l:guibg .
\' cterm=bold gui=bold'
if l:idctermfg2
exec 'hi User2 ctermfg=' . l:idctermfg2
endif
let idguifg3 = synIDattr(synIDtrans(hlID('MoreMsg')), 'fg', 'gui')
let idctermfg3 = synIDattr(synIDtrans(hlID('MoreMsg')), 'fg', 'cterm')
" Yellow in gruvbox
exec 'hi User3 guifg=' . l:idguifg3 .
\' guibg=' . l:guibg .
\' cterm=bold gui=bold'
if l:idctermfg3
exec 'hi User3 ctermfg=' . l:idctermfg3
endif
let idguifg4 = synIDattr(synIDtrans(hlID('Identifier')), 'fg', 'gui')
let idctermfg4 = synIDattr(synIDtrans(hlID('Identifier')), 'fg', 'cterm')
" Blue in gruvbox
exec 'hi User4 guifg=' . l:idguifg4
\' guibg=' . l:guibg .
\' cterm=bold gui=bold'
if l:idctermfg4
exec 'hi User4 ctermfg=' . l:idctermfg4
endif
let idguifg5 = synIDattr(synIDtrans(hlID('Number')), 'fg', 'gui')
let idctermfg5 = synIDattr(synIDtrans(hlID('Number')), 'fg', 'cterm')
" Blue in gruvbox
exec 'hi User5 guifg=' . l:idguifg5 .
\' guibg=' . l:guibg .
\' cterm=bold gui=bold'
if l:idctermfg5
exec 'hi User5 ctermfg=' . l:idctermfg5
endif
if l:ctermbg
exec 'hi User1 ctermbg=' . l:ctermbg
exec 'hi User2 ctermbg=' . l:ctermbg
exec 'hi User3 ctermbg=' . l:ctermbg
exec 'hi User4 ctermbg=' . l:ctermbg
exec 'hi User5 ctermbg=' . l:ctermbg
endif
endfunction
augroup statuslineconf
autocmd!
autocmd ColorScheme * call s:UpdateColors()
augroup END
call s:UpdateColors()
" Checks file type to add a pretty glyph if available
function s:GetFileType()
if &filetype ==# "rust"
return "%2*%*"
elseif &filetype ==# "c"
return "%4*%*"
elseif &filetype ==# "cs"
return "%4*%*"
elseif &filetype ==# "python"
return "%3*%*"
elseif &filetype ==# "javascript"
return ""
elseif &filetype ==# "typescript"
return "%4*%*"
elseif &filetype ==# "vim"
return "%1*%*"
elseif &filetype ==# "clojure"
return ""
elseif &filetype ==# "html"
return ""
elseif &filetype ==# "haskell"
return ""
elseif &filetype ==# "markdown"
return ""
elseif &filetype ==# "org"
return ""
elseif &filetype ==# "scss"
return ""
elseif &filetype ==# "scala"
return ""
elseif &filetype ==# "elixir"
return "%5*%*"
elseif &filetype ==# "kotlin"
return "%2*洞%*"
elseif &filetype ==# "yml"
return ""
elseif &filetype ==# "toml"
return ""
elseif &filetype ==# "json"
return ""
else
return "%y"
endfunction
" Check current mode to add colorized mode
function s:GetMode()
if mode() == "n"
return "N"
elseif mode() == "i"
return "%3*I%*"
elseif mode() == "v"
return "%1*V%*"
elseif mode() == "V"
return "%1*V.%*"
elseif mode() == "\<C-V>"
return "%1*VB%*"
elseif mode() == "c"
return "%4*C%*"
else
return "[mode: " . mode() . "]"
endfunction
" Add basic [paste] if paste mode is enabled
function! s:PasteForStatusline()
let paste_status = &paste
if paste_status == 1
return " [paste] "
else
return ""
endif
endfunction
function! s:LinterStatus() abort
let l:counts = ale#statusline#Count(bufnr(''))
let l:all_errors = l:counts.error + l:counts.style_error
let l:all_non_errors = l:counts.total - l:all_errors
return l:counts.total == 0 ? '%1*OK%*' : printf(
\ '%%3*%dW%%* %%2*%dE%%*',
\ all_non_errors,
\ all_errors
\)
endfunction
function GetStatusLine()
let l:status_line_left = " " . s:GetMode() . " "
if exists('g:loaded_fugitive')
let l:fugitive_head = FugitiveHead()
if strlen(l:fugitive_head)
let l:status_line_left .= "%4* " . l:fugitive_head . "%*"
endif
endif
let l:status_line_left .= " %f" " Filename
let l:status_line_left .= " %1*%M%*" " Modified
let l:status_line_left .= " %2*%r%*" " Read only
let l:status_line_left .= s:PasteForStatusline()
if exists('g:did_coc_loaded')
let l:coc_status = coc#status()
if strlen(l:coc_status)
let l:status_line_left .= "%2*" . l:coc_status . "%*"
endif
endif
let l:status_line_right = "%= " " Align right statusline
if exists('g:loaded_ale')
let l:status_line_right .= s:LinterStatus() " ALE status
endif
let l:status_line_right .= " %2c:%3l/%3L (%3p%%) " " col, line, tot. lines
let l:status_line_right .= s:GetFileType() . " " " File type
return l:status_line_left . l:status_line_right
endfunction
set statusline=%!GetStatusLine()

View File

@ -0,0 +1,35 @@
" -----------------------------------------------------------------------------
" - Tabline setup -
" -----------------------------------------------------------------------------
function! GuiTabLabel()
let label = ''
let bufnrlist = tabpagebuflist(v:lnum)
" Add '+' if one of the buffers in the tab page is modified
for bufnr in bufnrlist
if getbufvar(bufnr, "&modified")
let label = '+'
break
endif
endfor
" Append the tab number
let label .= v:lnum.': '
" Append the buffer name
let name = bufname(bufnrlist[tabpagewinnr(v:lnum) - 1])
if name == ''
" give a name to no-name documents
if &buftype=='quickfix'
let name = '[Quickfix List]'
else
let name = '[No Name]'
endif
else
" get only the file name
let name = fnamemodify(name,":t")
endif
let label .= name
" Append the number of windows in the tab page
let wincount = tabpagewinnr(v:lnum, '$')
return label . ' [' . wincount . ']'
endfunction
set guitablabel=%{GuiTabLabel()}

View File

@ -0,0 +1,7 @@
" -----------------------------------------------------------------------------
" - Tex plugin configuration -
" Must be run before plugin, therefore it can't be located in after dir
" -----------------------------------------------------------------------------
" Set default .tex file flavor to latex
let g:tex_flavor = 'latex'

View File

@ -0,0 +1,6 @@
" -----------------------------------------------------------------------------
" - UltiSnips configuration -
" -----------------------------------------------------------------------------
" Force ultisnips to use vim directory (for supporting both NeoVim and Vim)
let g:UltiSnipsSnippetDirectories=[$OVIMHOME."/UltiSnips"]

View File

@ -0,0 +1,10 @@
" -----------------------------------------------------------------------------
" - Undo configuration -
" -----------------------------------------------------------------------------
set undofile
" Disable persistent undofile for temporary files!
augroup undoconf
autocmd!
autocmd BufWritePre /tmp/* setlocal noundofile
augroup END

View File

@ -0,0 +1,29 @@
" Must be set up before vimwiki plugin is initialized, can't be in after
let personal_wiki = {}
let personal_wiki.path = '~/vimwiki/'
let personal_wiki.ext = '.md'
let personal_wiki.index = 'Home'
let personal_wiki.syntax = 'markdown'
let personal_wiki.auto_diary_index = 1
let personal_wiki.auto_generate_links = 1
let personal_wiki.auto_toc = 1
let work_wiki = {}
let work_wiki.path = '~/vimwiki_work/'
let work_wiki.index = 'Home'
let work_wiki.syntax = 'markdown'
let work_wiki.ext = '.md'
let work_wiki.auto_diary_index = 1
let work_wiki.auto_generate_links = 1
let work_wiki.auto_toc = 1
let test_wiki = {}
let test_wiki.path = '/tmp'
let g:vimwiki_list = [personal_wiki, work_wiki, test_wiki]
" Disable vimwiki filetype on all markdown files
let g:vimwiki_global_ext = 0
" Prettier checkboxes
let g:vimwiki_listsyms = '✗○◐●✓'

View File

@ -0,0 +1,2 @@
*
!.gitignore

View File

@ -1,22 +0,0 @@
[
{
"name": "Lock screen",
"exec": "~/bin/lockscreen",
"icon": "system-lock-screen"
},
{
"name": "Logout",
"exec": "swaymsg exit",
"icon": "system-log-out"
},
{
"name": "Reboot",
"exec": "systemctl reboot",
"icon": "system-reboot"
},
{
"name": "Shutdown",
"exec": "systemctl -i poweroff",
"icon": "system-shutdown"
}
]

View File

@ -1,28 +0,0 @@
#bar {
margin: 30px /* affects top/bottom & left/right alignment */
}
button, image {
background: none;
border-style: none;
box-shadow: none;
color: #999
}
button {
padding-left: 10px;
padding-right: 10px;
margin: 5px
}
button:hover {
background-color: rgba (255, 255, 255, 0.1)
}
button:focus {
box-shadow: 0 0 2px;
}
grid {
/* e.g. for common background to all buttons */
}

View File

@ -1,22 +0,0 @@
/* Don't delete, just in case: the menu anchor is a button */
button {
background: none;
border-style: none;
box-shadow: none;
}
box {
/* Uncomment to set vertical margin
margin-top: 30px;
margin-bottom: 30px;
*/
}
#searchbox {
/* Adjust to your taste */
}
/* Menu items */
label {
padding-left: 5px
}

View File

@ -1,39 +0,0 @@
button, label, image {
background: none;
border-style: none;
box-shadow: none;
color: #999;
}
button {
padding: 5px;
margin: 5px
}
button:hover {
background-color: rgba (255, 255, 255, 0.1);
}
button:focus {
box-shadow: 0 0 2px;
}
#searchbox {
background: none;
border-color: #999;
color: #ccc;
margin-top: 20px;
margin-bottom: 20px
}
#separator {
background-color: rgba(200, 200, 200, 0.5);
margin-left: 500px;
margin-right: 500px;
margin-top: 10px;
margin-bottom: 10px
}
#description {
margin-bottom: 20px
}

View File

@ -1 +0,0 @@
alacritty -e

View File

@ -1,318 +0,0 @@
[
{
"output": "DP-1",
"layer": "bottom",
"position": "top",
"width": "auto",
"height": 30,
"margin-top": 0,
"margin-bottom": 0,
"padding-horizontal": 0,
"padding-vertical": 0,
"spacing": 4,
"controls": "off",
"items-padding": 0,
"css-name": "panel-top",
"icons": "light",
"modules-left": [
"button-sample",
"playerctl"
],
"modules-center": [
"clock"
],
"modules-right": [],
"controls-settings": {
"alignment": "right",
"components": [
"net",
"brightness",
"volume",
"battery"
],
"commands": {
"battery": "",
"net": ""
},
"custom-items": [
{
"name": "Wallpapers",
"icon": "azote",
"cmd": "azote"
}
],
"menu": {
"name": "Exit",
"icon": "system-shutdown-symbolic",
"items": [
{
"name": "Lock",
"cmd": "swaylock -f -c 000000"
},
{
"name": "Logout",
"cmd": "swaymsg exit"
},
{
"name": "Reboot",
"cmd": "systemctl reboot"
},
{
"name": "Shutdown",
"cmd": "systemctl -i poweroff"
}
]
},
"show-values": false,
"interval": 1,
"icon-size": 16,
"hover-opens": true,
"css-name": "controls-window",
"net-interface": "wlo1"
},
"button-sample": {
"icon": "view-grid",
"label": "button",
"label-position": "",
"command": "nwggrid",
"css-name": "button-custom"
},
"playerctl": {
"interval": 1,
"buttons": true,
"buttons-position": "left",
"chars": 50,
"css-name": "button-grid"
},
"clock": {
"format": "%a, %d. %b %H:%M:%S",
"interval": 1,
"on-right-click": "",
"css-name": "clock",
"tooltip-text": "",
"on-left-click": "",
"on-middle-click": "",
"on-scroll-up": "",
"on-scroll-down": ""
},
"name": "test"
},
{
"output": "DP-1",
"layer": "bottom",
"position": "bottom",
"width": "auto",
"height": 30,
"margin-top": 0,
"margin-bottom": 0,
"padding-horizontal": 10,
"padding-vertical": 0,
"spacing": 4,
"items-padding": 0,
"css-name": "all-bottom",
"focus": true,
"modules-left": [
"sway-taskbar"
],
"modules-center": [],
"modules-right": [
"executor-weather"
],
"sway-taskbar": {
"workspace-buttons": false,
"show-app-icon": true,
"show-layout": true,
"show-app-name": true,
"name-max-len": 15,
"workspaces-spacing": 0,
"task-spacing": 0,
"all-outputs": false,
"image-size": 16,
"workspace-menu": [
1,
2,
3,
4,
5,
6,
7,
8
]
},
"sway-workspaces": {
"numbers": []
},
"executor-weather": {
"script": "curl https://wttr.in/?format=1 -s",
"interval": 1800,
"css-name": "weather",
"on-right-click": "",
"icon-size": 16,
"show-icon": true,
"tooltip-text": "",
"on-left-click": "",
"on-middle-click": "",
"on-scroll-up": "",
"on-scroll-down": ""
},
"name": "",
"controls": "off",
"icons": "dark"
},
{
"output": "HDMI-A-1",
"layer": "bottom",
"position": "top",
"width": "auto",
"height": 30,
"margin-top": 0,
"margin-bottom": 0,
"padding-horizontal": 0,
"padding-vertical": 0,
"spacing": 4,
"controls": true,
"items-padding": 0,
"css-name": "panel-top",
"icons": "light",
"modules-left": [
"button-sample",
"playerctl"
],
"modules-center": [
"clock"
],
"modules-right": [],
"controls-settings": {
"alignment": "right",
"components": [
"net",
"brightness",
"volume",
"battery"
],
"commands": {
"battery": "",
"net": ""
},
"custom-items": [
{
"name": "Wallpapers",
"icon": "azote",
"cmd": "azote"
}
],
"menu": {
"name": "Exit",
"icon": "system-shutdown-symbolic",
"items": [
{
"name": "Lock",
"cmd": "swaylock -f -c 000000"
},
{
"name": "Logout",
"cmd": "swaymsg exit"
},
{
"name": "Reboot",
"cmd": "systemctl reboot"
},
{
"name": "Shutdown",
"cmd": "systemctl -i poweroff"
}
]
},
"show-values": false,
"interval": 1,
"icon-size": 16,
"hover-opens": true,
"css-name": "controls-window",
"net-interface": "wlo1"
},
"button-sample": {
"icon": "view-grid",
"label": "button",
"label-position": "",
"command": "nwggrid",
"css-name": "button-custom"
},
"playerctl": {
"interval": 1,
"buttons": true,
"buttons-position": "left",
"chars": 50,
"css-name": "button-grid"
},
"clock": {
"format": "%a, %d. %b %H:%M:%S",
"interval": 1,
"on-right-click": "",
"css-name": "clock",
"tooltip-text": "",
"on-left-click": "",
"on-middle-click": "",
"on-scroll-up": "",
"on-scroll-down": ""
}
},
{
"output": "HDMI-A-1",
"layer": "bottom",
"position": "bottom",
"width": "auto",
"height": 30,
"margin-top": 0,
"margin-bottom": 0,
"padding-horizontal": 10,
"padding-vertical": 0,
"spacing": 4,
"items-padding": 0,
"css-name": "all-bottom",
"focus": true,
"modules-left": [
"sway-taskbar"
],
"modules-center": [],
"modules-right": [
"executor-weather"
],
"sway-taskbar": {
"workspace-buttons": false,
"show-app-icon": true,
"show-layout": true,
"show-app-name": true,
"name-max-len": 15,
"workspaces-spacing": 0,
"task-spacing": 0,
"all-outputs": false,
"image-size": 16,
"workspace-menu": [
1,
2,
3,
4,
5,
6,
7,
8
]
},
"sway-workspaces": {
"numbers": []
},
"executor-weather": {
"script": "curl https://wttr.in/?format=1 -s",
"interval": 1800,
"css-name": "weather",
"on-right-click": "",
"icon-size": 16,
"show-icon": true,
"tooltip-text": "",
"on-left-click": "",
"on-middle-click": "",
"on-scroll-up": "",
"on-scroll-down": ""
}
}
]

View File

@ -1,41 +0,0 @@
#!/usr/bin/python
import subprocess
# You may either use the full icon(s) path here, like e.g.:
# "/home/piotr/.config/nwg-panel/icons_light/arch-linux.svg"
# or just give the icon name, like below.
# The icon name must either exist in your icon theme, or you may place `icon_name.svg`
# custom files in '~/.config/nwg-panel/icons_light/' and '~/.config/nwg-panel/icons_dark/'.
def main():
arch, aur = check_updates()
if arch and aur:
print("software-update-urgent")
print("{}/{}".format(arch, aur))
elif arch:
print("software-update-available")
print("{}".format(arch))
elif aur:
print("software-update-available")
print("{}".format(aur))
def check_updates():
arch, aur = 0, 0
try:
arch = len(subprocess.check_output(["checkupdates"]).decode("utf-8").splitlines())
except:
pass
try:
aur = len(subprocess.check_output(["trizen", "-Qqu", "-a"]).decode("utf-8").splitlines())
except:
pass
return arch, aur
if __name__ == "__main__":
main()

View File

@ -1,14 +0,0 @@
#!/bin/bash
# Based on the 'Github notifications' example from Waybar's Wiki
# Depends on jq Command-line JSON processor
# Obtain a notifications token at https://github.com/settings/tokens
# save it to a file as below.
token=`cat ${HOME}/.config/github/notifications.token`
count=`curl -u nwg-piotr:${token} https://api.github.com/notifications -s | jq '. | length'`
if [[ "$count" != "0" ]]; then
echo /home/piotr/.config/nwg-panel/icons_light/github.svg
echo $count
fi

View File

@ -1,175 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="16"
height="16"
id="svg2424"
sodipodi:version="0.32"
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07, custom)"
version="1.0"
sodipodi:docname="arch-linux.svg"
inkscape:output_extension="org.inkscape.output.svg.inkscape"
inkscape:export-filename="/home/thayer/archlinux-logo-contest/archer-full-detail.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90">
<defs
id="defs2426">
<linearGradient
gradientUnits="userSpaceOnUse"
id="path1082_2_"
y2="129.3468"
x2="112.49853"
y1="6.1372099"
x1="112.49854"
gradientTransform="translate(287,-83)">
<stop
id="stop193"
offset="0"
style="stop-color:#ffffff;stop-opacity:0" />
<stop
id="stop195"
offset="1"
style="stop-color:#ffffff;stop-opacity:0.27450982;" />
<midPointStop
id="midPointStop197"
style="stop-color:#FFFFFF"
offset="0" />
<midPointStop
id="midPointStop199"
style="stop-color:#FFFFFF"
offset="0.5" />
<midPointStop
id="midPointStop201"
style="stop-color:#000000"
offset="1" />
</linearGradient>
<linearGradient
id="linearGradient3388">
<stop
style="stop-color:#000000;stop-opacity:0;"
offset="0"
id="stop3390" />
<stop
style="stop-color:#000000;stop-opacity:0.37113401;"
offset="1"
id="stop3392" />
</linearGradient>
<linearGradient
inkscape:collect="always"
id="linearGradient4346">
<stop
style="stop-color:#00bdec;stop-opacity:1"
offset="0"
id="stop4348" />
<stop
style="stop-color:#40bfde;stop-opacity:1"
offset="1"
id="stop4350" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4346"
id="linearGradient4352"
x1="400.6142"
y1="634.15063"
x2="616.48553"
y2="666.97791"
gradientUnits="userSpaceOnUse" />
<linearGradient
inkscape:collect="always"
id="linearGradient5323">
<stop
style="stop-color:#6e6e6e;stop-opacity:1"
offset="0"
id="stop5325" />
<stop
style="stop-color:#4d4d4d;stop-opacity:1"
offset="1"
id="stop5327" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient5323"
id="linearGradient5329"
x1="291.83591"
y1="238.08237"
x2="650.81366"
y2="348.96875"
gradientUnits="userSpaceOnUse" />
<linearGradient
inkscape:collect="always"
xlink:href="#path1082_2_"
id="linearGradient2216"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(-0.3937741,0,0,0.393752,978.34967,416.9815)"
x1="541.33502"
y1="104.50665"
x2="606.91248"
y2="303.14029" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
gridtolerance="10000"
guidetolerance="10"
objecttolerance="10"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="24.111144"
inkscape:cx="8.6210011"
inkscape:cy="8.4869326"
inkscape:document-units="px"
inkscape:current-layer="g2210"
inkscape:window-width="1366"
inkscape:window-height="704"
inkscape:window-x="0"
inkscape:window-y="0"
showgrid="false"
inkscape:window-maximized="1"
inkscape:document-rotation="0" />
<metadata
id="metadata2429">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-269.51781,-265.60124)">
<g
id="g2424"
transform="matrix(1.3473684,0,0,1.3473684,-632.88236,-513.34366)">
<g
id="g2210"
transform="matrix(0.25,0,0,0.25,502.3126,469.21738)">
<g
id="g28"
transform="matrix(0.29166667,0,0,0.29166667,477.3751,297.68101)"
style="opacity:1;fill:#444444;fill-opacity:1">
<path
inkscape:connector-curvature="0"
id="path2518"
d="m 741.00015,483.12318 c -6.34282,15.5509 -10.19396,25.73748 -17.25586,40.82611 4.32983,4.58962 9.65118,9.91474 18.28217,15.95123 -9.27916,-3.81832 -15.60463,-7.64184 -20.33478,-11.61987 -9.03787,18.85892 -23.20682,45.7121 -51.94153,97.34253 22.57885,-13.03517 40.08235,-21.07534 56.39465,-24.14429 -0.69789,-3.00828 -1.0707,-6.27752 -1.0437,-9.67163 l 0.0174,-0.71319 c 0.35836,-14.46931 7.88723,-25.59559 16.80359,-24.84009 8.91635,0.75549 15.85732,13.1018 15.49896,27.5711 -0.0675,2.72544 -0.38436,5.34421 -0.92194,7.77558 16.13675,3.15791 33.47519,11.16227 55.75104,24.02252 -4.39297,-8.08778 -8.32763,-15.37432 -12.07214,-22.31781 -5.89822,-4.57152 -12.04738,-10.51908 -24.59656,-16.96014 8.62559,2.24128 14.80767,4.83303 19.62158,7.72338 -38.07152,-70.88252 -41.14731,-80.30772 -54.20288,-110.94543 z"
style="fill:#444444;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.556641;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" />
</g>
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 5.9 KiB

View File

@ -1,180 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="16"
height="16"
id="svg2424"
sodipodi:version="0.32"
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07, custom)"
version="1.0"
sodipodi:docname="arch-notification.svg"
inkscape:output_extension="org.inkscape.output.svg.inkscape"
inkscape:export-filename="/home/thayer/archlinux-logo-contest/archer-full-detail.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90">
<defs
id="defs2426">
<linearGradient
gradientUnits="userSpaceOnUse"
id="path1082_2_"
y2="129.3468"
x2="112.49853"
y1="6.1372099"
x1="112.49854"
gradientTransform="translate(287,-83)">
<stop
id="stop193"
offset="0"
style="stop-color:#ffffff;stop-opacity:0" />
<stop
id="stop195"
offset="1"
style="stop-color:#ffffff;stop-opacity:0.27450982;" />
<midPointStop
id="midPointStop197"
style="stop-color:#FFFFFF"
offset="0" />
<midPointStop
id="midPointStop199"
style="stop-color:#FFFFFF"
offset="0.5" />
<midPointStop
id="midPointStop201"
style="stop-color:#000000"
offset="1" />
</linearGradient>
<linearGradient
id="linearGradient3388">
<stop
style="stop-color:#000000;stop-opacity:0;"
offset="0"
id="stop3390" />
<stop
style="stop-color:#000000;stop-opacity:0.37113401;"
offset="1"
id="stop3392" />
</linearGradient>
<linearGradient
inkscape:collect="always"
id="linearGradient4346">
<stop
style="stop-color:#00bdec;stop-opacity:1"
offset="0"
id="stop4348" />
<stop
style="stop-color:#40bfde;stop-opacity:1"
offset="1"
id="stop4350" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4346"
id="linearGradient4352"
x1="400.6142"
y1="634.15063"
x2="616.48553"
y2="666.97791"
gradientUnits="userSpaceOnUse" />
<linearGradient
inkscape:collect="always"
id="linearGradient5323">
<stop
style="stop-color:#6e6e6e;stop-opacity:1"
offset="0"
id="stop5325" />
<stop
style="stop-color:#4d4d4d;stop-opacity:1"
offset="1"
id="stop5327" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient5323"
id="linearGradient5329"
x1="291.83591"
y1="238.08237"
x2="650.81366"
y2="348.96875"
gradientUnits="userSpaceOnUse" />
<linearGradient
inkscape:collect="always"
xlink:href="#path1082_2_"
id="linearGradient2216"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(-0.3937741,0,0,0.393752,978.34967,416.9815)"
x1="541.33502"
y1="104.50665"
x2="606.91248"
y2="303.14029" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
gridtolerance="10000"
guidetolerance="10"
objecttolerance="10"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="19.264932"
inkscape:cx="8.4073787"
inkscape:cy="8.7043899"
inkscape:document-units="px"
inkscape:current-layer="g2210"
inkscape:window-width="1366"
inkscape:window-height="704"
inkscape:window-x="0"
inkscape:window-y="0"
showgrid="false"
inkscape:window-maximized="1"
inkscape:document-rotation="0" />
<metadata
id="metadata2429">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-269.51781,-265.60124)">
<g
id="g2424"
transform="matrix(1.3473684,0,0,1.3473684,-632.88236,-513.34366)">
<g
id="g2210"
transform="matrix(0.25,0,0,0.25,502.3126,469.21738)">
<g
id="g28"
transform="matrix(0.29166667,0,0,0.29166667,477.3751,297.68101)">
<path
inkscape:connector-curvature="0"
id="path2518"
d="m 741.00015,483.12318 c -6.34282,15.5509 -10.19396,25.73748 -17.25586,40.82611 4.32983,4.58962 9.65118,9.91474 18.28217,15.95123 -9.27916,-3.81832 -15.60463,-7.64184 -20.33478,-11.61987 -9.03787,18.85892 -23.20682,45.7121 -51.94153,97.34253 22.57885,-13.03517 40.08235,-21.07534 56.39465,-24.14429 -0.69789,-3.00828 -1.0707,-6.27752 -1.0437,-9.67163 l 0.0174,-0.71319 c 0.35836,-14.46931 7.88723,-25.59559 16.80359,-24.84009 8.91635,0.75549 15.85732,13.1018 15.49896,27.5711 -0.0675,2.72544 -0.38436,5.34421 -0.92194,7.77558 16.13675,3.15791 33.47519,11.16227 55.75104,24.02252 -4.39297,-8.08778 -8.32763,-15.37432 -12.07214,-22.31781 -5.89822,-4.57152 -12.04738,-10.51908 -24.59656,-16.96014 8.62559,2.24128 14.80767,4.83303 19.62158,7.72338 -38.07152,-70.88252 -41.14731,-80.30772 -54.20288,-110.94543 z"
style="fill:#444444;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.556641;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" />
<circle
r="15.029297"
cy="509.56363"
cx="787.47961"
id="path3731"
style="fill:#ff6400;fill-opacity:1;stroke-width:1.87866" />
</g>
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 6.1 KiB

View File

@ -1,3 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" version="1.1">
<path style="fill:#444444" d="M 8 1 L 4 5 L 1 5 L 1 11 L 4 11 L 8 15 L 8 1 z M 10 1 L 10 2.5 C 12.32 3.24 14 5.43 14 8 C 14 10.57 12.32 12.76 10 13.5 L 10 15 C 13.15 14.22 15.5 11.4 15.5 8 C 15.5 4.6 13.15 1.78 10 1 z M 10 5 L 10 11 C 11.06 10.42 11.789 9.3 11.789 8 C 11.789 6.7 11.07 5.58 10 5 z"/>
</svg>

Before

Width:  |  Height:  |  Size: 387 B

View File

@ -1,4 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" version="1.1">
<path style="fill:#444444" d="M 8,1 4,5 H 1 V 11 H 4 L 8,15 Z"/>
<path style="opacity:0.3;fill:#444444" d="M 10 1 L 10 2.5 C 12.32 3.24 14 5.43 14 8 C 14 10.57 12.32 12.76 10 13.5 L 10 15 C 13.15 14.22 15.5 11.4 15.5 8 C 15.5 4.6 13.15 1.78 10 1 z M 10 5 L 10 11 C 11.06 10.42 11.789 9.3 11.789 8 C 11.789 6.7 11.07 5.58 10 5 z"/>
</svg>

Before

Width:  |  Height:  |  Size: 418 B

View File

@ -1,4 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" version="1.1">
<path style="fill:#444444" d="M 8,1 4,5 H 1 V 11 H 4 L 8,15 Z M 10,5 V 11 C 11.06,10.42 11.79,9.3 11.79,8 11.79,6.7 11.07,5.58 10,5 Z"/>
<path style="opacity:0.3;fill:#444444" d="M 10,1 V 2.5 C 12.32,3.24 14,5.43 14,8 14,10.57 12.32,12.76 10,13.5 V 15 C 13.15,14.22 15.5,11.4 15.5,8 15.5,4.6 13.15,1.78 10,1 Z"/>
</svg>

Before

Width:  |  Height:  |  Size: 400 B

View File

@ -1,54 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="16"
height="16"
version="1.1"
id="svg4"
sodipodi:docname="audio-volume-muted-symbolic.svg"
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)">
<metadata
id="metadata10">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs8" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1920"
inkscape:window-height="1020"
id="namedview6"
showgrid="false"
inkscape:zoom="46.125"
inkscape:cx="2.7642276"
inkscape:cy="8"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="svg4" />
<path
id="path854"
style="fill:#444444;fill-opacity:1;stroke:none;stroke-width:0.567103;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;opacity:0.3"
d="M 10.687042,4.8541011 9.4606576,6.1810452 11.141871,8.0000002 9.4606576,9.8189564 10.687042,11.145899 12.36887,9.326294 14.050085,11.145899 15.27647,9.8189564 13.595256,8.0000003 15.27647,6.1810453 14.050085,4.8541012 12.36887,6.6737052 Z M 8,1 4,5 H 1 v 6 h 3 l 4,4 z" />
</svg>

Before

Width:  |  Height:  |  Size: 1.9 KiB

Some files were not shown because too many files have changed in this diff Show More