diff --git a/home/.config/nvim/lua/modules/completion.lua b/home/.config/nvim/lua/modules/completion.lua index 709085c..079409b 100644 --- a/home/.config/nvim/lua/modules/completion.lua +++ b/home/.config/nvim/lua/modules/completion.lua @@ -34,10 +34,10 @@ function M.cmp_conf() Folder = '', EnumMember = '', Constant = '', - Struct = 'פּ', + Struct = '', Event = '', Operator = '', - TypeParameter = '' + TypeParameter = '' } -- load lspkind icons vim_item.kind = string.format('%s %s', lspkind_icons[vim_item.kind], vim_item.kind) diff --git a/home/.config/nvim/lua/modules/lsp.lua b/home/.config/nvim/lua/modules/lsp.lua index ffb5ffa..a797842 100644 --- a/home/.config/nvim/lua/modules/lsp.lua +++ b/home/.config/nvim/lua/modules/lsp.lua @@ -92,7 +92,6 @@ function M.lsp_conf() local runtime_path = vim.split(package.path, ';') table.insert(runtime_path, 'lua/?.lua') table.insert(runtime_path, 'lua/?/init.lua') - lspconf.sumneko_lua.setup { on_attach = on_attach, capabilities = capabilities, @@ -103,21 +102,16 @@ function M.lsp_conf() }, settings = { Lua = { - diagnostics = { - globals = {'vim'} - }, - runtime = { - version = 'LuaJIT', - path = runtime_path - }, + diagnostics = {globals = {'vim'}}, + runtime = {version = 'LuaJIT', path = runtime_path}, workspace = { library = vim.api.nvim_get_runtime_file('', true), - maxPreload = 100000, - preloadFileSize = 100000 + maxPreload = 1500, + preloadFileSize = 150 }, - telemetry = { - enable = false - } + completion = {callSnippet = 'Replace'}, + hint = {enable = true}, + telemetry = {enable = false} } } } diff --git a/home/.config/nvim/lua/modules/ui.lua b/home/.config/nvim/lua/modules/ui.lua index 2784eb3..ee43cb4 100644 --- a/home/.config/nvim/lua/modules/ui.lua +++ b/home/.config/nvim/lua/modules/ui.lua @@ -332,14 +332,19 @@ function M.bufferline_conf() } end +-- FIX: wait for config migration to setup() function M.nvimtree_conf() - vim.g.nvim_tree_width = 35 + vim.g.nvim_tree_gitignore = 1 vim.g.nvim_tree_ignore = {'.git', '.hg', '.svn', 'node_modules'} - vim.g.nvim_tree_auto_ignore_ft = {'dashboard'} - vim.g.nvim_tree_respect_buf_cwd = 1 + vim.g.nvim_tree_auto_ignore_ft = {'dashboard', 'alpha'} vim.g.nvim_tree_indent_markers = 1 vim.g.nvim_tree_git_hl = 1 - vim.g.nvim_tree_add_trailing = 0 + vim.g.nvim_tree_highlight_opened_files = 1 + -- vim.g.nvim_tree_add_trailing = 1 + -- vim.g.nvim_tree_disable_window_picker = 1 + -- vim.g.nvim_tree_symlink_arrow = ' ➛ ' + vim.g.nvim_tree_respect_buf_cwd = 1 + -- vim.g.nvim_tree_create_in_closed_folder = 1 vim.g.nvim_tree_icons = { default = '', symlink = '', @@ -369,6 +374,28 @@ function M.nvimtree_conf() error = '' } } + + require('nvim-tree').setup { + open_on_setup = false, + auto_close = true, + hijack_cursor = true, + update_cwd = true, + lsp_diagnostics = true, + update_focused_file = { + enable = true, + update_cwd = false, + ignore_list = {} + }, + system_open = { + cmd = 'xdg-open', + args = {} + }, + view = { + width = 35, + side = 'left', + auto_resize = false + } + } end function M.whichkey_conf() diff --git a/home/.config/nvim/lua/plugins.lua b/home/.config/nvim/lua/plugins.lua index 7b2a0c4..2885ea2 100644 --- a/home/.config/nvim/lua/plugins.lua +++ b/home/.config/nvim/lua/plugins.lua @@ -35,20 +35,7 @@ return packer.startup(function(use) use { 'kyazdani42/nvim-tree.lua', cmd = 'NvimTreeToggle', - setup = ui.nvimtree_conf, - -- FIX: when all the options are migrated to setup() - config = function() - require('nvim-tree').setup { - open_on_setup = false, - auto_close = true, - hijack_cursor = true, - update_cwd = true, - lsp_diagnostics = true, - view = { - auto_resize = false - } - } - end + config = ui.nvimtree_conf } use { 'folke/which-key.nvim', diff --git a/home/.local/bin/0x0 b/home/.local/bin/0x0 new file mode 100755 index 0000000..f33b386 --- /dev/null +++ b/home/.local/bin/0x0 @@ -0,0 +1,4 @@ +#!/bin/sh + +website=$(curl -F"file=@${1:--}" "${WEBSITE:-https://0x0.st}") +echo "$website" diff --git a/home/.local/bin/meow b/home/.local/bin/meow new file mode 100755 index 0000000..af58069 --- /dev/null +++ b/home/.local/bin/meow @@ -0,0 +1,16 @@ +#!/bin/sh + +# POSIX shell client for PurritoBin to upload encrypted message + +: "${P_SERVER=https://bsd.ac}" +: "${P_PORT=42069}" +: "${P_MAXTIME=30}" + +# generate a 256 byte random key +# for using the aes-256-cbc cipher +key="$(openssl rand -hex 32)" +iv="$(openssl rand -hex 16)" +# calculate its encryption and upload it +url="$(openssl enc -aes-256-cbc -K ${key} -iv ${iv} -e -base64 -A < ${1:-/dev/stdin} | purr)" +printf %s\\n "${url%\/*}/paste.html#${url##*\/}_${key}_${iv}" +unset key iv url diff --git a/home/.local/bin/meowd b/home/.local/bin/meowd new file mode 100755 index 0000000..c7e45ad --- /dev/null +++ b/home/.local/bin/meowd @@ -0,0 +1,16 @@ +#!/bin/sh + +# POSIX shell client for PurritoBin to decrypt the message + +: "${P_SERVER=https://bsd.ac}" +: "${P_PORT=42069}" +: "${P_MAXTIME=30}" + +url="$1" +baseurl="${url%\/*}" +vals="${url##*\#}" +paste=$(printf %s\\n "${vals}" | cut -d'_' -f1) +key=$(printf %s\\n "${vals}" | cut -d'_' -f2) +iv=$(printf %s\\n "${vals}" | cut -d'_' -f3) +curl --max-time "${P_MAXTIME}" --write-out "\n" --silent "${baseurl}/${paste}" | openssl enc -aes-256-cbc -base64 -d -K ${key} -iv ${iv} +unset url baseurl vals paste key iv diff --git a/home/.local/bin/purr b/home/.local/bin/purr new file mode 100755 index 0000000..2f2392f --- /dev/null +++ b/home/.local/bin/purr @@ -0,0 +1,10 @@ +#!/bin/sh + +# POSIX shell client for PurritoBin to upload standard message + +: "${P_SERVER=https://bsd.ac}" +: "${P_PORT=42069}" +: "${P_MAXTIME=30}" +: "${P_TIME=week}" # can be set to day/week/month/ + +curl --silent --max-time "${P_MAXTIME}" --data-binary "@${1:-/dev/stdin}" "${P_SERVER}:${P_PORT}/${P_TIME}"