diff options
Update neovim and added static http-server
-rw-r--r-- | .config/nvim/init.lua | 4 | ||||
-rwxr-xr-x | .local/bin/http-static | 31 | ||||
m--------- | .local/share/nvim/site/pack/plugins/start/conform | 0 | ||||
m--------- | .local/share/nvim/site/pack/plugins/start/lazydev | 0 | ||||
m--------- | .local/share/nvim/site/pack/plugins/start/mason-lspconfig | 0 | ||||
m--------- | .local/share/nvim/site/pack/plugins/start/nvim-cmp | 0 | ||||
m--------- | .local/share/nvim/site/pack/plugins/start/nvim-lspconfig | 0 | ||||
m--------- | .local/share/nvim/site/pack/plugins/start/nvim-treesitter | 0 | ||||
-rw-r--r-- | .profile | 47 | ||||
m--------- | .zfunc/zsh-completions | 0 | ||||
-rw-r--r-- | .zshrc | 4 |
11 files changed, 58 insertions, 28 deletions
diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua index b28863e..b2f3021 100644 --- a/.config/nvim/init.lua +++ b/.config/nvim/init.lua @@ -41,6 +41,8 @@ vim.opt.fillchars = { vim.o.showtabline = 2 +vim.cmd.colorscheme('retrobox') + vim.keymap.set({ 'n', 'x' }, '<leader>y', '"+y') vim.keymap.set('n', '<leader>p', '"+p') vim.keymap.set('x', '<leader>p', '"+P') @@ -53,7 +55,7 @@ vim.keymap.set('n', '<Esc>', function() end) vim.keymap.set('n', '<leader>t', function() - vim.cmd.vsplit() + vim.cmd.split() vim.cmd.terminal() end) diff --git a/.local/bin/http-static b/.local/bin/http-static new file mode 100755 index 0000000..7e6fa55 --- /dev/null +++ b/.local/bin/http-static @@ -0,0 +1,31 @@ +#!/usr/bin/env python3 + +from argparse import ArgumentParser +from collections.abc import Sequence +from typing import Optional +from pathlib import Path +from http.server import SimpleHTTPRequestHandler,ThreadingHTTPServer +import sys + +def serve(bind, port, directory): + def handler(request, client_address, server): + return SimpleHTTPRequestHandler(request, client_address, server, directory=directory) + + with ThreadingHTTPServer((bind, port), handler) as httpd: + print(*httpd.socket.getsockname()) + try: + httpd.serve_forever() + except KeyboardInterrupt: + return + + +def main(argv: Optional[Sequence[str]] = None): + parser = ArgumentParser() + parser.add_argument('-b', '--bind', metavar='ADDRESS', default='', help='bind to this address') + parser.add_argument('-p', '--port', default=8080, type=int, help='bind to this port') + parser.add_argument('directory', type=Path, default=Path.cwd(), nargs="?", help='serve this directory') + args = parser.parse_args(argv) + serve(**vars(args)) + +if __name__ == '__main__': + sys.exit(main()) diff --git a/.local/share/nvim/site/pack/plugins/start/conform b/.local/share/nvim/site/pack/plugins/start/conform -Subproject 70019124aa4f2e6838be9fbd2007f6d13b27a96 +Subproject 363243c03102a531a8203311d4f2ae704c620d9 diff --git a/.local/share/nvim/site/pack/plugins/start/lazydev b/.local/share/nvim/site/pack/plugins/start/lazydev -Subproject 8620f82ee3f59ff2187647167b6b47387a13a01 +Subproject a1b78b2ac6f978c72e76ea90ae92a94edf380cf diff --git a/.local/share/nvim/site/pack/plugins/start/mason-lspconfig b/.local/share/nvim/site/pack/plugins/start/mason-lspconfig -Subproject 97d9f1d3ad205dece6bcafd1d71cf1507608f3c +Subproject f75e877f5266e87523eb5a18fcde2081820d087 diff --git a/.local/share/nvim/site/pack/plugins/start/nvim-cmp b/.local/share/nvim/site/pack/plugins/start/nvim-cmp -Subproject 8c82d0bd31299dbff7f8e780f5e06d2283de967 +Subproject 12509903a5723a876abd65953109f926f4634c3 diff --git a/.local/share/nvim/site/pack/plugins/start/nvim-lspconfig b/.local/share/nvim/site/pack/plugins/start/nvim-lspconfig -Subproject 88157521e890fe7fdf18bee22438875edd6300a +Subproject 00b236b795acfb79339bd6771488c155073a288 diff --git a/.local/share/nvim/site/pack/plugins/start/nvim-treesitter b/.local/share/nvim/site/pack/plugins/start/nvim-treesitter -Subproject 097fb77312c731347180e8907424f6c967323f0 +Subproject 4e701776f8824fc188a6254f57d080971ce28c9 @@ -18,38 +18,35 @@ do done export PATH - export XDG_CONFIG_HOME="$HOME/.config/" export XDG_CACHE_HOME="$HOME/.cache/" export XDG_DATA_HOME="$HOME/.local/share" export XDG_STATE_HOME="$HOME/.local/state/" -if command -v nvim > /dev/null -then - export VISUAL=nvim -elif command -v vim > /dev/null -then - export VISUAL=vim -elif command -v vi > /dev/null -then - export VISUAL=vi -fi +for i in nvim vim vi +do + if command -v "$i" > /dev/null + then + export VISUAL="$i" + break + fi +done -if command -v ex > /dev/null -then - export EDITOR=nvim -elif command -v ed > /dev/null -then - export EDITOR=vim -fi +for i in ex ed +do + if command -v "$i" > /dev/null + then + export EDITOR=$i + fi +done -if command -v less > /dev/null -then - export PAGER=less -elif command -v more > /dev/null -then - export PAGER=more -fi +for i in less more +do + if command -v "$i" > /dev/null + then + export PAGER=less + fi +done if test -f "$HOME"/.cargo/env then diff --git a/.zfunc/zsh-completions b/.zfunc/zsh-completions -Subproject a7f01622f7bc6941d1c6297be6995fe1bbc9d4d +Subproject 85e041be36a33d8f6ca71746654406425d3a910 @@ -7,12 +7,12 @@ autoload -Uz edit-command-line zle -N edit-command-line bindkey -M vicmd v edit-command-line -HISTFILE=$HOME/.histfile +HISTFILE="$HOME/.histfile" HISTSIZE=1000 SAVEHIST=1000 setopt hist_ignore_all_dups hist_save_no_dups hist_reduce_blanks share_history extended_history -fpath=($HOME/.zfunc $HOME/.zfunc/zsh-completions/src $fpath) +fpath=("$HOME/.zfunc" "$HOME/.zfunc/zsh-completions/src" $fpath) alias diff='diff --color=auto' alias ls='ls -F --color=auto' |