No mas bare repo. nvim lua mucho mejor
This commit is contained in:
parent
efc1b575db
commit
8ee1c8001e
|
@ -0,0 +1,20 @@
|
|||
|
||||
[SETTINGS]
|
||||
defaultscheme=gopher
|
||||
geminiblocks=block
|
||||
searchengine=gopher://gopher.floodgap.com:70/7/v2/vs
|
||||
telnetcommand=telnet
|
||||
timeout=15
|
||||
configlocation=/home/corpse/.config
|
||||
homeurl=gopher://bombadillo.colorfield.space:70/1/user-guide.map
|
||||
showimages=true
|
||||
theme=normal
|
||||
webmode=none
|
||||
savelocation=/home/corpse
|
||||
[BOOKMARKS]
|
||||
circumlunar=gemini://gemini.circumlunar.space:1965
|
||||
[CERTS]
|
||||
gemini.circumlunar.space=5D:BF:7E:4B:47:E8:D4:46:D2:44:C8:09:3F:58:F7:E3:D4:43:3D:56|1759499437
|
||||
republic.circumlunar.space=FC:0F:79:4E:5D:B1:8E:FD:A9:C3:AF:CA:0D:86:F6:A9:42:AF:FB:47|1905528204
|
||||
breadpunk.club=3E:D4:69:9E:39:EC:94:FD:A9:4D:53:E8:38:5C:5D:A2:B6:51:AE:76|1754237291
|
||||
cetacean.club=EB:E4:06:EF:28:F1:68:AA:2F:84:79:79:78:DC:45:25:F7:8E:93:57|1753558113
|
|
@ -15,15 +15,15 @@ scrolling:
|
|||
# Font configuration
|
||||
font:
|
||||
normal:
|
||||
family: PragmataPro Mono Liga
|
||||
family: monospace
|
||||
style: Regular
|
||||
|
||||
italic:
|
||||
family: PragmataPro Mono Liga
|
||||
family: monospace
|
||||
style: Italic
|
||||
|
||||
bold:
|
||||
family: PragmataPro Mono Liga
|
||||
family: monospace
|
||||
style: Bold
|
||||
|
||||
# Point size
|
||||
|
|
|
@ -15,7 +15,7 @@ bspc config pointer_follows_focus true
|
|||
bspc config removal_adjustment true
|
||||
bspc config remove_unplugged_monitors true
|
||||
bspc config remove_disabled_monitors true
|
||||
bspc config single_monocle false
|
||||
bspc config single_monocle true
|
||||
bspc config borderless_monocle false
|
||||
bspc config honor_size_hints false
|
||||
bspc config directional_focus_tightness low
|
||||
|
|
|
@ -4,18 +4,18 @@ git : /home/corpse/.config/git/config
|
|||
gtk3 : /home/corpse/.config/gtk-3.0/settings.ini
|
||||
lfview : /home/corpse/.local/bin/lfview
|
||||
gtk2 : /home/corpse/.config/gtk-2.0/gtkrc-2.0
|
||||
nvim : /home/corpse/.config/nvim
|
||||
dunst : /home/corpse/.config/dunst/dunstrc
|
||||
xresources : /home/corpse/.config/X11/xresources
|
||||
alias : /home/corpse/.config/zsh/conf/03_aliases.zsh
|
||||
polybar : /home/corpse/.config/polybar/config
|
||||
correo : /home/corpse/.config/neomutt
|
||||
keys : /home/corpse/.config/sxhkd/sxhkdrc
|
||||
terminal : /home/corpse/.config/alacritty.yml
|
||||
bspwm : /home/corpse/.config/bspwm/bspwmrc
|
||||
tmux : /home/corpse/.config/tmux/tmux.conf
|
||||
mpv : /home/corpse/.config/mpv/mpv.conf
|
||||
xinit : /home/corpse/.config/X11/xinitrc
|
||||
zshenv : /home/corpse/.zshenv
|
||||
lf : /home/corpse/.config/lf/lfrc
|
||||
bspwm : /home/corpse/.config/bspwm/bspwmrc
|
||||
nvim : /home/corpse/.config/nvim
|
||||
terminal : /home/corpse/.config/alacritty.yml
|
||||
zsh : /home/corpse/.config/zsh
|
||||
alias : /home/corpse/.config/zsh/conf/03_aliases.zsh
|
||||
|
|
|
@ -14,20 +14,10 @@ set period 1
|
|||
set hidden
|
||||
set preview
|
||||
set previewer lfview
|
||||
set ratios 2:4
|
||||
|
||||
%[ $LF_LEVEL -eq 1 ] || echo "Warning: You're in a nested lf instance!"
|
||||
|
||||
%{{
|
||||
w=$(tput cols)
|
||||
if [ $w -le 80 ]; then
|
||||
lf -remote "send $id set ratios 1:1"
|
||||
elif [ $w -le 160 ]; then
|
||||
lf -remote "send $id set ratios 2:2"
|
||||
else
|
||||
lf -remote "send $id set ratios 2:4"
|
||||
fi
|
||||
}}
|
||||
|
||||
# Custom Functions
|
||||
cmd open ${{
|
||||
case $(file --mime-type $f -bL) in
|
||||
|
|
|
@ -6,7 +6,7 @@ setlocal smartindent
|
|||
lua require'cmp'.setup.buffer {
|
||||
\ sources = {
|
||||
\ { name = 'nvim_lsp' },
|
||||
\ { name = 'vsnip' },
|
||||
\ { name = 'luasnip' },
|
||||
\ { name = 'buffer' },
|
||||
\ },
|
||||
\ }
|
||||
|
|
|
@ -17,7 +17,7 @@ endif
|
|||
lua require'cmp'.setup.buffer {
|
||||
\ sources = {
|
||||
\ { name = 'nvim_lsp' },
|
||||
\ { name = 'vsnip' },
|
||||
\ { name = 'luasnip' },
|
||||
\ { name = 'buffer' },
|
||||
\ },
|
||||
\ }
|
||||
|
|
|
@ -2,7 +2,7 @@ lua require'cmp'.setup.buffer {
|
|||
\ sources = {
|
||||
\ { name = 'nvim_lsp' },
|
||||
\ { name = 'nvim_lua' },
|
||||
\ { name = 'vsnip' },
|
||||
\ { name = 'luasnip' },
|
||||
\ { name = 'buffer' },
|
||||
\ },
|
||||
\ }
|
||||
|
|
|
@ -20,6 +20,5 @@ lua require'cmp'.setup.buffer {
|
|||
\ sources = {
|
||||
\ { name = 'buffer' },
|
||||
\ { name = 'spell' }
|
||||
\ { name = 'look', keyword_length=3 },
|
||||
\ },
|
||||
\ }
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
lua require'cmp'.setup.buffer {
|
||||
\ sources = {
|
||||
\ { name = 'nvim_lsp' },
|
||||
\ { name = 'vsnip' },
|
||||
\ { name = 'luasnip' },
|
||||
\ { name = 'buffer' },
|
||||
\ },
|
||||
\ }
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -1,44 +1,41 @@
|
|||
set grepprg=rg\ --vimgrep
|
||||
set grepformat=%f:%l:%c:%m
|
||||
let mapleader="\<SPACE>"
|
||||
let maplocalleader=','
|
||||
|
||||
if empty(glob('~/.local/share/nvim/site/autoload/plug.vim'))
|
||||
silent !curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs
|
||||
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
||||
aug Plugins
|
||||
au!
|
||||
au VimEnter * PlugInstall --sync | source $MYVIMRC
|
||||
aug END
|
||||
silent !curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs
|
||||
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
||||
aug Plugins
|
||||
au!
|
||||
au VimEnter * PlugInstall --sync | source $MYVIMRC
|
||||
aug END
|
||||
endif
|
||||
if filereadable(expand('~/.local/share/nvim/site/autoload/plug.vim'))
|
||||
call plug#begin(stdpath('data') . '/plugged')
|
||||
Plug 'fatih/vim-go', {'for': 'go', 'do': ':GoInstallBinaries'}
|
||||
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
|
||||
Plug 'p00f/nvim-ts-rainbow'
|
||||
Plug 'windwp/nvim-autopairs'
|
||||
Plug 'nvim-lua/plenary.nvim'
|
||||
Plug 'nvim-telescope/telescope.nvim'
|
||||
Plug 'nvim-telescope/telescope-fzf-native.nvim', {'do': 'make'}
|
||||
Plug 'neovim/nvim-lspconfig'
|
||||
Plug 'hrsh7th/cmp-nvim-lsp'
|
||||
Plug 'hrsh7th/cmp-nvim-lua'
|
||||
Plug 'hrsh7th/cmp-buffer'
|
||||
Plug 'hrsh7th/nvim-cmp'
|
||||
Plug 'hrsh7th/cmp-vsnip'
|
||||
Plug 'hrsh7th/vim-vsnip'
|
||||
Plug 'octaltree/cmp-look'
|
||||
Plug 'f3fora/cmp-spell'
|
||||
Plug 'tpope/vim-fugitive'
|
||||
Plug 'lewis6991/gitsigns.nvim'
|
||||
Plug 'rktjmp/lush.nvim'
|
||||
Plug 'ellisonleao/gruvbox.nvim'
|
||||
Plug 'kyazdani42/nvim-web-devicons'
|
||||
Plug 'onsails/lspkind-nvim'
|
||||
call plug#end()
|
||||
call plug#begin(stdpath('data') . '/plugged')
|
||||
Plug 'nvim-lua/plenary.nvim'
|
||||
Plug 'rafamadriz/friendly-snippets'
|
||||
Plug 'tpope/vim-fugitive'
|
||||
Plug 'windwp/nvim-autopairs'
|
||||
Plug 'lewis6991/gitsigns.nvim'
|
||||
Plug 'hrsh7th/nvim-cmp'
|
||||
Plug 'hrsh7th/cmp-buffer'
|
||||
Plug 'hrsh7th/cmp-nvim-lua'
|
||||
Plug 'hrsh7th/cmp-nvim-lsp'
|
||||
Plug 'saadparwaiz1/cmp_luasnip'
|
||||
Plug 'f3fora/cmp-spell'
|
||||
Plug 'L3MON4D3/LuaSnip'
|
||||
Plug 'neovim/nvim-lspconfig'
|
||||
Plug 'ray-x/lsp_signature.nvim'
|
||||
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
|
||||
Plug 'p00f/nvim-ts-rainbow'
|
||||
Plug 'nvim-telescope/telescope.nvim'
|
||||
Plug 'nvim-telescope/telescope-fzf-native.nvim', { 'do': 'make' }
|
||||
Plug 'ellisonleao/gruvbox.nvim'
|
||||
Plug 'kyazdani42/nvim-web-devicons'
|
||||
call plug#end()
|
||||
endif
|
||||
|
||||
lua require('Comment').setup()
|
||||
set termguicolors
|
||||
colorscheme gruvbox
|
||||
hi! Normal ctermbg=NONE guibg=NONE
|
||||
hi! NonText ctermbg=NONE guibg=NONE guifg=NONE ctermfg=NONE
|
||||
hi! SignColumn ctermbg=NONE guibg=NONE guifg=NONE ctermfg=NONE
|
||||
|
|
|
@ -1,23 +1,24 @@
|
|||
scriptencoding utf-8
|
||||
|
||||
if !exists('autocommands_loaded') && has('autocmd')
|
||||
let autocommands_loaded = 1
|
||||
let ftToIgnore = ['markdown', 'html', 'text']
|
||||
let autocommands_loaded = 1
|
||||
let ftToIgnore = ['markdown', 'html', 'text']
|
||||
|
||||
aug OnInsert
|
||||
au InsertLeave * if &paste | setlocal nopaste | endif
|
||||
au InsertLeave,CompleteDone * if pumvisible() == 0 | pclose | endif
|
||||
aug END
|
||||
aug OnInsert
|
||||
au InsertLeave * if &paste | setlocal nopaste | endif
|
||||
au InsertLeave,CompleteDone * if pumvisible() == 0 | pclose | endif
|
||||
aug END
|
||||
|
||||
aug Miscs
|
||||
au TextYankPost * silent! lua vim.highlight.on_yank{higroup="IncSearch", timeout=500}
|
||||
au BufEnter * set fo-=c fo-=r fo-=o
|
||||
aug END
|
||||
aug Miscs
|
||||
au TextYankPost * silent! lua vim.highlight.on_yank{timeout = 80, on_visual=true}
|
||||
au FileType TelescopePrompt lua require('cmp').setup.buffer { enabled = false }
|
||||
au BufEnter * set fo-=c fo-=r fo-=o
|
||||
aug END
|
||||
|
||||
aug OnSave
|
||||
au BufWritePre * if index(ftToIgnore, &ft) < 0 | :%s/\s\+$//e
|
||||
au BufWritePost *xresources !xrdb %
|
||||
au BufWritePost *sxhkdrc !pkill -USR1 sxhkd
|
||||
au QuitPre * if empty(&buftype) | lclose | endif
|
||||
aug END
|
||||
aug OnSave
|
||||
au BufWritePre * if index(ftToIgnore, &ft) < 0 | :%s/\s\+$//e
|
||||
au BufWritePost *xresources !xrdb %
|
||||
au BufWritePost *sxhkdrc !pkill -USR1 sxhkd
|
||||
au QuitPre * if empty(&buftype) | lclose | endif
|
||||
aug END
|
||||
endif
|
||||
|
|
|
@ -2,74 +2,87 @@ local has_words_before = function()
|
|||
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
|
||||
return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil
|
||||
end
|
||||
|
||||
local feedkey = function(key, mode)
|
||||
vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes(key, true, true, true), mode, true)
|
||||
end
|
||||
|
||||
local cmp = require'cmp'
|
||||
local luasnip = require("luasnip")
|
||||
local cmp = require("cmp")
|
||||
|
||||
cmp.setup({
|
||||
formatting = {
|
||||
format = require('lspkind').cmp_format({with_text=true, menu = ({
|
||||
buffer = " [Buff]",
|
||||
nvim_lsp = " [LSP]",
|
||||
vsnip = " [Snip]",
|
||||
nvim_lua = " [Lua]",
|
||||
look = " [Dict]",
|
||||
spell = " [Spell]"
|
||||
}),
|
||||
}),
|
||||
-- format = require('lspkind').cmp_format({with_text = true, maxwidth = 50})
|
||||
-- format = function(entry, vim_item)
|
||||
-- -- fancy icons and a name of kind
|
||||
-- vim_item.kind = require('lspkind').presets.default[vim_item.kind]
|
||||
|
||||
-- -- set a name for each source
|
||||
-- vim_item.menu = ({
|
||||
-- buffer = " [Buff]",
|
||||
-- nvim_lsp = " [LSP]",
|
||||
-- vsnip = " [Snip]",
|
||||
-- nvim_lua = " [Lua]",
|
||||
-- look = " [Dict]",
|
||||
-- spell = " [Spell]"
|
||||
-- })[entry.source.name]
|
||||
-- return vim_item
|
||||
-- end,
|
||||
format = function(entry, vim_item)
|
||||
vim_item.menu = ({
|
||||
nvim_lsp = ' [LSP]',
|
||||
buffer = ' [Buffer]',
|
||||
luasnip = ' [LuaSnip]',
|
||||
nvim_lua = ' [Lua]',
|
||||
})[entry.source.name]
|
||||
vim_item.kind = ({
|
||||
Text = ' text',
|
||||
Method = ' Method',
|
||||
Function = ' Function',
|
||||
Constructor = ' Constructor',
|
||||
Field = 'ﰠ Field',
|
||||
Variable = ' Variable',
|
||||
Class = ' Class',
|
||||
Interface = 'ﰮ Interface',
|
||||
Module = ' Module',
|
||||
Property = ' Property',
|
||||
Unit = ' Unit',
|
||||
Value = ' Value',
|
||||
Enum = ' Enum',
|
||||
Keyword = ' Keyword',
|
||||
Snippet = ' Snippet',
|
||||
Color = ' Color',
|
||||
File = ' File',
|
||||
Reference = ' Reference',
|
||||
Folder = ' Folder',
|
||||
EnumMember = ' EnumMember',
|
||||
Constant = ' Constant',
|
||||
Struct = ' Struct',
|
||||
Event = ' Event',
|
||||
Operator = ' Operator',
|
||||
TypeParameter = ' TypeParameter',
|
||||
})[vim_item.kind]
|
||||
return vim_item
|
||||
end
|
||||
},
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
vim.fn["vsnip#anonymous"](args.body)
|
||||
luasnip.lsp_expand(args.body)
|
||||
end,
|
||||
},
|
||||
mapping = {
|
||||
['<C-p>'] = cmp.mapping.select_prev_item(),
|
||||
['<C-n>'] = cmp.mapping.select_next_item(),
|
||||
['<C-d>'] = cmp.mapping.scroll_docs(-4),
|
||||
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
||||
['<C-Space>'] = cmp.mapping.complete(),
|
||||
['<C-e>'] = cmp.mapping.close(),
|
||||
['<CR>'] = cmp.mapping.confirm({ select = true }),
|
||||
['<CR>'] = cmp.mapping.confirm {
|
||||
behavior = cmp.ConfirmBehavior.Replace,
|
||||
select = true,
|
||||
},
|
||||
["<Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
elseif vim.fn["vsnip#available"]() == 1 then
|
||||
feedkey("<Plug>(vsnip-expand-or-jump)", "")
|
||||
elseif luasnip.expand_or_jumpable() then
|
||||
luasnip.expand_or_jump()
|
||||
elseif has_words_before() then
|
||||
cmp.complete()
|
||||
else
|
||||
fallback() -- The fallback function sends a already mapped key. In this case, it's probably `<Tab>`.
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
|
||||
["<S-Tab>"] = cmp.mapping(function()
|
||||
["<S-Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_prev_item()
|
||||
elseif vim.fn["vsnip#jumpable"](-1) == 1 then
|
||||
feedkey("<Plug>(vsnip-jump-prev)", "")
|
||||
elseif luasnip.jumpable(-1) then
|
||||
luasnip.jump(-1)
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
},
|
||||
sources = {
|
||||
{ name = 'buffer' },
|
||||
}
|
||||
},
|
||||
experimental = { custom_menu = true }
|
||||
})
|
||||
|
||||
|
|
|
@ -1,22 +1,23 @@
|
|||
local disabled_builtin_plugins = {
|
||||
'gzip',
|
||||
'zip',
|
||||
'zipPlugin',
|
||||
'tar',
|
||||
'tarPlugin',
|
||||
'getscript',
|
||||
"getscriptPlugin",
|
||||
"vimball",
|
||||
"vimballPlugin",
|
||||
"2html_plugin",
|
||||
"logipat",
|
||||
"rrhelper",
|
||||
"matchit",
|
||||
'remote_plugins'
|
||||
'gzip',
|
||||
'zip',
|
||||
'zipPlugin',
|
||||
'tar',
|
||||
'tarPlugin',
|
||||
'getscript',
|
||||
"getscriptPlugin",
|
||||
"vimball",
|
||||
"vimballPlugin",
|
||||
"2html_plugin",
|
||||
"logipat",
|
||||
"rrhelper",
|
||||
"matchit",
|
||||
"matchparen",
|
||||
'remote_plugins'
|
||||
}
|
||||
|
||||
for _, plugin in pairs(disabled_builtin_plugins) do
|
||||
vim.g["loaded_" .. plugin] = 1
|
||||
vim.g["loaded_" .. plugin] = 1
|
||||
end
|
||||
|
||||
local disabled_providers = {
|
||||
|
|
|
@ -1,33 +1,31 @@
|
|||
require('gitsigns').setup {
|
||||
numhl = true,
|
||||
signcolumn = true,
|
||||
current_line_blame = true,
|
||||
current_line_blame_opts = { virt_text_pos = 'right_align', delay= 1000 },
|
||||
current_line_blame_formatter_opts = { relative_time = false },
|
||||
current_line_blame_opts = { virt_text_pos = 'right_align' },
|
||||
signs = {
|
||||
add = {hl = 'GitSignsAdd' , text = '│', numhl='GitSignsAddNr' , linehl='GitSignsAddLn'},
|
||||
change = {hl = 'GitSignsChange', text = '│', numhl='GitSignsChangeNr', linehl='GitSignsChangeLn'},
|
||||
delete = {hl = 'GitSignsDelete', text = '_', numhl='GitSignsDeleteNr', linehl='GitSignsDeleteLn'},
|
||||
topdelete = {hl = 'GitSignsDelete', text = '‾', numhl='GitSignsDeleteNr', linehl='GitSignsDeleteLn'},
|
||||
changedelete = {hl = 'GitSignsChange', text = '~', numhl='GitSignsChangeNr', linehl='GitSignsChangeLn'},
|
||||
},
|
||||
sign_priority = 6,
|
||||
update_debounce = 100,
|
||||
status_formatter = nil, -- Use default
|
||||
max_file_length = 40000,
|
||||
preview_config = {
|
||||
-- Options passed to nvim_open_win
|
||||
border = 'single',
|
||||
style = 'minimal',
|
||||
relative = 'cursor',
|
||||
row = 0,
|
||||
col = 1
|
||||
},
|
||||
diff_opts = {
|
||||
internal = true,
|
||||
}, -- If vim.diff or luajit is present
|
||||
yadm = {
|
||||
enable = false
|
||||
add = {hl = 'GitSignsAdd' , text = '┃', numhl='GitSignsAddNr' , linehl='GitSignsAddLn'},
|
||||
change = {hl = 'GitSignsChange', text = '┃', numhl='GitSignsChangeNr', linehl='GitSignsChangeLn'},
|
||||
delete = {hl = 'GitSignsDelete', text = '╏', numhl='GitSignsDeleteNr', linehl='GitSignsDeleteLn'},
|
||||
topdelete = {hl = 'GitSignsDelete', text = '┯', numhl='GitSignsDeleteNr', linehl='GitSignsDeleteLn'},
|
||||
changedelete = {hl = 'GitSignsChange', text = '╍', numhl='GitSignsChangeNr', linehl='GitSignsChangeLn'},
|
||||
},
|
||||
update_debounce = 200,
|
||||
use_internal_diff = true,
|
||||
keymaps = {
|
||||
noremap = true,
|
||||
['n <leader>}g'] = { expr = true, "&diff ? '}c' : '<cmd>lua require\"gitsigns\".next_hunk()<CR>'"},
|
||||
['n <leader>{g'] = { expr = true, "&diff ? '{c' : '<cmd>lua require\"gitsigns\".prev_hunk()<CR>'"},
|
||||
}
|
||||
}
|
||||
|
||||
vim.g.fugitive_summary_format = "%an\t%s"
|
||||
|
||||
local map = vim.api.nvim_set_keymap
|
||||
local default_opts = {noremap = true, silent = true}
|
||||
|
||||
map('n', '<Leader>tt', ':Gitsigns toggle_signs<CR>', default_opts)
|
||||
map('n', '<Leader>ff', ':G<CR>', default_opts)
|
||||
map('n', '<Leader>fc', ':GCheckout<CR>', default_opts)
|
||||
map('n', '<Leader>fd', ':Gvdiffsplit!<CR>', default_opts)
|
||||
map('n', '<Leader>fh', ':diffget //2<CR>', default_opts)
|
||||
map('n', '<Leader>fl', ':diffget //3<CR>', default_opts)
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
require('lspkind').init({
|
||||
with_text = true,
|
||||
preset = 'default',
|
||||
})
|
|
@ -1,62 +1,93 @@
|
|||
local nvim_lsp = require 'lspconfig'
|
||||
local configs = require'lspconfig/configs'
|
||||
local on_attach = function(_, bufnr)
|
||||
vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc')
|
||||
|
||||
local opts = { noremap = true, silent = true }
|
||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gD', '<cmd>lua vim.lsp.buf.declaration()<CR>', opts)
|
||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gd', '<cmd>lua vim.lsp.buf.definition()<CR>', opts)
|
||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', 'K', '<cmd>lua vim.lsp.buf.hover()<CR>', opts)
|
||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gi', '<cmd>lua vim.lsp.buf.implementation()<CR>', opts)
|
||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', '<C-k>', '<cmd>lua vim.lsp.buf.signature_help()<CR>', opts)
|
||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', '<leader>wa', '<cmd>lua vim.lsp.buf.add_workspace_folder()<CR>', opts)
|
||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', '<leader>wr', '<cmd>lua vim.lsp.buf.remove_workspace_folder()<CR>', opts)
|
||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', '<leader>wl', '<cmd>lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))<CR>', opts)
|
||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', '<leader>D', '<cmd>lua vim.lsp.buf.type_definition()<CR>', opts)
|
||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', '<leader>rn', '<cmd>lua vim.lsp.buf.rename()<CR>', opts)
|
||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gr', '<cmd>lua vim.lsp.buf.references()<CR>', opts)
|
||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', '<leader>ca', '<cmd>lua vim.lsp.buf.code_action()<CR>', opts)
|
||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', '<leader>e', '<cmd>lua vim.lsp.diagnostic.show_line_diagnostics()<CR>', opts)
|
||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', '[d', '<cmd>lua vim.lsp.diagnostic.goto_prev()<CR>', opts)
|
||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', ']d', '<cmd>lua vim.lsp.diagnostic.goto_next()<CR>', opts)
|
||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', 'qq', '<cmd>lua vim.lsp.diagnostic.set_loclist()<CR>', opts)
|
||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', '<leader>so', [[<cmd>lua require('telescope.builtin').lsp_document_symbols()<CR>]], opts)
|
||||
vim.cmd [[ command! Format execute 'lua vim.lsp.buf.formatting()' ]]
|
||||
end
|
||||
local border = {
|
||||
{"┌", "FloatBorder"},
|
||||
{"─", "FloatBorder"},
|
||||
{"┐", "FloatBorder"},
|
||||
{"│", "FloatBorder"},
|
||||
{"┘", "FloatBorder"},
|
||||
{"─", "FloatBorder"},
|
||||
{"└", "FloatBorder"},
|
||||
{"│", "FloatBorder"},
|
||||
}
|
||||
|
||||
vim.cmd [[
|
||||
highlight LspDiagnosticsLineNrError guibg=#51202A guifg=#FF0000 gui=bold
|
||||
highlight LspDiagnosticsLineNrWarning guibg=#51412A guifg=#FFA500 gui=bold
|
||||
highlight LspDiagnosticsLineNrInformation guibg=#1E535D guifg=#00FFFF gui=bold
|
||||
highlight LspDiagnosticsLineNrHint guibg=#1E205D guifg=#0000FF gui=bold
|
||||
highlight LspDiagnosticsLineNrError guibg=#51202A guifg=#FF0000 gui=bold
|
||||
highlight LspDiagnosticsLineNrWarning guibg=#51412A guifg=#FFA500 gui=bold
|
||||
highlight LspDiagnosticsLineNrInformation guibg=#1E535D guifg=#00FFFF gui=bold
|
||||
highlight LspDiagnosticsLineNrHint guibg=#1E205D guifg=#008bbd gui=bold
|
||||
|
||||
sign define LspDiagnosticsSignError text= texthl=LspDiagnosticsSignError linehl= numhl=LspDiagnosticsLineNrError
|
||||
sign define LspDiagnosticsSignWarning text= texthl=LspDiagnosticsSignWarning linehl= numhl=LspDiagnosticsLineNrWarning
|
||||
sign define LspDiagnosticsSignInformation text= texthl=LspDiagnosticsSignInformation linehl= numhl=LspDiagnosticsLineNrInformation
|
||||
sign define LspDiagnosticsSignHint text= texthl=LspDiagnosticsSignHint linehl= numhl=LspDiagnosticsLineNrHint
|
||||
sign define LspDiagnosticsSignError text= texthl=LspDiagnosticsSignError linehl= numhl=LspDiagnosticsLineNrError
|
||||
sign define LspDiagnosticsSignWarning text= texthl=LspDiagnosticsSignWarning linehl= numhl=LspDiagnosticsLineNrWarning
|
||||
sign define LspDiagnosticsSignInformation text= texthl=LspDiagnosticsSignInformation linehl= numhl=LspDiagnosticsLineNrInformation
|
||||
sign define LspDiagnosticsSignHint text= texthl=LspDiagnosticsSignHint linehl= numhl=LspDiagnosticsLineNrHint
|
||||
]]
|
||||
|
||||
vim.lsp.handlers['textDocument/publishDiagnostics'] = vim.lsp.with(vim.lsp.diagnostic.on_publish_diagnostics, {
|
||||
underline = true,
|
||||
virtual_text = false,
|
||||
update_in_insert = true
|
||||
underline = true,
|
||||
signs = true,
|
||||
virtual_text = false,
|
||||
update_in_insert = true
|
||||
})
|
||||
|
||||
vim.cmd ('autocmd CursorHold * lua vim.lsp.diagnostic.show_line_diagnostics({border="single", focusable=false})')
|
||||
|
||||
local nvim_lsp = require 'lspconfig'
|
||||
local on_attach = function(client, bufnr)
|
||||
vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc')
|
||||
local opts = { noremap = true, silent = true }
|
||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gd', '<cmd>lua vim.lsp.buf.definition()<CR>', opts)
|
||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gi', '<cmd>lua vim.lsp.buf.implementation()<CR>', opts)
|
||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', 'K', '<cmd>lua vim.lsp.buf.hover()<CR>', opts)
|
||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', '<C-k>', '<cmd>lua vim.lsp.buf.signature_help()<CR>', opts)
|
||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', '<leader>rn', '<cmd>lua vim.lsp.buf.rename()<CR>', opts)
|
||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gr', '<cmd>lua vim.lsp.buf.references()<CR>', opts)
|
||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', '<leader>ca', '<cmd>lua vim.lsp.buf.code_action()<CR>', opts)
|
||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', '<leader>e', '<cmd>lua vim.lsp.diagnostic.show_line_diagnostics()<CR>', opts)
|
||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', '}d', '<cmd>lua vim.lsp.diagnostic.goto_next()<CR>', opts)
|
||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', 'qq', '<cmd>lua vim.lsp.diagnostic.set_loclist()<CR>', opts)
|
||||
vim.cmd [[ command! Format execute 'lua vim.lsp.buf.formatting()' ]]
|
||||
vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, { border = border, focusable = false })
|
||||
vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, {
|
||||
border = "single",
|
||||
})
|
||||
require "lsp_signature".on_attach({
|
||||
bind = true,
|
||||
hint_prefix = " ",
|
||||
hi_parameter = "ModeMsg",
|
||||
transparency = 80,
|
||||
trigger_on_newline = false,
|
||||
toggle_key = '<M-f>',
|
||||
})
|
||||
if client.resolved_capabilities.document_highlight then
|
||||
vim.api.nvim_exec(
|
||||
[[
|
||||
hi LspReferenceRead gui=bold guibg=#1b1b29 blend=10
|
||||
hi LspReferenceText gui=bold guibg=#1b1b29 blend=10
|
||||
hi LspReferenceWrite gui=bold guibg=#1b1b29 blend=10
|
||||
augroup lsp_document_highlight
|
||||
autocmd! * <buffer>
|
||||
autocmd CursorHold <buffer> lua vim.lsp.buf.document_highlight()
|
||||
autocmd CursorMoved <buffer> lua vim.lsp.buf.clear_references()
|
||||
augroup END
|
||||
]], false)
|
||||
end
|
||||
end
|
||||
|
||||
require'lspconfig'.jsonls.setup {
|
||||
commands = {
|
||||
Format = {
|
||||
function()
|
||||
vim.lsp.buf.range_formatting({},{0,0},{vim.fn.line("$"),0})
|
||||
end
|
||||
}
|
||||
}
|
||||
commands = {
|
||||
Format = {
|
||||
function()
|
||||
vim.lsp.buf.range_formatting({},{0,0},{vim.fn.line("$"),0})
|
||||
end
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
configs.ls_emmet = {
|
||||
require'lspconfig/configs'.ls_emmet = {
|
||||
default_config = {
|
||||
cmd = { 'ls_emmet', '--stdio' };
|
||||
filetypes = { 'html', 'css', 'scss' }; -- Add the languages you use, see language support
|
||||
root_dir = function(_)
|
||||
filetypes = { 'html', 'css', 'scss', 'javascript', 'javascriptreact', 'typescript', 'typescriptreact', 'haml',
|
||||
'xml', 'xsl', 'pug', 'slim', 'sass', 'stylus', 'less', 'sss', 'svelte'};
|
||||
root_dir = function(fname)
|
||||
return vim.loop.cwd()
|
||||
end;
|
||||
settings = {};
|
||||
|
@ -73,19 +104,17 @@ capabilities.textDocument.completion.completionItem.deprecatedSupport = true
|
|||
capabilities.textDocument.completion.completionItem.commitCharactersSupport = true
|
||||
capabilities.textDocument.completion.completionItem.tagSupport = { valueSet = { 1 } }
|
||||
capabilities.textDocument.completion.completionItem.resolveSupport = {
|
||||
properties = {
|
||||
'documentation',
|
||||
'detail',
|
||||
'additionalTextEdits',
|
||||
},
|
||||
properties = { 'documentation', 'detail', 'additionalTextEdits', },
|
||||
}
|
||||
capabilities = require('cmp_nvim_lsp').update_capabilities(capabilities)
|
||||
|
||||
local servers = { 'html', 'cssls', 'jsonls', 'tailwindcss', 'vimls', 'ls_emmet' }
|
||||
for _, lsp in ipairs(servers) do
|
||||
nvim_lsp[lsp].setup {
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
}
|
||||
nvim_lsp[lsp].setup {
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
flags = { debounce_text_changes = 150, }
|
||||
}
|
||||
end
|
||||
|
||||
local sumneko_root_path ='/mnt/wd1tb/catacombs/code/lua-language-server'
|
||||
|
@ -96,24 +125,24 @@ table.insert(runtime_path, 'lua/?.lua')
|
|||
table.insert(runtime_path, 'lua/?/init.lua')
|
||||
|
||||
require('lspconfig').sumneko_lua.setup {
|
||||
cmd = { sumneko_binary, '-E', sumneko_root_path .. '/main.lua' },
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
settings = {
|
||||
Lua = {
|
||||
runtime = {
|
||||
version = 'LuaJIT',
|
||||
path = runtime_path,
|
||||
},
|
||||
diagnostics = {
|
||||
globals = { 'vim' },
|
||||
},
|
||||
workspace = {
|
||||
library = vim.api.nvim_get_runtime_file('', true),
|
||||
},
|
||||
telemetry = {
|
||||
enable = false,
|
||||
},
|
||||
},
|
||||
},
|
||||
cmd = { sumneko_binary, '-E', sumneko_root_path .. '/main.lua' },
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
settings = {
|
||||
Lua = {
|
||||
runtime = {
|
||||
version = 'LuaJIT',
|
||||
path = runtime_path,
|
||||
},
|
||||
diagnostics = {
|
||||
globals = {'vim'},
|
||||
},
|
||||
workspace = {
|
||||
library = vim.api.nvim_get_runtime_file("", true),
|
||||
},
|
||||
telemetry = {
|
||||
enable = false,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
nnoremap <silent> <F1> <cmd>Telescope help_tags<CR>
|
||||
nnoremap <silent> <F2> <cmd>Telescope find_files<CR>
|
||||
nnoremap <silent> <F3> <cmd>Telescope file_browser<CR>
|
||||
nnoremap <silent> <F4> <cmd>Telescope buffers<CR>
|
||||
nnoremap <silent> <M-f> <cmd>Telescope live_grep<CR>
|
||||
nnoremap <silent> <M-g> <cmd>Telescope git_commits<CR>
|
||||
nnoremap <silent> <M-S-r> <cmd>Telescope resume<CR>
|
|
@ -1,12 +0,0 @@
|
|||
nnoremap <silent> <Leader>ff :G<CR>
|
||||
nnoremap <silent> <Leader>fc :GCheckout<CR>
|
||||
nnoremap <silent> <Leader>fd :Gvdiffsplit!<CR>
|
||||
nnoremap <silent> <Leader>fh :diffget //2<CR>
|
||||
nnoremap <silent> <Leader>fl :diffget //3<CR>
|
||||
|
||||
nmap <silent> <leader>tt :Gitsigns toggle_signs<CR>
|
||||
nmap <silent> <leader>}g :lua require 'gitsigns'.next_hunk()<CR>
|
||||
nmap <silent> <leader>{g :lua require 'gitsigns'.prev_hunk()<CR>
|
||||
nmap <silent> <leader>+ :lua require'gitsigns'.stage_hunk()<CR>
|
||||
nmap <silent> <leader>- :lua require'gitsigns'.undo_stage_hunk():<CR>
|
||||
nmap <silent> <leader>p :lua require'gitsigns'.stage_hunk({vim.fn.line('.'), vim.fn.line('v')})<CR>
|
|
@ -1,53 +1,52 @@
|
|||
require('nvim-autopairs').setup{
|
||||
check_ts = true,
|
||||
ts_config = {
|
||||
lua = {'string'},-- it will not add pair on that treesitter node
|
||||
javascript = {'template_string'},
|
||||
}
|
||||
lua = {'string'},-- it will not add pair on that treesitter node
|
||||
javascript = {'template_string'},
|
||||
}
|
||||
}
|
||||
|
||||
local Rule = require('nvim-autopairs.rule')
|
||||
|
||||
require('nvim-autopairs').add_rules({
|
||||
Rule("%", "%", "lua")
|
||||
:with_pair(require('nvim-autopairs.ts-conds').is_ts_node({'string','comment'})),
|
||||
Rule("$", "$", "lua")
|
||||
:with_pair(require('nvim-autopairs.ts-conds').is_not_ts_node({'function'})),
|
||||
Rule(' ', ' ')
|
||||
:with_pair(function (opts)
|
||||
local pair = opts.line:sub(opts.col - 1, opts.col)
|
||||
return vim.tbl_contains({ '()', '[]', '{}' }, pair)
|
||||
end),
|
||||
Rule('( ', ' )')
|
||||
:with_pair(function() return false end)
|
||||
:with_move(function(opts)
|
||||
return opts.prev_char:match('.%)') ~= nil
|
||||
end)
|
||||
:use_key(')'),
|
||||
Rule('{ ', ' }')
|
||||
:with_pair(function() return false end)
|
||||
:with_move(function(opts)
|
||||
return opts.prev_char:match('.%}') ~= nil
|
||||
end)
|
||||
:use_key('}'),
|
||||
Rule('[ ', ' ]')
|
||||
:with_pair(function() return false end)
|
||||
:with_move(function(opts)
|
||||
return opts.prev_char:match('.%]') ~= nil
|
||||
end)
|
||||
:use_key(']'),
|
||||
Rule('%(.*%)%s*%=>$', ' { }', { 'typescript', 'typescriptreact', 'javascript' })
|
||||
:use_regex(true)
|
||||
:set_end_pair_length(2),
|
||||
Rule("%", "%", "lua")
|
||||
:with_pair(require('nvim-autopairs.ts-conds').is_ts_node({'string','comment'})),
|
||||
Rule("$", "$", "lua")
|
||||
:with_pair(require('nvim-autopairs.ts-conds').is_not_ts_node({'function'})),
|
||||
Rule(' ', ' ')
|
||||
:with_pair(function (opts)
|
||||
local pair = opts.line:sub(opts.col - 1, opts.col)
|
||||
return vim.tbl_contains({ '()', '[]', '{}' }, pair)
|
||||
end),
|
||||
Rule('( ', ' )')
|
||||
:with_pair(function() return false end)
|
||||
:with_move(function(opts)
|
||||
return opts.prev_char:match('.%)') ~= nil
|
||||
end)
|
||||
:use_key(')'),
|
||||
Rule('{ ', ' }')
|
||||
:with_pair(function() return false end)
|
||||
:with_move(function(opts)
|
||||
return opts.prev_char:match('.%}') ~= nil
|
||||
end)
|
||||
:use_key('}'),
|
||||
Rule('[ ', ' ]')
|
||||
:with_pair(function() return false end)
|
||||
:with_move(function(opts)
|
||||
return opts.prev_char:match('.%]') ~= nil
|
||||
end)
|
||||
:use_key(']'),
|
||||
Rule('%(.*%)%s*%=>$', ' { }', { 'typescript', 'typescriptreact', 'javascript' })
|
||||
:use_regex(true)
|
||||
:set_end_pair_length(2),
|
||||
})
|
||||
|
||||
require("nvim-autopairs.completion.cmp").setup({
|
||||
map_cr = true, -- map <CR> on insert mode
|
||||
map_complete = true, -- it will auto insert `(` (map_char) after select function or method item
|
||||
auto_select = true, -- automatically select the first item
|
||||
insert = false, -- use insert confirm behavior instead of replace
|
||||
map_char = { -- modifies the function or method delimiter by filetypes
|
||||
all = '(',
|
||||
tex = '{'
|
||||
}
|
||||
map_cr = true, -- map <CR> on insert mode
|
||||
map_complete = true, -- it will auto insert `(` (map_char) after select function or method item
|
||||
auto_select = true, -- automatically select the first item
|
||||
insert = false, -- use insert confirm behavior instead of replace
|
||||
map_char = { -- modifies the function or method delimiter by filetypes
|
||||
all = '(',
|
||||
tex = '{'
|
||||
}
|
||||
})
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
set inccommand=nosplit
|
||||
set clipboard^=unnamedplus
|
||||
set number
|
||||
set signcolumn="yes"
|
||||
set signcolumn="auto:4"
|
||||
set noswapfile
|
||||
set hidden
|
||||
set lazyredraw
|
||||
|
@ -32,9 +32,18 @@ set completeopt=menu,menuone,noselect,noinsert
|
|||
let formatlistpat='^\s*\(\d\+[\]:.)}\t ]\|[*-][\t ]\)\s*'
|
||||
match ErrorMsg '^\(<\|=\|>\)\{7\}\([^=].\+\)\?$'
|
||||
|
||||
set path+=**
|
||||
set wildignore+=*_build/*
|
||||
set wildignore+=**/coverage/*
|
||||
set wildignore+=**/node_modules/*
|
||||
set wildignore+=**/.git/*
|
||||
|
||||
let g:netrw_browse_split = 0
|
||||
let g:netrw_banner = 0
|
||||
let g:netrw_winsize = 25
|
||||
let g:netrw_liststyle = 3
|
||||
let g:netrw_localrmdir='rm -r'
|
||||
nnoremap <silent><F5> :Vex!<cr>
|
||||
|
||||
let g:LoupeClearHighlightMap = 1
|
||||
let g:LoupeCenterResults=0
|
||||
|
|
|
@ -1,40 +1,60 @@
|
|||
-- luacheck: globals vim dotfiles
|
||||
dotfiles = _G.dotfiles or {}
|
||||
function dotfiles.sl_wc()
|
||||
return vim.tbl_contains({
|
||||
"markdown",
|
||||
"txt",
|
||||
"vimwiki"
|
||||
}, vim.opt.filetype:get()) and " W:" .. vim.fn.wordcount().words or ""
|
||||
end
|
||||
function dotfiles.sl_dg()
|
||||
local d = ''
|
||||
if vim.diagnostic ~= nil then -- Neovim 0.6
|
||||
for marker,kind in pairs({
|
||||
[" E:"] = vim.diagnostic.severity.ERROR,
|
||||
[" W:"] = vim.diagnostic.severity.WARN,
|
||||
[" I:"] = vim.diagnostic.severity.INFO,
|
||||
[" H:"] = vim.diagnostic.severity.HINT
|
||||
}) do
|
||||
local c = #vim.diagnostic.get(0, { severity = kind })
|
||||
if c ~= 0 then
|
||||
d = d .. marker .. tostring(c)
|
||||
end
|
||||
end
|
||||
else -- Neovim 0.5
|
||||
for kind,marker in pairs({ Error = " E:", Warning = " W:", Information = " I:", Hint = " H:" }) do
|
||||
local c = vim.lsp.diagnostic.get_count(0, kind)
|
||||
if c ~= 0 then
|
||||
d = d .. marker .. tostring(c)
|
||||
end
|
||||
local function get_git_status()
|
||||
local head = vim.b.gitsigns_head or ''
|
||||
local signs = vim.b.gitsigns_status or ''
|
||||
if signs == '' then
|
||||
if head == '-' or head == '' then
|
||||
return ''
|
||||
end
|
||||
return string.format(' %s', head)
|
||||
end
|
||||
return d
|
||||
return string.format(' %s %s', head, signs)
|
||||
end
|
||||
local statusline = " %0.45f%m%h%w%r%= %y%{v:lua.dotfiles.sl_wc()} %l:%c %p%%%{v:lua.dotfiles.sl_dg()} "
|
||||
local statusline_nc = " %0.45f%m%h%w%r%="
|
||||
function dotfiles.sl_stl()
|
||||
return vim.g.statusline_winid == vim.fn.win_getid() and statusline or statusline_nc
|
||||
end
|
||||
vim.opt.statusline="%!v:lua.dotfiles.sl_stl()"
|
||||
|
||||
local function get_lsp_info()
|
||||
if vim.lsp.buf.server_ready() then
|
||||
local hints = vim.lsp.diagnostic.get_count(0, 'Hint')
|
||||
local warnings = vim.lsp.diagnostic.get_count(0, 'Warning')
|
||||
local errors = vim.lsp.diagnostic.get_count(0, 'Error')
|
||||
return string.format(' :%d :%d :%d ', hints, warnings, errors)
|
||||
else
|
||||
return ''
|
||||
end
|
||||
end
|
||||
|
||||
local function is_modified()
|
||||
if vim.bo.modified then
|
||||
return ' [+]'
|
||||
end
|
||||
return ''
|
||||
end
|
||||
|
||||
local function get_file_info()
|
||||
return ' %l:%c'
|
||||
end
|
||||
|
||||
function Get_flags()
|
||||
return '%h%w%m%r'
|
||||
end
|
||||
|
||||
function Get_file_name()
|
||||
return '%<%F'
|
||||
end
|
||||
|
||||
function Color_as(value, group)
|
||||
return string.format('%%#%s#%s', group, value)
|
||||
end
|
||||
|
||||
local status_line_template = '%s%s%%=%s%%=%s%s'
|
||||
|
||||
function RenderStatusLine()
|
||||
return string.format(
|
||||
status_line_template,
|
||||
Color_as(get_lsp_info(), 'diffChanged'),
|
||||
Color_as(Get_flags(), 'StatusLine'),
|
||||
Color_as(Get_file_name(), 'StatusLine'),
|
||||
Color_as(get_git_status(), 'diffChanged'),
|
||||
Color_as(get_file_info(), 'StatusLineNC')
|
||||
)
|
||||
end
|
||||
|
||||
vim.o.statusline = '%!v:lua.RenderStatusLine()'
|
||||
|
|
|
@ -7,16 +7,27 @@ require('telescope').setup {
|
|||
'--with-filename',
|
||||
'--line-number',
|
||||
'--column',
|
||||
'--smart-case'
|
||||
'--smart-case',
|
||||
'--hidden'
|
||||
},
|
||||
prompt_title = " ",
|
||||
results_title = " ",
|
||||
preview_title = " ",
|
||||
sorting_strategy = "ascending",
|
||||
layout_config = {
|
||||
width = 0.75,
|
||||
prompt_position = "top",
|
||||
preview_cutoff = 120,
|
||||
},
|
||||
find_command = {'fd', '-t f', '-c always', '-H'},
|
||||
-- find_command = {'rg', '--no-heading', '--with-filename', '--line-number', '--column', '--smart-case'},
|
||||
pickers = {
|
||||
find_files = {
|
||||
find_command = {'fd', '-t f', '-c always', '-H'},
|
||||
hidden = true,
|
||||
},
|
||||
file_browser = {
|
||||
hidden = true,
|
||||
},
|
||||
},
|
||||
selection_caret = "→",
|
||||
color_devicons = true,
|
||||
set_env = {['COLORTERM'] = 'truecolor'},
|
||||
|
@ -25,7 +36,8 @@ require('telescope').setup {
|
|||
["<C-q>"] = actions.smart_send_to_qflist + actions.open_qflist,
|
||||
["<C-x>"] = false,
|
||||
["<C-o>"] = actions.select_horizontal,
|
||||
["<CR>"] = actions.select_default + actions.center
|
||||
["<CR>"] = actions.select_default + actions.center,
|
||||
["<esc>"] = actions.close,
|
||||
},
|
||||
n = {
|
||||
["<C-q>"] = actions.smart_send_to_qflist + actions.open_qflist,
|
||||
|
@ -35,3 +47,13 @@ require('telescope').setup {
|
|||
}
|
||||
|
||||
require('telescope').load_extension('fzf')
|
||||
|
||||
local map = vim.api.nvim_set_keymap
|
||||
local default_opts = {noremap = true, silent = true}
|
||||
map('n', '<F1>', '<cmd>Telescope help_tags<CR>', default_opts)
|
||||
map('n', '<F2>', '<cmd>lua require("telescope.builtin").find_files({cwd = "%:h", hidden=true})<CR>', default_opts)
|
||||
map('n', '<F3>', '<cmd>Telescope file_browser hidden=true<CR>', default_opts)
|
||||
map('n', '<F4>', '<cmd>Telescope buffers<CR>', default_opts)
|
||||
map('n', '<M-f>', '<cmd>Telescope live_grep<CR>', default_opts)
|
||||
map('n', '<M-g>', '<cmd>Telescope git_commits<CR>', default_opts)
|
||||
map('n', '<M-S-r>', '<cmd>Telescope resume<CR>', default_opts)
|
||||
|
|
|
@ -1,44 +1,45 @@
|
|||
vim.lsp.handlers['textDocument/publishDiagnostics'] = vim.lsp.with(
|
||||
vim.lsp.diagnostic.on_publish_diagnostics,
|
||||
{
|
||||
underline = true,
|
||||
virtual_text = {
|
||||
spacing = 5,
|
||||
severity_limit = 'Hint',
|
||||
},
|
||||
update_in_insert = true,
|
||||
}
|
||||
vim.lsp.diagnostic.on_publish_diagnostics,
|
||||
{
|
||||
underline = true,
|
||||
virtual_text = {
|
||||
spacing = 5,
|
||||
severity_limit = 'Hint',
|
||||
},
|
||||
update_in_insert = true,
|
||||
}
|
||||
)
|
||||
|
||||
require'nvim-treesitter.configs'.setup {
|
||||
ensure_installed = { "bash", "css", "go", "gomod", "html", "json", "json5", "jsonc", "latex", "lua", "scss", "toml", "vim", "yaml" }, -- one of "all", "maintained" (parsers with maintainers), or a list of languages
|
||||
use_languagetree = true,
|
||||
highlight = {
|
||||
enable = true, -- false will disable the whole extension
|
||||
additional_vim_regex_highlighting = false,
|
||||
},
|
||||
indent = {
|
||||
enable = true,
|
||||
},
|
||||
textobjects = {
|
||||
select = {
|
||||
enable = true,
|
||||
lookahead = true, -- Automatically jump forward to textobj, similar to targets.vim
|
||||
keymaps = {
|
||||
-- You can use the capture groups defined in textobjects.scm
|
||||
['af'] = '@function.outer',
|
||||
['if'] = '@function.inner',
|
||||
['ac'] = '@class.outer',
|
||||
['ic'] = '@class.inner',
|
||||
},
|
||||
},
|
||||
rainbow = {
|
||||
enable = true,
|
||||
extended_mode = true, -- Also highlight non-bracket delimiters like html tags, boolean or table: lang -> boolean
|
||||
max_file_lines = nil, -- Do not enable for files with more than n lines, int
|
||||
},
|
||||
autopairs = {
|
||||
enable = true,
|
||||
},
|
||||
}
|
||||
ensure_installed = { "bash", "css", "go", "gomod", "html", "json", "json5", "jsonc", "lua", "scss", "toml", "vim", "yaml" },
|
||||
highlight = {
|
||||
enable = true,
|
||||
use_languagetree = true,
|
||||
additional_vim_regex_highlighting = false,
|
||||
},
|
||||
indent = { enable = true, },
|
||||
incremental_selection = { enable = true },
|
||||
query_linter = {
|
||||
enable = true,
|
||||
use_virtual_text = true,
|
||||
lint_events = { "BufWrite", "CursorHold" }
|
||||
},
|
||||
textobjects = {
|
||||
select = {
|
||||
enable = true,
|
||||
lookahead = true,
|
||||
keymaps = {
|
||||
['af'] = '@function.outer',
|
||||
['if'] = '@function.inner',
|
||||
['ac'] = '@class.outer',
|
||||
['ic'] = '@class.inner',
|
||||
},
|
||||
},
|
||||
rainbow = {
|
||||
enable = true,
|
||||
extended_mode = true, -- Also highlight non-bracket delimiters like html tags, boolean or table: lang -> boolean
|
||||
max_file_lines = nil, -- Do not enable for files with more than n lines, int
|
||||
},
|
||||
autopairs = { enable = true },
|
||||
context_commentstring = { enable = true },
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,382 +1,248 @@
|
|||
1080p
|
||||
AHK
|
||||
AMI
|
||||
AMIs
|
||||
APFS
|
||||
API
|
||||
APIs
|
||||
APM
|
||||
APS
|
||||
AWS
|
||||
Airtable
|
||||
Analytics
|
||||
And
|
||||
AngularJS
|
||||
AgileBits
|
||||
Ansible
|
||||
AutoHotkey
|
||||
B2B
|
||||
Benchmarking
|
||||
BigQuery
|
||||
BitBucket
|
||||
Braintree
|
||||
BFS
|
||||
BeOS
|
||||
CDN
|
||||
CI
|
||||
CI / CD
|
||||
CLI
|
||||
CMS
|
||||
CPUs
|
||||
CRM
|
||||
CSRF
|
||||
CSS
|
||||
CSV
|
||||
Caddy
|
||||
Camtasia
|
||||
CapRover
|
||||
Capistrano
|
||||
Certbot
|
||||
Chromebook
|
||||
CircleCI
|
||||
CloudFront
|
||||
CloudWatch
|
||||
Cloudflare
|
||||
CodeIgniter
|
||||
Compose's
|
||||
ConEmu
|
||||
Connexion
|
||||
Coronavirus
|
||||
Cron
|
||||
DBeaver
|
||||
DDD
|
||||
DKIM
|
||||
DNS
|
||||
DaVinci
|
||||
DataDog
|
||||
DevOps
|
||||
DexPot
|
||||
DigitalOcean
|
||||
DigitalOcean's
|
||||
Django
|
||||
Docker's
|
||||
Dockerfile
|
||||
Dockerfiles
|
||||
Dockerize
|
||||
Dockerized
|
||||
DropBox
|
||||
Dyno
|
||||
Dynos
|
||||
CentOS
|
||||
Clojure
|
||||
Codespaces
|
||||
CoffeeScript
|
||||
Colemak
|
||||
DFS
|
||||
DXP
|
||||
Dropbox
|
||||
EC2
|
||||
ECR
|
||||
ECS
|
||||
EKS
|
||||
ELB
|
||||
ENV
|
||||
ERD
|
||||
ETS
|
||||
Ecto
|
||||
ElastiCache
|
||||
Elasticsearch
|
||||
EmberJS
|
||||
FZF
|
||||
FZF's
|
||||
Fargate
|
||||
Fastly
|
||||
Firebase
|
||||
Flatpickr
|
||||
GCP
|
||||
GPG
|
||||
GVim
|
||||
GalliumOS
|
||||
GenServer
|
||||
Genomic
|
||||
Geocities
|
||||
Gigalixir
|
||||
GitLab
|
||||
GitOps
|
||||
Gitlab
|
||||
GnuCash
|
||||
GoRails
|
||||
Golang
|
||||
Golang's
|
||||
Google'd
|
||||
GovCloud
|
||||
ES6
|
||||
ESPP
|
||||
Ephemerality
|
||||
FB
|
||||
Facebook
|
||||
Facebook's
|
||||
FileMaker
|
||||
Firefox
|
||||
FreeBSD
|
||||
GitHub
|
||||
Gmail
|
||||
GnuPG
|
||||
GraphQL
|
||||
Graphene
|
||||
Gumroad
|
||||
HTTPS
|
||||
HackerNews
|
||||
Hatchbox
|
||||
GraphiQL
|
||||
GraphiQL's
|
||||
HFS
|
||||
Hammerspoon
|
||||
Heroku
|
||||
Heroku's
|
||||
HexChat
|
||||
Hotwire
|
||||
IE8
|
||||
IIS
|
||||
IPS
|
||||
Idempotency
|
||||
InfluxDB
|
||||
IrfanView
|
||||
Homebrew
|
||||
Hurrell
|
||||
IDE
|
||||
IRC
|
||||
JS
|
||||
JSON
|
||||
Javascript
|
||||
Jinja
|
||||
Jira
|
||||
Jumpstart
|
||||
Jupyter
|
||||
K8s
|
||||
KPI
|
||||
Kanban
|
||||
Keyserver
|
||||
Knex
|
||||
Koa
|
||||
Kubernetes
|
||||
LOC
|
||||
LTS
|
||||
Laravel
|
||||
Linode
|
||||
Linode's
|
||||
LiveView
|
||||
MD5
|
||||
MacBook
|
||||
Magento
|
||||
Mailchimp
|
||||
Mailgun
|
||||
Makefile
|
||||
MariaDB
|
||||
Memcached
|
||||
Metadata
|
||||
Microservices
|
||||
MobaXterm
|
||||
Moby
|
||||
MobyLinux
|
||||
JSP
|
||||
JSPs
|
||||
Karabiner
|
||||
Keychain
|
||||
LSP
|
||||
LastPass
|
||||
Liferay
|
||||
Liferay's
|
||||
Lua
|
||||
LuaJIT
|
||||
MVC
|
||||
MacVim
|
||||
MailMate
|
||||
MongoDB
|
||||
Mux
|
||||
Monoid
|
||||
Monoids
|
||||
MySQL
|
||||
NERDTree
|
||||
Neo4j
|
||||
Netlify
|
||||
NumPy
|
||||
OAuth
|
||||
OKR
|
||||
OTP
|
||||
OVH
|
||||
Overcomplicating
|
||||
Neovim
|
||||
OCaml
|
||||
PHP
|
||||
PHP's
|
||||
PKI
|
||||
PM2
|
||||
POV
|
||||
PPI
|
||||
PaaS
|
||||
PagerDuty
|
||||
Papertrail
|
||||
PaymentIntents
|
||||
Photoshop
|
||||
Pinterest
|
||||
Pipenv
|
||||
PostCSS
|
||||
PostgreSQL
|
||||
Postgres
|
||||
PowerShell
|
||||
PowerToys
|
||||
Prepending
|
||||
Prisma
|
||||
PythonAnywhere
|
||||
QuakeLive
|
||||
RDS
|
||||
PRs
|
||||
Perf
|
||||
Phabricator
|
||||
PowerPC
|
||||
README
|
||||
RESTPlus
|
||||
REPL
|
||||
RESTful
|
||||
RHEL
|
||||
RQ
|
||||
RSS
|
||||
RabbitMQ
|
||||
RedHat
|
||||
Reddit
|
||||
RVM
|
||||
React's
|
||||
Realforce
|
||||
Recurse
|
||||
Redis
|
||||
Rekognition
|
||||
Route53
|
||||
Rubocop
|
||||
S3
|
||||
SAAS
|
||||
SCA
|
||||
Redux
|
||||
SDK
|
||||
SES
|
||||
SHA
|
||||
SKUs
|
||||
SMTP
|
||||
SNS
|
||||
SQLAlchemy
|
||||
SQLite
|
||||
SQS
|
||||
SSD
|
||||
SSDs
|
||||
SSL
|
||||
SendGrid
|
||||
Sendy
|
||||
Sennheiser
|
||||
ServerPilot
|
||||
Serverless
|
||||
ShellCheck
|
||||
Shopify
|
||||
Shopify's
|
||||
Sidekiq
|
||||
Solr
|
||||
StackOverflow
|
||||
TCP
|
||||
TTY
|
||||
TailwindCSS
|
||||
TailwindUI
|
||||
Terraform
|
||||
That'll
|
||||
Theorycrafting
|
||||
Threadripper
|
||||
Timestamped
|
||||
Traefik
|
||||
Turbolinks
|
||||
SLOC
|
||||
TOTP
|
||||
TypeScript
|
||||
UI
|
||||
URI
|
||||
Udemy
|
||||
Umar
|
||||
Uptime
|
||||
UptimeRobot
|
||||
VB6
|
||||
VM
|
||||
VPC
|
||||
VSCode
|
||||
VSCode's
|
||||
VcXsrv
|
||||
Vimeo
|
||||
VirtualBox
|
||||
Virtualenv
|
||||
Vue
|
||||
VueJS
|
||||
WSL
|
||||
Webpack
|
||||
Webpacker
|
||||
WhatsApp
|
||||
Wistia
|
||||
WordPress
|
||||
Xenial
|
||||
URLs
|
||||
UX
|
||||
Undux
|
||||
WebSockets
|
||||
Wincent
|
||||
Xcode
|
||||
YAML
|
||||
Youtube
|
||||
Zapier
|
||||
Zope
|
||||
analytics
|
||||
anonymized
|
||||
ap
|
||||
argparse
|
||||
args
|
||||
YubiKey
|
||||
abandonware
|
||||
admin
|
||||
app
|
||||
applicatives
|
||||
apps
|
||||
async
|
||||
balancer
|
||||
benchmarking
|
||||
blockchain
|
||||
boolean
|
||||
card
|
||||
centos
|
||||
centric
|
||||
changelog
|
||||
auth
|
||||
autocompletes
|
||||
autocompletion
|
||||
backend
|
||||
backticks
|
||||
bitmask
|
||||
bitmasks
|
||||
blog
|
||||
cheatsheet
|
||||
checkboxes
|
||||
chruby
|
||||
codebase
|
||||
codebases
|
||||
codepath
|
||||
colocated
|
||||
colocating
|
||||
colocation
|
||||
committer
|
||||
composability
|
||||
composable
|
||||
concerningly
|
||||
config
|
||||
configs
|
||||
cron
|
||||
cryptocurrency
|
||||
datetime
|
||||
deploy's
|
||||
deployable
|
||||
dev
|
||||
devs
|
||||
distro
|
||||
distros
|
||||
dnsmasq
|
||||
declutter
|
||||
dedupes
|
||||
destructuring
|
||||
diff
|
||||
diffs
|
||||
discoverability
|
||||
dotfile
|
||||
dotfiles
|
||||
foobar2000
|
||||
frictionless
|
||||
gmail
|
||||
gmail's
|
||||
gunicorn
|
||||
eg
|
||||
endorphin
|
||||
etc
|
||||
fallback
|
||||
filesystem
|
||||
filetype
|
||||
folksonomy
|
||||
foo
|
||||
foobar
|
||||
gitignore
|
||||
globbing
|
||||
gzip
|
||||
gzipped
|
||||
hackaton
|
||||
haha
|
||||
healthcheck
|
||||
hostname
|
||||
html
|
||||
htop
|
||||
i3
|
||||
iptables
|
||||
irreproducible
|
||||
hacky
|
||||
heterogenous
|
||||
homogenous
|
||||
hostnames
|
||||
iCloud
|
||||
iOS
|
||||
iPhone
|
||||
iTerm
|
||||
iTerm2
|
||||
iframe
|
||||
impactful
|
||||
inbox
|
||||
infocmp
|
||||
inline
|
||||
introspection
|
||||
jQuery
|
||||
journald
|
||||
keyring
|
||||
linters
|
||||
linux
|
||||
localStorage
|
||||
localhost
|
||||
keychain
|
||||
keychains
|
||||
linter
|
||||
linting
|
||||
loadview
|
||||
macOS
|
||||
master
|
||||
memcached
|
||||
memoization
|
||||
memoize
|
||||
memoized
|
||||
memoizing
|
||||
mergeable
|
||||
metadata
|
||||
metastisizing
|
||||
microservice
|
||||
microservices
|
||||
middleware
|
||||
mintty
|
||||
mtime
|
||||
mysql
|
||||
mysqldump
|
||||
misclick
|
||||
mkview
|
||||
modeline
|
||||
monit
|
||||
monoid
|
||||
monoids
|
||||
monorepo
|
||||
namespace
|
||||
nginx
|
||||
ngrok
|
||||
observability
|
||||
openssl
|
||||
peasy
|
||||
pem
|
||||
pem's
|
||||
npm
|
||||
nvALT
|
||||
octothorpe
|
||||
offline
|
||||
ok
|
||||
onboarding
|
||||
outsized
|
||||
overpromising
|
||||
passphrases
|
||||
perf
|
||||
performant
|
||||
pgAdmin
|
||||
pjax
|
||||
permalinks
|
||||
prescan
|
||||
proactively
|
||||
programmatically
|
||||
psql
|
||||
purs
|
||||
pwgen
|
||||
queueing
|
||||
prototypal
|
||||
quicksort
|
||||
rbenv
|
||||
rebase
|
||||
rebased
|
||||
recurse
|
||||
recursed
|
||||
recursing
|
||||
refactor
|
||||
reflows
|
||||
repo
|
||||
repos
|
||||
resize
|
||||
rsync
|
||||
scalable
|
||||
schemas
|
||||
screencast
|
||||
reservior
|
||||
screencasts
|
||||
searchable
|
||||
sed
|
||||
sendgrid
|
||||
sql
|
||||
screenful
|
||||
screensaver
|
||||
screenshot
|
||||
screenshots
|
||||
segfaults
|
||||
shows
|
||||
spellfile
|
||||
stateful
|
||||
stderr
|
||||
stdout
|
||||
sudo
|
||||
struct
|
||||
submodule
|
||||
submodules
|
||||
subtree
|
||||
symlink
|
||||
symlinked
|
||||
syslog
|
||||
systemd
|
||||
t2
|
||||
timestamps
|
||||
templated
|
||||
terminfo
|
||||
timestamp
|
||||
tmux
|
||||
toc
|
||||
tooltip
|
||||
transactional
|
||||
transcoding
|
||||
unlike
|
||||
unmaintained
|
||||
unmarking
|
||||
unopinionated
|
||||
untracked
|
||||
url
|
||||
uwsgi
|
||||
vCPUs
|
||||
vhost
|
||||
vscode
|
||||
webcomic
|
||||
webhook
|
||||
webhooks
|
||||
websockets
|
||||
whitelisting
|
||||
wsltty
|
||||
www
|
||||
toolchain
|
||||
toolset
|
||||
transpile
|
||||
transpiled
|
||||
typeahead
|
||||
typeclass
|
||||
unarchive
|
||||
underdelivered
|
||||
underdelivering
|
||||
uninstalling
|
||||
unsetting
|
||||
unstyled
|
||||
unsubscribe
|
||||
unsubscription
|
||||
upvote
|
||||
versioned
|
||||
viewport
|
||||
vim
|
||||
webpack
|
||||
webviews
|
||||
whitespace
|
||||
wiki
|
||||
wikitext
|
||||
zsh
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/perl
|
||||
|
||||
# CLI Pipe Viewer 0.1.2 - configuration file
|
||||
# CLI Pipe Viewer 0.1.5 - configuration file
|
||||
|
||||
our $CONFIG = {
|
||||
api_host => "auto",
|
||||
|
@ -47,6 +47,7 @@ our $CONFIG = {
|
|||
env_proxy => 1,
|
||||
fat32safe => 0,
|
||||
ffmpeg_cmd => "/bin/ffmpeg",
|
||||
force_fallback => 0,
|
||||
fullscreen => 0,
|
||||
get_captions => 0,
|
||||
get_term_width => 1,
|
||||
|
|
|
@ -9,12 +9,12 @@ setopt COMBINING_CHARS # Combine accents with the base character.
|
|||
setopt INTERACTIVE_COMMENTS # Enable comments in interactive shell.
|
||||
setopt RC_QUOTES # Allow 'Henry''s Garage' instead of 'Henry'\''s Garage'.
|
||||
unsetopt MAIL_WARNING # Don't print a warning message if a mail file has been accessed.
|
||||
setopt LONG_LIST_JOBS # List jobs in the long format by default.
|
||||
setopt AUTO_RESUME # Attempt to resume existing job before creating a new process.
|
||||
setopt NOTIFY # Report status of background jobs immediately.
|
||||
unsetopt BG_NICE # Don't run all background jobs at a lower priority.
|
||||
unsetopt HUP # Don't kill jobs on shell exit.
|
||||
unsetopt CHECK_JOBS # Don't report on jobs when shell exit.
|
||||
setopt LONG_LIST_JOBS # List jobs in the long format by default.
|
||||
setopt AUTO_RESUME # Attempt to resume existing job before creating a new process.
|
||||
setopt NOTIFY # Report status of background jobs immediately.
|
||||
unsetopt BG_NICE # Don't run all background jobs at a lower priority.
|
||||
unsetopt HUP # Don't kill jobs on shell exit.
|
||||
unsetopt CHECK_JOBS # Don't report on jobs when shell exit.
|
||||
setopt AUTO_CD # Auto changes to a directory without typing cd.
|
||||
setopt AUTO_PUSHD # Push the old directory onto the stack on cd.
|
||||
setopt PUSHD_IGNORE_DUPS # Do not store duplicates in the stack.
|
||||
|
@ -28,11 +28,11 @@ setopt PROMPT_SUBST
|
|||
hash tmux 2>/dev/null && source ${ZDOTDIR}/tmux.zsh
|
||||
|
||||
foreach programa (
|
||||
doc/fzf/completion.zsh
|
||||
doc/fzf/key-bindings.zsh
|
||||
zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.plugin.zsh
|
||||
) {
|
||||
source /usr/share/$programa
|
||||
doc/fzf/completion.zsh
|
||||
doc/fzf/key-bindings.zsh
|
||||
zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.plugin.zsh
|
||||
) {
|
||||
source /usr/share/$programa
|
||||
}
|
||||
|
||||
for f in ${ZDOTDIR}/conf/*; do
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
#!/usr/bin/env zsh
|
||||
|
||||
[ ! -n "${SMART_CD_LS+1}" ] && SMART_CD_LS=true
|
||||
[ ! -n "${SMART_CD_GIT_STATUS+1}" ] && SMART_CD_GIT_STATUS=true
|
||||
|
||||
_smart_cd_lastgitdir=''
|
||||
_smart_cd_chpwd_handler () {
|
||||
emulate -L zsh
|
||||
|
||||
[[ $SMART_CD_LS == true ]] && ls -LAFt --color=always --group-directories-first
|
||||
|
||||
if [[ $SMART_CD_GIT_STATUS == true ]]; then
|
||||
local gitdir="$(git rev-parse --git-dir 2>/dev/null)"
|
||||
if [[ -n "$gitdir" ]]; then
|
||||
gitdir="$gitdir:A" # absolute path of $gitdir
|
||||
[[ "$gitdir" != "$_smart_cd_lastgitdir" ]] && (echo; git status)
|
||||
_smart_cd_lastgitdir="$gitdir"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
autoload -U add-zsh-hook
|
||||
add-zsh-hook chpwd _smart_cd_chpwd_handler
|
||||
_smart_cd_chpwd_handler
|
|
@ -23,11 +23,11 @@ fi
|
|||
unset _comp_files
|
||||
|
||||
zstyle ':completion:*' matcher-list '' '+m:{[:lower:]}={[:upper:]}' '+m:{[:upper:]}={[:lower:]}' '+m:{_-}={-_}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
|
||||
zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}
|
||||
zstyle -e ':completion:*' special-dirs '[[ $PREFIX = (../)#(..) ]] && reply=(..)'
|
||||
zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}
|
||||
zstyle -e ':completion:*' special-dirs '[[ $PREFIX = (../)#(..) ]] && reply=(..)'
|
||||
zstyle ':completion:*:complete:(cd|pushd):*' tag-order 'local-directories named-directories'
|
||||
zstyle ':completion:*' group-name ''
|
||||
zstyle ':completion:*:descriptions' format '%F{yellow}%d %f'
|
||||
zstyle ':completion:*' group-name ''
|
||||
zstyle ':completion:*:descriptions' format '%F{yellow}%d %f'
|
||||
zstyle ':completion:*' menu select
|
||||
zstyle ':completion::complete:*' use-cache on
|
||||
zstyle ':completion::complete:*' cache-path "$XDG_CACHE_HOME/zcompcache"
|
||||
|
@ -38,10 +38,10 @@ zstyle ':completion:*:default' list-prompt '%S%M matches%s'
|
|||
zstyle ':completion:*' verbose yes
|
||||
zstyle ':completion:*' completer _complete _match _approximate
|
||||
zstyle ':completion:*:match:*' original only
|
||||
zstyle ':completion:*:approximate:*' max-errors 1 numeric
|
||||
zstyle ':completion:*:approximate:*' max-errors 1 numeric
|
||||
zstyle -e ':completion:*:approximate:*' max-errors 'reply=($((($#PREFIX+$#SUFFIX)/3>7?7:($#PREFIX+$#SUFFIX)/3))numeric)'
|
||||
zstyle ':completion:*:functions' ignored-patterns '(_*|pre(cmd|exec))'
|
||||
zstyle ':completion:*:*:-subscript-:*' tag-order indexes parameters
|
||||
zstyle ':completion:*:functions' ignored-patterns '(_*|pre(cmd|exec))'
|
||||
zstyle ':completion:*:*:-subscript-:*' tag-order indexes parameters
|
||||
zstyle ':completion:*:*:cd:*:directory-stack' menu yes select
|
||||
zstyle ':completion:*:-tilde-:*' group-order 'named-directories' 'path-directories' 'users' 'expand'
|
||||
zstyle ':completion:*:history-words' stop yes
|
||||
|
@ -49,16 +49,16 @@ zstyle ':completion:*:history-words' remove-all-dups yes
|
|||
zstyle ':completion:*:history-words' list false
|
||||
zstyle ':completion:*:history-words' menu yes
|
||||
zstyle ':completion::*:(-command-|export):*' fake-parameters ${${${_comps[(I)-value-*]#*,}%%,*}:#-*-}
|
||||
zstyle ':completion:*:(rm|kill|diff):*' ignore-line other
|
||||
zstyle ':completion:*:rm:*' file-patterns '*:all-files'
|
||||
zstyle ':completion:*:*:*:*:processes' command 'ps -u $LOGNAME -o pid,user,command -w'
|
||||
zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#) ([0-9a-z-]#)*=01;36=0=01'
|
||||
zstyle ':completion:*:(rm|kill|diff):*' ignore-line other
|
||||
zstyle ':completion:*:rm:*' file-patterns '*:all-files'
|
||||
zstyle ':completion:*:*:*:*:processes' command 'ps -u $LOGNAME -o pid,user,command -w'
|
||||
zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#) ([0-9a-z-]#)*=01;36=0=01'
|
||||
zstyle ':completion:*:(killall|pkill|kill):*' menu yes select
|
||||
zstyle ':completion:*:(killall|pkill|kill):*' force-list always
|
||||
zstyle ':completion:*:(killall|pkill|kill):*' insert-ids single
|
||||
zstyle ':completion:*:man:*' menu yes select
|
||||
zstyle ':completion:*:manuals' separate-sections true
|
||||
zstyle ':completion:*:manuals.(^1*)' insert-sections true
|
||||
zstyle ':completion:*:man:*' menu yes select
|
||||
zstyle ':completion:*:manuals' separate-sections true
|
||||
zstyle ':completion:*:manuals.(^1*)' insert-sections true
|
||||
zstyle ':completion:*:parameters' list-colors '=*=34'
|
||||
zstyle ':completion:*:commands' list-colors '=*=32'
|
||||
zstyle ':completion:*:builtins' list-colors '=*=1;38;5;142'
|
||||
|
@ -67,7 +67,7 @@ zstyle ':completion:*:options' list-colors '=^(-- *)=34'
|
|||
zstyle ':completion:*:default' list-colors '=(#b)*(-- *)=36=33' '=*=36'
|
||||
zstyle ':completion:*' rehash true
|
||||
zstyle ':completion:*' list-separator " "
|
||||
zstyle ':completion:*' list-dirs-first true
|
||||
zstyle ':completion:*' list-dirs-first true
|
||||
|
||||
zstyle -e ':completion:*:hosts' hosts 'reply=()'
|
||||
|
||||
|
|
Loading…
Reference in New Issue