misc: some settings
This commit is contained in:
parent
eab3612862
commit
5a347f6f5b
11
bin/nnnedit
Executable file
11
bin/nnnedit
Executable file
|
@ -0,0 +1,11 @@
|
|||
#!/bin/sh
|
||||
|
||||
MIMETYPE=$(xdg-mime query filetype "$1")
|
||||
case "$MIMETYPE" in
|
||||
image/*)
|
||||
gimp "$1"
|
||||
;;
|
||||
*)
|
||||
"$EDITOR" "$1"
|
||||
;;
|
||||
esac
|
2
bin/sc
2
bin/sc
|
@ -4,7 +4,7 @@ set -e
|
|||
VIRTMON=virtmon
|
||||
SC_FONT=${SC_FONT:-'WenQuanYi-Micro-Hei'}
|
||||
PID_FILE="/tmp/recording.pid"
|
||||
OUTPUT_DIR="/home/klesh/Videos"
|
||||
OUTPUT_DIR="$HOME/Videos"
|
||||
|
||||
_stop_recording() {
|
||||
killall screenkey 2>/dev/null || true
|
||||
|
|
|
@ -25,6 +25,7 @@ if status is-interactive
|
|||
set -gx LS_COLORS 'ow=34;42;40'
|
||||
|
||||
# === nnn configuration
|
||||
set -gx VISUAL nnnedit
|
||||
set -gx NNN_PLUG 'c:fzcd;m:nmount;x:!chmod +x $nnn;X:!chmod -x $nnn;d:dragdrop;p:preview-tui'
|
||||
set -gx NNN_FIFO /tmp/nnn.fifo
|
||||
set -gx NNN_ARCHIVE '\.(7z|a|ace|alz|arc|arj|bz|bz2|cab|cpio|deb|gz|jar|lha|lz|lzh|lzma|lzo|rar|rpm|rz|t7z|tar|tbz|tbz2|tgz|tlz|txz|tZ|tzo|war|xpi|xz|Z|zip)$'
|
||||
|
|
|
@ -32,6 +32,7 @@ case "$PM" in
|
|||
sudo pacman -S --noconfirm --needed nnn ueberzug
|
||||
mkdir -p "$NNN_CONFIG_DIR/plugins"
|
||||
cp -r /usr/share/nnn/plugins/* "$NNN_CONFIG_DIR/plugins"
|
||||
yay -S dragon-drop
|
||||
;;
|
||||
esac
|
||||
|
||||
|
|
|
@ -3,12 +3,12 @@ vim.g.mapleader = ";"
|
|||
vim.g.clipboard = {
|
||||
name = "sysclip",
|
||||
copy = {
|
||||
["+"] = {"xsel", "-b"},
|
||||
["*"] = {"xsel", "-b"},
|
||||
["+"] = { "xsel", "-b" },
|
||||
["*"] = { "xsel", "-b" },
|
||||
},
|
||||
paste = {
|
||||
["+"] = {"xsel", "-b"},
|
||||
["*"] = {"xsel", "-b"},
|
||||
["+"] = { "xsel", "-b" },
|
||||
["*"] = { "xsel", "-b" },
|
||||
},
|
||||
}
|
||||
|
||||
|
@ -47,4 +47,15 @@ if gruvbox_ok then
|
|||
end
|
||||
|
||||
|
||||
-- format on save
|
||||
vim.cmd [[autocmd BufWritePre * lua vim.lsp.buf.formatting_sync()]]
|
||||
|
||||
|
||||
-- open quickfix buffer after :grep or :vimgrep
|
||||
vim.cmd [[
|
||||
augroup quickfix
|
||||
autocmd!
|
||||
autocmd QuickFixCmdPost [^l]* cwindow
|
||||
autocmd QuickFixCmdPost l* lwindow
|
||||
augroup END
|
||||
]]
|
||||
|
|
|
@ -51,6 +51,7 @@ keymap(NORMAL, '<leader>tm', ':Telescope media_files<cr>', { noremap = true })
|
|||
keymap(NORMAL, '<leader>gc', ':Telescope git_branches<cr>', { noremap = true })
|
||||
keymap(NORMAL, '<leader>gr', ':Telescope lsp_references<cr>', { noremap = true })
|
||||
keymap(NORMAL, '<leader>gds', ':Telescope lsp_document_symbols<cr>', { noremap = true })
|
||||
keymap(NORMAL, '<leader>ca', ':lua vim.lsp.buf.code_action', { noremap = true })
|
||||
keymap(NORMAL, '<leader>gs', ':Git<cr>', { noremap = true })
|
||||
keymap(NORMAL, '<leader>gp', ':Git push<cr>', { noremap = true })
|
||||
keymap(NORMAL, '<leader>gg', ':Git pull<cr>', { noremap = true })
|
||||
|
|
|
@ -148,11 +148,12 @@ end
|
|||
-- end
|
||||
|
||||
-- golangci
|
||||
-- go install https://github.com/klesh/golangci-lint-langserver
|
||||
local configs = require 'lspconfig/configs'
|
||||
if not configs.golangcilsp then
|
||||
configs.golangcilsp = {
|
||||
default_config = {
|
||||
cmd = { 'golangci-lint-langserver' },
|
||||
cmd = { 'golangci-lint-langserver', "--debug" },
|
||||
root_dir = lspconfig.util.root_pattern('.git', 'go.mod'),
|
||||
init_options = {
|
||||
command = { "golangci-lint", "run", "--out-format", "json",
|
||||
|
@ -164,3 +165,22 @@ end
|
|||
lspconfig.golangci_lint_ls.setup {
|
||||
filetypes = { 'go', 'gomod' }
|
||||
}
|
||||
|
||||
--
|
||||
-- local function nvim_create_augroups(definitions)
|
||||
-- for group_name, definition in pairs(definitions) do
|
||||
-- vim.api.nvim_command('augroup ' .. group_name)
|
||||
-- vim.api.nvim_command('autocmd!')
|
||||
-- for _, def in ipairs(definition) do
|
||||
-- local command = table.concat(vim.tbl_flatten { 'autocmd', def }, ' ')
|
||||
-- vim.api.nvim_command(command)
|
||||
-- end
|
||||
-- vim.api.nvim_command('augroup END')
|
||||
-- end
|
||||
-- end
|
||||
--
|
||||
-- nvim_create_augroups({
|
||||
-- go_save = {
|
||||
-- { "BufWritePre", "*.go", "lua goimports(1000)" },
|
||||
-- }
|
||||
-- })
|
||||
|
|
Loading…
Reference in New Issue
Block a user