Arroz para nvim 0.7 y otra prueba de lazyloading a ver que onda. Los themes de telescope son imposibles, o yo no entendi una goma... en fin. Tambien hay 2 cambios minimos de ortografia
This commit is contained in:
parent
ed86224280
commit
8ab144db22
|
@ -42,7 +42,7 @@ bspc config presel_feedback_color "$(get_xrdb color6)"
|
||||||
bspc rule -a mpv state=floating
|
bspc rule -a mpv state=floating
|
||||||
bspc rule -a pentablet state=floating
|
bspc rule -a pentablet state=floating
|
||||||
bspc rule -a Alacritty:flota state=floating
|
bspc rule -a Alacritty:flota state=floating
|
||||||
bspc rule -a firefox:Browser state=floating
|
bspc rule -a Firefox:Browser state=floating
|
||||||
bspc rule -a Firefox:Navigator state=tiled desktop='^6'
|
bspc rule -a Firefox:Navigator state=tiled desktop='^6'
|
||||||
bspc rule -a Zathura state=tiled
|
bspc rule -a Zathura state=tiled
|
||||||
bspc rule -a Borderlands2 state=fullscreen
|
bspc rule -a Borderlands2 state=fullscreen
|
||||||
|
|
|
@ -11,8 +11,8 @@
|
||||||
full = show --format=fuller
|
full = show --format=fuller
|
||||||
noed = commit --amend --no-edit
|
noed = commit --amend --no-edit
|
||||||
tr = log --graph --date-order --date=short --pretty=format:'%C(cyan)%h %C(blue)%ar%C(auto)%d %C(yellow)%s%+b %C(black)%ae'
|
tr = log --graph --date-order --date=short --pretty=format:'%C(cyan)%h %C(blue)%ar%C(auto)%d %C(yellow)%s%+b %C(black)%ae'
|
||||||
fz = !sha=$( git -c color.ui=always log --oneline -n 1000 | fzf +s --no-multi --prompt 'Fixup> ' ) && git commit --fixup "${sha%% *}"
|
fz = !sha=$( git -c color.ui=auto log --oneline -n 1000 | fzf +s --no-multi --prompt 'Fixup> ' ) && git commit --fixup "${sha%% *}"
|
||||||
fr = !sha=$( git -c color.ui=always log --oneline -n 1000 | fzf +s --no-multi --prompt 'Revert> ' ) && git revert "${sha%% *}"
|
fr = !sha=$( git -c color.ui=auto log --oneline -n 1000 | fzf +s --no-multi --prompt 'Revert> ' ) && git revert "${sha%% *}"
|
||||||
wd = "!f() { git --paginate diff --dirstat=cumulative,files,0 ${1:-HEAD} | awk '{print $2}' | cut -d / -f1-${2:-4} | sort | uniq; }; f"
|
wd = "!f() { git --paginate diff --dirstat=cumulative,files,0 ${1:-HEAD} | awk '{print $2}' | cut -d / -f1-${2:-4} | sort | uniq; }; f"
|
||||||
|
|
||||||
[http]
|
[http]
|
||||||
|
@ -39,7 +39,7 @@
|
||||||
[delta]
|
[delta]
|
||||||
side-by-side = false
|
side-by-side = false
|
||||||
line-numbers = true
|
line-numbers = true
|
||||||
syntax-theme = gruvbox
|
syntax-theme = gruvbox-dark
|
||||||
hunk-header-style = omit
|
hunk-header-style = omit
|
||||||
file-style = blue
|
file-style = blue
|
||||||
file-decoration-style = blue ul ol
|
file-decoration-style = blue ul ol
|
||||||
|
@ -90,7 +90,7 @@
|
||||||
diff = auto
|
diff = auto
|
||||||
status = auto
|
status = auto
|
||||||
branch = auto
|
branch = auto
|
||||||
ui = true
|
ui = auto
|
||||||
|
|
||||||
[rerere]
|
[rerere]
|
||||||
enabled = true
|
enabled = true
|
||||||
|
@ -99,7 +99,6 @@
|
||||||
lineNumber = true
|
lineNumber = true
|
||||||
extendRegexp = true
|
extendRegexp = true
|
||||||
|
|
||||||
|
|
||||||
[gpg]
|
[gpg]
|
||||||
program = gpg2
|
program = gpg2
|
||||||
|
|
||||||
|
|
10
lf/lfrc
10
lf/lfrc
|
@ -190,13 +190,6 @@ cmd yes_preview :{{
|
||||||
map ~ no_preview
|
map ~ no_preview
|
||||||
}}
|
}}
|
||||||
|
|
||||||
cmd newfold ${{
|
|
||||||
set -f
|
|
||||||
read newd
|
|
||||||
mkdir -- "$newd"
|
|
||||||
mv -- $fx "$newd"
|
|
||||||
}}
|
|
||||||
|
|
||||||
cmd yank-dirname $dirname -- "$f" | head -c-1 | xclip -i -selection clipboard
|
cmd yank-dirname $dirname -- "$f" | head -c-1 | xclip -i -selection clipboard
|
||||||
cmd yank-path $printf '%s' "$fx" | xclip -i -selection clipboard
|
cmd yank-path $printf '%s' "$fx" | xclip -i -selection clipboard
|
||||||
cmd yank-basename $basename -a -- $fx | head -c-1 | xclip -i -selection clipboard
|
cmd yank-basename $basename -a -- $fx | head -c-1 | xclip -i -selection clipboard
|
||||||
|
@ -274,8 +267,7 @@ map Y %cp -ri $fs .
|
||||||
map D %mv -i $fs .
|
map D %mv -i $fs .
|
||||||
map zf $file-roller "$f"
|
map zf $file-roller "$f"
|
||||||
map zc $zip -9 -r "$f".cbz $f
|
map zc $zip -9 -r "$f".cbz $f
|
||||||
map zx $zu "$f"
|
map zx $zx "$f"
|
||||||
map zn newfold
|
|
||||||
map I push A<c-a> # at the very beginning
|
map I push A<c-a> # at the very beginning
|
||||||
map A rename # at the very end
|
map A rename # at the very end
|
||||||
map i push A<a-b><c-b> # at the very beginning
|
map i push A<a-b><c-b> # at the very beginning
|
||||||
|
|
|
@ -25,36 +25,40 @@ packer.init({
|
||||||
|
|
||||||
return packer.startup({
|
return packer.startup({
|
||||||
function(use)
|
function(use)
|
||||||
use({ "wbthomason/packer.nvim" })
|
use("nvim-lua/plenary.nvim")
|
||||||
use({
|
use({
|
||||||
"lewis6991/impatient.nvim",
|
"lewis6991/impatient.nvim",
|
||||||
config = function()
|
config = function()
|
||||||
require("impatient")
|
require("impatient").enable_profile()
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
use({ "wbthomason/packer.nvim" })
|
||||||
use({ "nathom/filetype.nvim" })
|
use({ "nathom/filetype.nvim" })
|
||||||
use("nvim-lua/plenary.nvim")
|
|
||||||
use({ "ellisonleao/gruvbox.nvim" })
|
use({ "ellisonleao/gruvbox.nvim" })
|
||||||
use({ "kyazdani42/nvim-web-devicons",
|
use({ "kyazdani42/nvim-web-devicons" })
|
||||||
|
use({
|
||||||
|
"nvim-telescope/telescope.nvim",
|
||||||
config = function()
|
config = function()
|
||||||
require("plugins.icons")
|
require("plugins.telescope")
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
use({ "nvim-telescope/telescope-file-browser.nvim" })
|
||||||
|
use({ "nvim-telescope/telescope-fzf-native.nvim", run = "make" })
|
||||||
|
use({
|
||||||
|
"norcalli/nvim-colorizer.lua",
|
||||||
|
event = "BufRead",
|
||||||
|
config = function()
|
||||||
|
require("plugins.colorizer")
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
use({
|
use({
|
||||||
"nvim-treesitter/nvim-treesitter",
|
"nvim-treesitter/nvim-treesitter",
|
||||||
|
event = { "BufRead", "BufNewFile" },
|
||||||
run = ":TSUpdate",
|
run = ":TSUpdate",
|
||||||
config = function()
|
config = function()
|
||||||
require("plugins.treesitter")
|
require("plugins.treesitter")
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
use({
|
|
||||||
"norcalli/nvim-colorizer.lua",
|
|
||||||
event = "BufReadPre",
|
|
||||||
config = function()
|
|
||||||
require("plugins.colorizer")
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
use({ "tpope/vim-fugitive", opt = true, cmd = { "Git", "Gdiff", "Gblame", "Glog", "Git mergetool" } })
|
|
||||||
use({
|
use({
|
||||||
"lewis6991/gitsigns.nvim",
|
"lewis6991/gitsigns.nvim",
|
||||||
event = "BufReadPre",
|
event = "BufReadPre",
|
||||||
|
@ -62,65 +66,57 @@ return packer.startup({
|
||||||
require("plugins.gitsigns_nvim")
|
require("plugins.gitsigns_nvim")
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
use({ "nvim-telescope/telescope-fzf-native.nvim", run = "make" })
|
use({ "tpope/vim-fugitive", opt = true, cmd = { "Git", "Gdiff", "Gblame", "Glog", "Git mergetool" } })
|
||||||
use({ "nvim-telescope/telescope-file-browser.nvim" })
|
|
||||||
use({
|
|
||||||
"nvim-telescope/telescope.nvim",
|
|
||||||
config = function()
|
|
||||||
require("plugins.telescope")
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
use({
|
|
||||||
"numToStr/Comment.nvim",
|
|
||||||
event = "BufRead",
|
|
||||||
config = function()
|
|
||||||
require("Comment").setup()
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
use({
|
use({
|
||||||
"neovim/nvim-lspconfig",
|
"neovim/nvim-lspconfig",
|
||||||
config = function()
|
config = function()
|
||||||
require("plugins.lsp.lsp-config")
|
require("plugins.lsp.lsp-config")
|
||||||
end,
|
end,
|
||||||
requires = { "ray-x/lsp_signature.nvim", "hrsh7th/cmp-nvim-lsp" },
|
|
||||||
})
|
})
|
||||||
|
use({ "ray-x/lsp_signature.nvim", after = "nvim-lspconfig" })
|
||||||
use({
|
use({
|
||||||
"jose-elias-alvarez/null-ls.nvim",
|
"jose-elias-alvarez/null-ls.nvim",
|
||||||
after = "nvim-lspconfig",
|
|
||||||
config = function()
|
config = function()
|
||||||
require("plugins.lsp.null-ls")
|
require("plugins.lsp.null-ls")
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
use({ "rafamadriz/friendly-snippets", module = "cmp_nvim_lsp", event = "InsertEnter" })
|
||||||
use({
|
use({
|
||||||
{
|
|
||||||
"hrsh7th/nvim-cmp",
|
"hrsh7th/nvim-cmp",
|
||||||
|
after = "friendly-snippets",
|
||||||
config = function()
|
config = function()
|
||||||
require("plugins.lsp.nvim-cmp")
|
require("plugins.lsp.nvim-cmp")
|
||||||
end,
|
end,
|
||||||
requires = {
|
})
|
||||||
{
|
use({ "f3fora/cmp-spell", after = "nvim-cmp" })
|
||||||
|
use({
|
||||||
"L3MON4D3/LuaSnip",
|
"L3MON4D3/LuaSnip",
|
||||||
|
wants = "friendly-snippets",
|
||||||
|
after = "nvim-cmp",
|
||||||
config = function()
|
config = function()
|
||||||
require("plugins.lsp.luasnip")
|
require("plugins.lsp.luasnip")
|
||||||
end,
|
end,
|
||||||
requires = { "rafamadriz/friendly-snippets" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{ "hrsh7th/cmp-path", after = "nvim-cmp" },
|
|
||||||
{ "hrsh7th/cmp-buffer", after = "nvim-cmp" },
|
|
||||||
{ "f3fora/cmp-spell", after = "nvim-cmp" },
|
|
||||||
{ "hrsh7th/cmp-nvim-lua", after = "nvim-cmp" },
|
|
||||||
{ "saadparwaiz1/cmp_luasnip", after = "LuaSnip"},
|
|
||||||
{ "hrsh7th/cmp-nvim-lsp-signature-help", after = "lsp_signature.nvim" },
|
|
||||||
})
|
})
|
||||||
|
use({ "saadparwaiz1/cmp_luasnip", after = "LuaSnip" })
|
||||||
|
use({ "hrsh7th/cmp-nvim-lua", after = "cmp_luasnip" })
|
||||||
|
use({ "hrsh7th/cmp-nvim-lsp", after = "cmp-nvim-lua" })
|
||||||
|
use({ "hrsh7th/cmp-buffer", after = "cmp-nvim-lsp" })
|
||||||
|
use({ "hrsh7th/cmp-path", after = "cmp-buffer" })
|
||||||
|
use({ "hrsh7th/cmp-nvim-lsp-signature-help", after = "cmp-path" })
|
||||||
use({
|
use({
|
||||||
"windwp/nvim-autopairs",
|
"windwp/nvim-autopairs",
|
||||||
event = "InsertCharPre",
|
|
||||||
after = "nvim-cmp",
|
after = "nvim-cmp",
|
||||||
config = function()
|
config = function()
|
||||||
require("plugins.autopairs")
|
require("plugins.autopairs")
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
use({
|
||||||
|
"numToStr/Comment.nvim",
|
||||||
|
module = "Comment",
|
||||||
|
keys = { "gc", "gb" },
|
||||||
|
config = function()
|
||||||
|
require("Comment").setup()
|
||||||
|
end,
|
||||||
|
})
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
|
@ -2,13 +2,13 @@ require("gitsigns").setup({
|
||||||
signcolumn = true,
|
signcolumn = true,
|
||||||
current_line_blame_opts = { delay = 2000, virt_text_pos = "right_align" },
|
current_line_blame_opts = { delay = 2000, virt_text_pos = "right_align" },
|
||||||
signs = {
|
signs = {
|
||||||
add = { hl = "GitSignsAdd", text = "┃", numhl = "GitSignsAddNr", linehl = "GitSignsAddLn" },
|
add = { hl = "GitSignsAdd", text = "│", numhl = "GitSignsAddNr", linehl = "GitSignsAddLn" },
|
||||||
change = { hl = "GitSignsChange", text = "┃", numhl = "GitSignsChangeNr", linehl = "GitSignsChangeLn" },
|
change = { hl = "GitSignsChange", text = "│", numhl = "GitSignsChangeNr", linehl = "GitSignsChangeLn" },
|
||||||
delete = { hl = "GitSignsDelete", text = "╏", numhl = "GitSignsDeleteNr", linehl = "GitSignsDeleteLn" },
|
delete = { hl = "GitSignsDelete", text = "┆", numhl = "GitSignsDeleteNr", linehl = "GitSignsDeleteLn" },
|
||||||
topdelete = { hl = "GitSignsDelete", text = "┯", numhl = "GitSignsDeleteNr", linehl = "GitSignsDeleteLn" },
|
topdelete = { hl = "GitSignsDelete", text = "┬", numhl = "GitSignsDeleteNr", linehl = "GitSignsDeleteLn" },
|
||||||
changedelete = {
|
changedelete = {
|
||||||
hl = "GitSignsChange",
|
hl = "GitSignsChange",
|
||||||
text = "╍",
|
text = "┴",
|
||||||
numhl = "GitSignsChangeNr",
|
numhl = "GitSignsChangeNr",
|
||||||
linehl = "GitSignsChangeLn",
|
linehl = "GitSignsChangeLn",
|
||||||
},
|
},
|
||||||
|
|
|
@ -4,8 +4,20 @@ if not ok then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
web_devicons.setup {
|
web_devicons.setup({
|
||||||
override = {
|
override = {
|
||||||
|
default_icon = {
|
||||||
|
icon = " ",
|
||||||
|
name = "Default",
|
||||||
|
},
|
||||||
|
zsh = {
|
||||||
|
icon = " ",
|
||||||
|
name = "Zsh",
|
||||||
|
},
|
||||||
|
c = {
|
||||||
|
icon = " ",
|
||||||
|
name = "c",
|
||||||
|
},
|
||||||
html = {
|
html = {
|
||||||
icon = " ",
|
icon = " ",
|
||||||
name = "html",
|
name = "html",
|
||||||
|
@ -27,13 +39,9 @@ web_devicons.setup {
|
||||||
name = "js",
|
name = "js",
|
||||||
},
|
},
|
||||||
ts = {
|
ts = {
|
||||||
icon = "ﯤ",
|
icon = " ",
|
||||||
name = "ts",
|
name = "ts",
|
||||||
},
|
},
|
||||||
kt = {
|
|
||||||
icon = "",
|
|
||||||
name = "kt",
|
|
||||||
},
|
|
||||||
png = {
|
png = {
|
||||||
icon = " ",
|
icon = " ",
|
||||||
name = "png",
|
name = "png",
|
||||||
|
@ -242,6 +250,14 @@ web_devicons.setup {
|
||||||
icon = "ﰚ ",
|
icon = "ﰚ ",
|
||||||
name = "commitlinrcjson",
|
name = "commitlinrcjson",
|
||||||
},
|
},
|
||||||
|
woff = {
|
||||||
|
icon = " ",
|
||||||
|
name = "WebOpenFontFormat",
|
||||||
|
},
|
||||||
|
woff2 = {
|
||||||
|
icon = " ",
|
||||||
|
name = "WebOpenFontFormat2",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
default = true,
|
default = true,
|
||||||
}
|
})
|
||||||
|
|
|
@ -44,15 +44,12 @@ end
|
||||||
|
|
||||||
lsconf.sumneko_lua.setup({
|
lsconf.sumneko_lua.setup({
|
||||||
cmd = { sumneko_binary, "-E", sumneko_root_path .. "/main.lua" },
|
cmd = { sumneko_binary, "-E", sumneko_root_path .. "/main.lua" },
|
||||||
flags = flags,
|
|
||||||
capabilities = capabilities,
|
|
||||||
on_attach = on_attach,
|
|
||||||
handlers = handlers,
|
|
||||||
settings = {
|
settings = {
|
||||||
Lua = {
|
Lua = {
|
||||||
completion = {
|
completion = {
|
||||||
enable = true,
|
enable = true,
|
||||||
showWord = "Disable",
|
keywordSnippet = "Replace",
|
||||||
|
callSnippet = "Replace",
|
||||||
},
|
},
|
||||||
runtime = {
|
runtime = {
|
||||||
version = "LuaJIT",
|
version = "LuaJIT",
|
||||||
|
@ -62,7 +59,13 @@ lsconf.sumneko_lua.setup({
|
||||||
globals = { "vim" },
|
globals = { "vim" },
|
||||||
},
|
},
|
||||||
workspace = {
|
workspace = {
|
||||||
library = vim.api.nvim_get_runtime_file("", true),
|
library = {
|
||||||
|
[vim.fn.expand("$VIMRUNTIME/lua")] = true,
|
||||||
|
[vim.fn.expand("$VIMRUNTIME/lua/vim/lsp")] = true,
|
||||||
|
[vim.fn.stdpath("config") .. "/lua"] = true,
|
||||||
|
},
|
||||||
|
maxPreload = 100000,
|
||||||
|
preloadFileSize = 10000,
|
||||||
},
|
},
|
||||||
telemetry = {
|
telemetry = {
|
||||||
enable = false,
|
enable = false,
|
||||||
|
@ -72,10 +75,6 @@ lsconf.sumneko_lua.setup({
|
||||||
})
|
})
|
||||||
|
|
||||||
require("lspconfig/configs").ls_emmet = {
|
require("lspconfig/configs").ls_emmet = {
|
||||||
flags = flags,
|
|
||||||
capabilities = capabilities,
|
|
||||||
on_attach = on_attach,
|
|
||||||
handlers = handlers,
|
|
||||||
default_config = {
|
default_config = {
|
||||||
cmd = { "ls_emmet", "--stdio" },
|
cmd = { "ls_emmet", "--stdio" },
|
||||||
filetypes = {
|
filetypes = {
|
||||||
|
@ -97,7 +96,7 @@ require("lspconfig/configs").ls_emmet = {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
local servers = { "html", "cssls", "tailwindcss", "vimls", "jsonls" }
|
local servers = { "sumneko_lua", "ls_emmet", "html", "cssls", "tailwindcss", "vimls", "jsonls" }
|
||||||
for _, lsp in ipairs(servers) do
|
for _, lsp in ipairs(servers) do
|
||||||
lsconf[lsp].setup({
|
lsconf[lsp].setup({
|
||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
local cmp_kinds = {
|
local cmp_kinds = {
|
||||||
Text = " ",
|
Text = " ",
|
||||||
Method = " ",
|
Method = " ",
|
||||||
Function = " ",
|
Function = " ",
|
||||||
Constructor = " ",
|
Constructor = " ",
|
||||||
|
@ -30,18 +30,16 @@ local has_words_before = function()
|
||||||
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
|
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
|
return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil
|
||||||
end
|
end
|
||||||
local luasnip = require("luasnip")
|
|
||||||
local cmp = require("cmp")
|
local cmp = require("cmp")
|
||||||
cmp.setup({
|
cmp.setup({
|
||||||
enabled = function()
|
enabled = function()
|
||||||
-- disable completion in comments
|
-- disable completion in comments
|
||||||
local context = require 'cmp.config.context'
|
local context = require("cmp.config.context")
|
||||||
-- keep command mode completion enabled when cursor is in a comment
|
-- keep command mode completion enabled when cursor is in a comment
|
||||||
if vim.api.nvim_get_mode().mode == 'c' then
|
if vim.api.nvim_get_mode().mode == "c" then
|
||||||
return true
|
return true
|
||||||
else
|
else
|
||||||
return not context.in_treesitter_capture("comment")
|
return not context.in_treesitter_capture("comment") and not context.in_syntax_group("Comment")
|
||||||
and not context.in_syntax_group("Comment")
|
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
snippet = {
|
snippet = {
|
||||||
|
@ -72,7 +70,7 @@ cmp.setup({
|
||||||
["<Tab>"] = cmp.mapping(function(fallback)
|
["<Tab>"] = cmp.mapping(function(fallback)
|
||||||
if cmp.visible() then
|
if cmp.visible() then
|
||||||
cmp.select_next_item()
|
cmp.select_next_item()
|
||||||
elseif luasnip.expand_or_locally_jumpable() then
|
elseif require("luasnip").expand_or_locally_jumpable() then
|
||||||
vim.fn.feedkeys(vim.api.nvim_replace_termcodes("<Plug>luasnip-expand-or-jump", true, true, true), "")
|
vim.fn.feedkeys(vim.api.nvim_replace_termcodes("<Plug>luasnip-expand-or-jump", true, true, true), "")
|
||||||
elseif has_words_before() then
|
elseif has_words_before() then
|
||||||
cmp.complete()
|
cmp.complete()
|
||||||
|
@ -83,7 +81,7 @@ cmp.setup({
|
||||||
["<S-Tab>"] = cmp.mapping(function(fallback)
|
["<S-Tab>"] = cmp.mapping(function(fallback)
|
||||||
if cmp.visible() then
|
if cmp.visible() then
|
||||||
cmp.select_prev_item()
|
cmp.select_prev_item()
|
||||||
elseif luasnip.jumpable(-1) then
|
elseif require("luasnip").jumpable(-1) then
|
||||||
vim.fn.feedkeys(vim.api.nvim_replace_termcodes("<Plug>luasnip-jump-prev", true, true, true), "")
|
vim.fn.feedkeys(vim.api.nvim_replace_termcodes("<Plug>luasnip-jump-prev", true, true, true), "")
|
||||||
else
|
else
|
||||||
fallback()
|
fallback()
|
||||||
|
@ -91,10 +89,11 @@ cmp.setup({
|
||||||
end, { "i", "s" }),
|
end, { "i", "s" }),
|
||||||
},
|
},
|
||||||
sources = cmp.config.sources({
|
sources = cmp.config.sources({
|
||||||
{ name = "luasnip", max_item_count = 5 },
|
{ name = "nvim_lsp", max_item_count = 20, priority_weight = 100 },
|
||||||
{ name = "nvim_lsp", max_item_count = 5 },
|
{ name = "luasnip", priority_weight = 120 },
|
||||||
{ name = "path", max_item_count = 10 },
|
{ name = "buffer", max_item_count = 5, priority_weight = 80 },
|
||||||
{ name = "buffer", max_item_count = 10 },
|
{ name = "path", max_item_count = 10, priority_weight = 100 },
|
||||||
{ name = "nvim_lsp_signature_help" },
|
{ name = "nvim_lsp_signature_help" },
|
||||||
}),
|
}),
|
||||||
|
view = { entries = "native" },
|
||||||
})
|
})
|
||||||
|
|
|
@ -3,7 +3,7 @@ local previewers = require("telescope.previewers")
|
||||||
local builtin = require("telescope.builtin")
|
local builtin = require("telescope.builtin")
|
||||||
|
|
||||||
require("telescope").setup({
|
require("telescope").setup({
|
||||||
defaults = require("telescope.themes").get_ivy({
|
defaults = {
|
||||||
dynamic_preview_title = true,
|
dynamic_preview_title = true,
|
||||||
vimgrep_arguments = {
|
vimgrep_arguments = {
|
||||||
"rg",
|
"rg",
|
||||||
|
@ -19,28 +19,11 @@ require("telescope").setup({
|
||||||
filesize_limit = 5,
|
filesize_limit = 5,
|
||||||
timeout = 150,
|
timeout = 150,
|
||||||
treesitter = true,
|
treesitter = true,
|
||||||
title = false,
|
|
||||||
},
|
},
|
||||||
borderchars = { " ", " ", " ", " ", " ", " ", " ", " " },
|
borderchars = { " ", " ", " ", " ", " ", " ", " ", " " },
|
||||||
sorting_strategy = "ascending",
|
|
||||||
layout_config = {
|
layout_config = {
|
||||||
prompt_position = "top",
|
prompt_position = "top",
|
||||||
},
|
},
|
||||||
pickers = {
|
|
||||||
buffers = {
|
|
||||||
mappings = {
|
|
||||||
n = {
|
|
||||||
["d"] = actions.delete_buffer,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
sort_mru = true,
|
|
||||||
sort_lastused = true,
|
|
||||||
},
|
|
||||||
find_files = {
|
|
||||||
find_command = { "fd", "--type", "f", "-c always", "-H", "--strip-cwd-prefix" },
|
|
||||||
hidden = true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
prompt_prefix = " ",
|
prompt_prefix = " ",
|
||||||
selection_caret = " → ",
|
selection_caret = " → ",
|
||||||
entry_prefix = " ",
|
entry_prefix = " ",
|
||||||
|
@ -53,16 +36,58 @@ require("telescope").setup({
|
||||||
["<CR>"] = actions.select_default + actions.center,
|
["<CR>"] = actions.select_default + actions.center,
|
||||||
["<esc>"] = actions.close,
|
["<esc>"] = actions.close,
|
||||||
["<TAB>"] = actions.toggle_selection + actions.move_selection_next,
|
["<TAB>"] = actions.toggle_selection + actions.move_selection_next,
|
||||||
["<A-p>"] = require("telescope.actions.layout").toggle_preview,
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
pickers = {
|
||||||
|
buffers = {
|
||||||
|
theme = "dropdown",
|
||||||
|
results_height = 20,
|
||||||
|
initial_mode = "normal",
|
||||||
|
borderchars = { " ", " ", " ", " ", " ", " ", " ", " " },
|
||||||
|
previewer = false,
|
||||||
|
disable_devicons = true,
|
||||||
|
mappings = {
|
||||||
|
n = {
|
||||||
|
["d"] = actions.delete_buffer,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
sort_mru = true,
|
||||||
|
sort_lastused = true,
|
||||||
|
ignore_current_buffer = true,
|
||||||
|
},
|
||||||
|
find_files = {
|
||||||
|
find_command = { "fd", "--type", "f", "-c always", "-H", "--strip-cwd-prefix" },
|
||||||
|
hidden = true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
extensions = {
|
extensions = {
|
||||||
file_browser = {
|
file_browser = {
|
||||||
hidden = true,
|
hidden = true,
|
||||||
|
hijack_netrw = true,
|
||||||
theme = "ivy",
|
theme = "ivy",
|
||||||
|
borderchars = { " ", " ", " ", " ", " ", " ", " ", " " },
|
||||||
|
grouped = true,
|
||||||
|
initial_mode = "normal",
|
||||||
|
sorting_strategy = "ascending",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}),
|
})
|
||||||
|
|
||||||
|
local delta_bcommits = previewers.new_termopen_previewer({
|
||||||
|
get_command = function(entry)
|
||||||
|
return {
|
||||||
|
"git",
|
||||||
|
"-c",
|
||||||
|
"core.pager=delta",
|
||||||
|
"-c",
|
||||||
|
"delta.side-by-side=false",
|
||||||
|
"diff",
|
||||||
|
entry.value .. "^!",
|
||||||
|
"--",
|
||||||
|
entry.current_file,
|
||||||
|
}
|
||||||
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
local delta = previewers.new_termopen_previewer({
|
local delta = previewers.new_termopen_previewer({
|
||||||
|
@ -84,7 +109,7 @@ end
|
||||||
Delta_git_bcommits = function(opts)
|
Delta_git_bcommits = function(opts)
|
||||||
opts = opts or {}
|
opts = opts or {}
|
||||||
opts.previewer = {
|
opts.previewer = {
|
||||||
delta,
|
delta_bcommits,
|
||||||
previewers.git_commit_message.new(opts),
|
previewers.git_commit_message.new(opts),
|
||||||
previewers.git_commit_diff_as_was.new(opts),
|
previewers.git_commit_diff_as_was.new(opts),
|
||||||
}
|
}
|
||||||
|
@ -93,9 +118,9 @@ end
|
||||||
|
|
||||||
Project_files = function()
|
Project_files = function()
|
||||||
local opts = { show_untracked = false } -- define here if you want to define something
|
local opts = { show_untracked = false } -- define here if you want to define something
|
||||||
local ok = pcall(require("telescope.builtin").git_files, opts)
|
local ok = pcall(builtin.git_files, opts)
|
||||||
if not ok then
|
if not ok then
|
||||||
require("telescope.builtin").find_files(opts)
|
builtin.find_files(opts)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -105,13 +130,13 @@ vim.api.nvim_set_keymap("n", "<F2>", "<cmd>lua Project_files()<CR>", default_opt
|
||||||
vim.api.nvim_set_keymap(
|
vim.api.nvim_set_keymap(
|
||||||
"n",
|
"n",
|
||||||
"<F3>",
|
"<F3>",
|
||||||
":lua require'telescope'.extensions.file_browser.file_browser({path = vim.fn.expand('%:p:h')})<CR>",
|
"<cmd>lua require'telescope'.extensions.file_browser.file_browser({path = vim.fn.expand('%:p:h')})<CR>",
|
||||||
default_opts
|
default_opts
|
||||||
)
|
)
|
||||||
vim.api.nvim_set_keymap("n", "<F4>", "<cmd>Telescope buffers<CR>", default_opts)
|
vim.api.nvim_set_keymap("n", "<F4>", "<cmd>Telescope buffers<CR>", default_opts)
|
||||||
|
vim.api.nvim_set_keymap("n", "<F5>", "<cmd>lua Delta_git_commits()<CR>", default_opts)
|
||||||
|
vim.api.nvim_set_keymap("n", "<F6>", "<cmd>lua Delta_git_bcommits()<CR>", default_opts)
|
||||||
vim.api.nvim_set_keymap("n", "<M-f>", "<cmd>Telescope live_grep<CR>", default_opts)
|
vim.api.nvim_set_keymap("n", "<M-f>", "<cmd>Telescope live_grep<CR>", default_opts)
|
||||||
vim.api.nvim_set_keymap("n", "<M-g>", "<cmd>Telescope git_commits<CR>", default_opts)
|
|
||||||
vim.api.nvim_set_keymap("n", "<M-S-r>", "<cmd>Telescope resume<CR>", default_opts)
|
vim.api.nvim_set_keymap("n", "<M-S-r>", "<cmd>Telescope resume<CR>", default_opts)
|
||||||
|
|
||||||
require("telescope").load_extension("fzf")
|
require("telescope").load_extension("fzf")
|
||||||
require("telescope").load_extension("file_browser")
|
require("telescope").load_extension("file_browser")
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
colorscheme gruvbox
|
colorscheme gruvbox
|
||||||
hi! Normal ctermbg=NONE guibg=NONE
|
hi! Normal ctermbg=NONE guibg=NONE
|
||||||
hi! NonText ctermbg=NONE guibg=NONE guifg=NONE ctermfg=NONE
|
hi! NonText ctermbg=NONE guibg=NONE guifg=NONE ctermfg=NONE
|
||||||
hi! SignColumn ctermbg=NONE guibg=NONE guifg=NONE ctermfg=NONE
|
" hi! SignColumn ctermbg=NONE guibg=NONE guifg=NONE ctermfg=NONE
|
||||||
hi! LspDiagnosticsLineNrError guibg=#51202A guifg=#FF0000 gui=bold
|
hi! LspDiagnosticsLineNrError guibg=#51202A guifg=#FF0000 gui=bold
|
||||||
hi! LspDiagnosticsLineNrWarning guibg=#51412A guifg=#FFA500 gui=bold
|
hi! LspDiagnosticsLineNrWarning guibg=#51412A guifg=#FFA500 gui=bold
|
||||||
hi! LspDiagnosticsLineNrInformation guibg=#1E535D guifg=#00FFFF gui=bold
|
hi! LspDiagnosticsLineNrInformation guibg=#1E535D guifg=#00FFFF gui=bold
|
||||||
hi! LspDiagnosticsLineNrHint guibg=#1E205D guifg=#008bbd gui=bold
|
hi! LspDiagnosticsLineNrHint guibg=#1E205D guifg=#008bbd gui=bold
|
||||||
hi! TelescopeNormal guibg=#000000
|
hi! TelescopeNormal guibg=#000000
|
||||||
highlight default link TelescopePromptPrefix TelescopeNormal
|
hi! default link TelescopePromptPrefix TelescopeNormal
|
||||||
highlight default link TelescopePromptCounter TelescopeNormal
|
hi! default link TelescopePromptCounter TelescopeNormal
|
||||||
|
|
||||||
" gray
|
" gray
|
||||||
highlight! CmpItemAbbrDeprecated guibg=NONE gui=strikethrough guifg=#808080
|
highlight! CmpItemAbbrDeprecated guibg=NONE gui=strikethrough guifg=#808080
|
||||||
|
|
|
@ -13,6 +13,10 @@ local disabled_builtin_plugins = {
|
||||||
"logipat",
|
"logipat",
|
||||||
"rrhelper",
|
"rrhelper",
|
||||||
"matchit",
|
"matchit",
|
||||||
|
"netrw",
|
||||||
|
"netrwPlugin",
|
||||||
|
"netrwSettings",
|
||||||
|
"netrwFileHandlers",
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, plugin in pairs(disabled_builtin_plugins) do
|
for _, plugin in pairs(disabled_builtin_plugins) do
|
||||||
|
|
|
@ -55,8 +55,8 @@ nnoremap N nzzzv
|
||||||
nnoremap J mzJ`z
|
nnoremap J mzJ`z
|
||||||
|
|
||||||
" Shift lines up and down
|
" Shift lines up and down
|
||||||
nnoremap <silent> <leader>j :m .+1<cr>==
|
nnoremap <silent> <C-j> :m .+1<cr>==
|
||||||
nnoremap <silent> <leader>k :m .-2<cr>==
|
nnoremap <silent> <C-k> :m .-2<cr>==
|
||||||
|
|
||||||
" j = gj :: k = gk while preserving numbered jumps ie. 12j or 30k
|
" j = gj :: k = gk while preserving numbered jumps ie. 12j or 30k
|
||||||
nnoremap <buffer><silent><expr>j v:count ? (v:count > 5 ? "m'" . v:count : '') . 'j' : 'gj'
|
nnoremap <buffer><silent><expr>j v:count ? (v:count > 5 ? "m'" . v:count : '') . 'j' : 'gj'
|
||||||
|
|
|
@ -38,11 +38,12 @@ set wildignore+=**/coverage/*
|
||||||
set wildignore+=**/node_modules/*
|
set wildignore+=**/node_modules/*
|
||||||
set wildignore+=**/.git/*
|
set wildignore+=**/.git/*
|
||||||
|
|
||||||
let g:netrw_browse_split = 0
|
" Superceded by telescope file browser plugin
|
||||||
let g:netrw_banner = 0
|
" let g:netrw_browse_split = 0
|
||||||
let g:netrw_keepdir = 0
|
" let g:netrw_banner = 0
|
||||||
let g:netrw_winsize = 25
|
" let g:netrw_keepdir = 0
|
||||||
let g:netrw_liststyle = 3
|
" let g:netrw_winsize = 25
|
||||||
let g:netrw_localrmdir='rm -r'
|
" let g:netrw_liststyle = 3
|
||||||
let g:netrw_localcopydircmd = 'cp -r'
|
" let g:netrw_localrmdir='rm -r'
|
||||||
nnoremap <silent><F5> :Vex!<cr>
|
" let g:netrw_localcopydircmd = 'cp -r'
|
||||||
|
" nnoremap <silent><F5> :Vex!<cr>
|
||||||
|
|
|
@ -6,6 +6,7 @@ alias \
|
||||||
z='zathura' \
|
z='zathura' \
|
||||||
g='git' \
|
g='git' \
|
||||||
vv='nvi' \
|
vv='nvi' \
|
||||||
|
bc='bc -iq' \
|
||||||
se='doas nvim' \
|
se='doas nvim' \
|
||||||
am='alsamixer' \
|
am='alsamixer' \
|
||||||
pm='pulsemixer' \
|
pm='pulsemixer' \
|
||||||
|
|
Loading…
Reference in New Issue