nvim 0.6
This commit is contained in:
parent
1ebe08948f
commit
9619c277c3
|
@ -9,7 +9,7 @@
|
||||||
show_age_threshold = -1
|
show_age_threshold = -1
|
||||||
word_wrap = no
|
word_wrap = no
|
||||||
ignore_newline = yes
|
ignore_newline = yes
|
||||||
width = 0
|
width = (0, 1920)
|
||||||
origin = top-left
|
origin = top-left
|
||||||
offset = 0x0
|
offset = 0x0
|
||||||
notification_limit = 1
|
notification_limit = 1
|
||||||
|
|
21
fzf-marks
21
fzf-marks
|
@ -1,21 +0,0 @@
|
||||||
|
|
||||||
marks : /home/corpse/.config/fzf-marks
|
|
||||||
git : /home/corpse/.config/git/config
|
|
||||||
lfview : /home/corpse/.local/bin/lfview
|
|
||||||
xresources : /home/corpse/.config/X11/xresources
|
|
||||||
correo : /home/corpse/.config/neomutt
|
|
||||||
xinit : /home/corpse/.config/X11/xinitrc
|
|
||||||
terminal : /home/corpse/.config/alacritty.yml
|
|
||||||
mpv : /home/corpse/.config/mpv/mpv.conf
|
|
||||||
lf : /home/corpse/.config/lf/lfrc
|
|
||||||
polybar : /home/corpse/.config/polybar/config
|
|
||||||
keys : /home/corpse/.config/sxhkd/sxhkdrc
|
|
||||||
bspwm : /home/corpse/.config/bspwm/bspwmrc
|
|
||||||
zsh : /home/corpse/.config/zsh
|
|
||||||
alias : /home/corpse/.config/zsh/conf/03_aliases.zsh
|
|
||||||
dunst : /home/corpse/.config/dunst/dunstrc
|
|
||||||
gtk2 : /home/corpse/.config/gtk-2.0/gtkrc-2.0
|
|
||||||
gtk3 : /home/corpse/.config/gtk-3.0/settings.ini
|
|
||||||
tmux : /home/corpse/.config/tmux/tmux.conf
|
|
||||||
zshenv : /home/corpse/.zshenv
|
|
||||||
nvim : /home/corpse/.config/nvim
|
|
|
@ -59,6 +59,6 @@ macro index A "<limit>all\n" "show all messages (undo limit)"
|
||||||
|
|
||||||
macro browser h '<change-dir><kill-line>..<enter>' "Go to parent folder"
|
macro browser h '<change-dir><kill-line>..<enter>' "Go to parent folder"
|
||||||
|
|
||||||
macro index,pager <f1> '<sync-mailbox><enter-command>source ~/.config/neomutt/accounts/dgy@fuckup.club.muttrc<enter><change-folder>!<enter>;<check-stats>' "switch to dgy@fuckup.club" # mw-autogenerated
|
macro index,pager <f1> '<sync-mailbox><enter-command>source ~/.config/neomutt/accounts/dgy@fuckup.club.muttrc<enter><change-folder>!<enter>;<check-stats>' "switch to dgy@fuckup"
|
||||||
macro index,pager <f2> '<sync-mailbox><enter-command>source ~/.config/neomutt/accounts/dgy@texto-plano.xyz.muttrc<enter><change-folder>!<enter>;<check-stats>' "switch to adeadgit@gmail.com"
|
macro index,pager <f2> '<sync-mailbox><enter-command>source ~/.config/neomutt/accounts/dgy@texto-plano.xyz.muttrc<enter><change-folder>!<enter>;<check-stats>' "switch to dgy@t-p"
|
||||||
macro index,pager <f3> '<sync-mailbox><enter-command>source ~/.config/neomutt/accounts/alejo.muttrc<enter><change-folder>!<enter>;<check-stats>' "switch to alejo.jardon@gmail.com"
|
macro index,pager <f3> '<sync-mailbox><enter-command>source ~/.config/neomutt/accounts/alejo.muttrc<enter><change-folder>!<enter>;<check-stats>' "switch to namefag"
|
||||||
|
|
|
@ -1,7 +1,12 @@
|
||||||
|
vim.g.did_load_filetypes = 1
|
||||||
vim.g.mapleader = " "
|
vim.g.mapleader = " "
|
||||||
vim.g.maplocalleader = ","
|
vim.g.maplocalleader = ","
|
||||||
vim.o.termguicolors = true
|
vim.o.termguicolors = true
|
||||||
vim.g.did_load_filetypes = 1
|
|
||||||
|
local install_path = vim.fn.stdpath("data") .. "/site/pack/packer/opt/packer.nvim"
|
||||||
|
if vim.fn.empty(vim.fn.glob(install_path)) > 0 then
|
||||||
|
vim.fn.execute("!git clone https://github.com/wbthomason/packer.nvim " .. install_path)
|
||||||
|
end
|
||||||
vim.api.nvim_command([[packadd packer.nvim]])
|
vim.api.nvim_command([[packadd packer.nvim]])
|
||||||
|
|
||||||
require("packer").startup({
|
require("packer").startup({
|
||||||
|
|
|
@ -57,7 +57,7 @@ end
|
||||||
time([[Luarocks path setup]], false)
|
time([[Luarocks path setup]], false)
|
||||||
time([[try_loadstring definition]], true)
|
time([[try_loadstring definition]], true)
|
||||||
local function try_loadstring(s, component, name)
|
local function try_loadstring(s, component, name)
|
||||||
local success, result = pcall(loadstring(s))
|
local success, result = pcall(loadstring(s), name, _G.packer_plugins[name])
|
||||||
if not success then
|
if not success then
|
||||||
vim.schedule(function()
|
vim.schedule(function()
|
||||||
vim.api.nvim_notify('packer.nvim: Error running ' .. component .. ' for ' .. name .. ': ' .. result, vim.log.levels.ERROR, {})
|
vim.api.nvim_notify('packer.nvim: Error running ' .. component .. ' for ' .. name .. ': ' .. result, vim.log.levels.ERROR, {})
|
||||||
|
@ -235,6 +235,7 @@ _G.packer_plugins = {
|
||||||
},
|
},
|
||||||
["nvim-web-devicons"] = {
|
["nvim-web-devicons"] = {
|
||||||
config = { "\27LJ\2\0028\0\0\2\0\2\0\0046\0\0\0'\1\1\0B\0\2\1K\0\1\0\29plugins.webdevicons_nvim\frequire\0" },
|
config = { "\27LJ\2\0028\0\0\2\0\2\0\0046\0\0\0'\1\1\0B\0\2\1K\0\1\0\29plugins.webdevicons_nvim\frequire\0" },
|
||||||
|
load_after = {},
|
||||||
loaded = false,
|
loaded = false,
|
||||||
needs_bufread = false,
|
needs_bufread = false,
|
||||||
path = "/home/corpse/.local/share/nvim/site/pack/packer/opt/nvim-web-devicons",
|
path = "/home/corpse/.local/share/nvim/site/pack/packer/opt/nvim-web-devicons",
|
||||||
|
@ -274,6 +275,10 @@ time([[Defining packer_plugins]], false)
|
||||||
time([[Config for impatient.nvim]], true)
|
time([[Config for impatient.nvim]], true)
|
||||||
try_loadstring("\27LJ\2\2)\0\0\2\0\2\0\0046\0\0\0'\1\1\0B\0\2\1K\0\1\0\14impatient\frequire\0", "config", "impatient.nvim")
|
try_loadstring("\27LJ\2\2)\0\0\2\0\2\0\0046\0\0\0'\1\1\0B\0\2\1K\0\1\0\14impatient\frequire\0", "config", "impatient.nvim")
|
||||||
time([[Config for impatient.nvim]], false)
|
time([[Config for impatient.nvim]], false)
|
||||||
|
-- Load plugins in order defined by `after`
|
||||||
|
time([[Sequenced loading]], true)
|
||||||
|
vim.cmd [[ packadd gruvbox.nvim ]]
|
||||||
|
time([[Sequenced loading]], false)
|
||||||
|
|
||||||
-- Command lazy-loads
|
-- Command lazy-loads
|
||||||
time([[Defining lazy-load commands]], true)
|
time([[Defining lazy-load commands]], true)
|
||||||
|
|
|
@ -13,17 +13,13 @@ local sumneko_root_path = "/mnt/wd1tb/catacombs/code/lua-language-server"
|
||||||
local sumneko_binary = sumneko_root_path .. "/bin/Linux/lua-language-server"
|
local sumneko_binary = sumneko_root_path .. "/bin/Linux/lua-language-server"
|
||||||
|
|
||||||
local handlers = {
|
local handlers = {
|
||||||
["textDocument/publishDiagnostics"] = vim.lsp.with(vim.lsp.diagnostic.on_publish_diagnostics, {
|
|
||||||
update_in_insert = true,
|
|
||||||
severity_sort = true,
|
|
||||||
virtual_text = false,
|
|
||||||
}),
|
|
||||||
["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, { border = "single" }),
|
["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, { border = "single" }),
|
||||||
["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, { border = "single" }),
|
["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, { border = "single" }),
|
||||||
["textDocument/definition"] = lsp_utils.goto_split("split"),
|
["textDocument/definition"] = lsp_utils.goto_split("split"),
|
||||||
}
|
}
|
||||||
|
|
||||||
local on_attach = function(client, bufnr)
|
local on_attach = function(client, bufnr)
|
||||||
|
vim.opt.signcolumn = "yes"
|
||||||
lsp_utils.disable_formatting(client)
|
lsp_utils.disable_formatting(client)
|
||||||
lsp_utils.mappings(bufnr)
|
lsp_utils.mappings(bufnr)
|
||||||
require("lsp_signature").on_attach({
|
require("lsp_signature").on_attach({
|
||||||
|
@ -33,6 +29,17 @@ local on_attach = function(client, bufnr)
|
||||||
padding = " ",
|
padding = " ",
|
||||||
handler_opts = { border = "shadow" },
|
handler_opts = { border = "shadow" },
|
||||||
})
|
})
|
||||||
|
if client.resolved_capabilities.document_highlight then
|
||||||
|
vim.cmd([[
|
||||||
|
hi link LspReferenceRead Visual
|
||||||
|
hi link LspReferenceText Visual
|
||||||
|
hi link LspReferenceWrite Visual
|
||||||
|
augroup lsp_document_highlight
|
||||||
|
autocmd CursorHold <buffer> lua vim.lsp.buf.document_highlight()
|
||||||
|
autocmd CursorMoved <buffer> lua vim.lsp.buf.clear_references()
|
||||||
|
augroup END
|
||||||
|
]])
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
lsconf.sumneko_lua.setup({
|
lsconf.sumneko_lua.setup({
|
||||||
|
|
|
@ -1,14 +1,26 @@
|
||||||
vim.cmd([[
|
vim.fn.sign_define(
|
||||||
highlight LspDiagnosticsLineNrError guibg=#51202A guifg=#FF0000 gui=bold
|
"DiagnosticSignError",
|
||||||
highlight LspDiagnosticsLineNrWarning guibg=#51412A guifg=#FFA500 gui=bold
|
{ text = " ", texthl = "DiagnosticSignError", numhl = "LspDiagnosticsLineNrError" }
|
||||||
highlight LspDiagnosticsLineNrInformation guibg=#1E535D guifg=#00FFFF gui=bold
|
)
|
||||||
highlight LspDiagnosticsLineNrHint guibg=#1E205D guifg=#008bbd gui=bold
|
vim.fn.sign_define(
|
||||||
|
"DiagnosticSignWarn",
|
||||||
|
{ text = " ", texthl = "DiagnosticSignWarn", numhl = "LspDiagnosticsLineNrWarning" }
|
||||||
|
)
|
||||||
|
vim.fn.sign_define(
|
||||||
|
"DiagnosticSignInformation",
|
||||||
|
{ text = " ", texthl = "DiagnosticSignInfo", numhl = "LspDiagnosticsLineNrInformation" }
|
||||||
|
)
|
||||||
|
vim.fn.sign_define(
|
||||||
|
"DiagnosticSignHint",
|
||||||
|
{ text = " ", texthl = "DiagnosticSignHint", numhl = "LspDiagnosticsLineNrHint" }
|
||||||
|
)
|
||||||
|
|
||||||
sign define LspDiagnosticsSignError text= texthl=LspDiagnosticsSignError linehl= numhl=LspDiagnosticsLineNrError
|
vim.diagnostic.config({
|
||||||
sign define LspDiagnosticsSignWarning text= texthl=LspDiagnosticsSignWarning linehl= numhl=LspDiagnosticsLineNrWarning
|
virtual_text = false,
|
||||||
sign define LspDiagnosticsSignInformation text= texthl=LspDiagnosticsSignInformation linehl= numhl=LspDiagnosticsLineNrInformation
|
update_in_insert = true,
|
||||||
sign define LspDiagnosticsSignHint text= texthl=LspDiagnosticsSignHint linehl= numhl=LspDiagnosticsLineNrHint
|
severity_sort = true,
|
||||||
]])
|
source = "always",
|
||||||
|
})
|
||||||
|
|
||||||
local U = {}
|
local U = {}
|
||||||
|
|
||||||
|
@ -40,8 +52,8 @@ function U.mappings(bufnr)
|
||||||
vim.api.nvim_buf_set_keymap(bufnr, "i", "<C-h>", "<cmd>lua vim.lsp.buf.signature_help()<CR>", opts)
|
vim.api.nvim_buf_set_keymap(bufnr, "i", "<C-h>", "<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", "<leader>rn", "<cmd>lua vim.lsp.buf.rename()<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>ca", "<cmd>lua vim.lsp.buf.code_action()<CR>", opts)
|
||||||
vim.api.nvim_buf_set_keymap(bufnr, "n", "{g", "<cmd>lua vim.lsp.diagnostic.goto_prev()<CR>", opts)
|
vim.api.nvim_buf_set_keymap(bufnr, "n", "{g", "<cmd>lua vim.diagnostic.goto_prev()<CR>", opts)
|
||||||
vim.api.nvim_buf_set_keymap(bufnr, "n", "}g", "<cmd>lua vim.lsp.diagnostic.goto_next()<CR>", opts)
|
vim.api.nvim_buf_set_keymap(bufnr, "n", "}g", "<cmd>lua vim.diagnostic.goto_next()<CR>", opts)
|
||||||
end
|
end
|
||||||
|
|
||||||
function U.goto_split(split_cmd)
|
function U.goto_split(split_cmd)
|
||||||
|
@ -71,4 +83,11 @@ function U.goto_split(split_cmd)
|
||||||
return handler
|
return handler
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function U.code_action_listener()
|
||||||
|
local context = { diagnostics = vim.lsp.diagnostic.get_line_diagnostics() }
|
||||||
|
local params = vim.lsp.util.make_range_params()
|
||||||
|
params.context = context
|
||||||
|
vim.lsp.buf_request(0, "textDocument/codeAction", params, function(err, _, result) end)
|
||||||
|
end
|
||||||
|
|
||||||
return U
|
return U
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
local lsp_utils = require("plugins.lsp.lsp-utils")
|
|
||||||
|
|
||||||
local fmt = require("null-ls").builtins.formatting
|
local fmt = require("null-ls").builtins.formatting
|
||||||
local dgn = require("null-ls").builtins.diagnostics
|
local dgn = require("null-ls").builtins.diagnostics
|
||||||
|
local cda = require("null-ls").builtins.code_actions
|
||||||
|
|
||||||
require("null-ls").config({
|
require("null-ls").config({
|
||||||
sources = {
|
sources = {
|
||||||
|
@ -16,22 +15,27 @@ require("null-ls").config({
|
||||||
fmt.eslint_d,
|
fmt.eslint_d,
|
||||||
fmt.rustywind,
|
fmt.rustywind,
|
||||||
fmt.stylua,
|
fmt.stylua,
|
||||||
fmt.gofmt,
|
fmt.goimports,
|
||||||
|
fmt.gofumpt,
|
||||||
fmt.shfmt,
|
fmt.shfmt,
|
||||||
-- # DIAGNOSTICS #
|
-- # DIAGNOSTICS #
|
||||||
dgn.eslint_d,
|
dgn.eslint_d,
|
||||||
dgn.shellcheck,
|
dgn.shellcheck,
|
||||||
|
dgn.golangci_lint,
|
||||||
dgn.luacheck.with({
|
dgn.luacheck.with({
|
||||||
extra_args = { "--globals", "vim", "--std", "luajit" },
|
extra_args = { "--globals", "vim", "--std", "luajit" },
|
||||||
}),
|
}),
|
||||||
require("null-ls").builtins.code_actions.gitsigns,
|
-- # CODE ACTIONS #
|
||||||
|
cda.gitsigns,
|
||||||
|
cda.eslint_d,
|
||||||
|
cda.shellcheck,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
-- NOTE: don't move this setup() call elsewhere
|
-- NOTE: don't move this setup() call elsewhere
|
||||||
require("lspconfig")["null-ls"].setup({
|
require("lspconfig")["null-ls"].setup({
|
||||||
on_attach = function(client, bufnr)
|
on_attach = function(client, bufnr)
|
||||||
lsp_utils.fmt_on_save(client)
|
require("plugins.lsp.lsp-utils").fmt_on_save(client)
|
||||||
lsp_utils.mappings(bufnr)
|
require("plugins.lsp.lsp-utils").mappings(bufnr)
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
|
@ -1,44 +1,38 @@
|
||||||
local cmp = require("cmp")
|
local cmp = require("cmp")
|
||||||
local luasnip = require("luasnip")
|
local luasnip = require("luasnip")
|
||||||
|
|
||||||
|
local cmp_kinds = {
|
||||||
|
Text = " ",
|
||||||
|
Method = " ",
|
||||||
|
Function = " ",
|
||||||
|
Constructor = " ",
|
||||||
|
Field = " ",
|
||||||
|
Variable = " ",
|
||||||
|
Class = "ﴯ ",
|
||||||
|
Interface = " ",
|
||||||
|
Module = " ",
|
||||||
|
Property = "ﰠ ",
|
||||||
|
Unit = " ",
|
||||||
|
Value = " ",
|
||||||
|
Enum = " ",
|
||||||
|
Keyword = " ",
|
||||||
|
Snippet = " ",
|
||||||
|
Color = " ",
|
||||||
|
File = " ",
|
||||||
|
Reference = " ",
|
||||||
|
Folder = " ",
|
||||||
|
EnumMember = " ",
|
||||||
|
Constant = " ",
|
||||||
|
Struct = " ",
|
||||||
|
Event = " ",
|
||||||
|
Operator = " ",
|
||||||
|
TypeParameter = " ",
|
||||||
|
}
|
||||||
|
|
||||||
cmp.setup({
|
cmp.setup({
|
||||||
formatting = {
|
formatting = {
|
||||||
format = function(entry, vim_item)
|
format = function(_, vim_item)
|
||||||
vim_item.menu = ({
|
vim_item.kind = (cmp_kinds[vim_item.kind] or "") .. vim_item.kind
|
||||||
nvim_lsp = "[LSP]",
|
|
||||||
buffer = "[Buffer]",
|
|
||||||
luasnip = "[Snippet]",
|
|
||||||
nvim_lua = "[API]",
|
|
||||||
path = "[Path]",
|
|
||||||
spell = "[Spell]",
|
|
||||||
})[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
|
return vim_item
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
local actions = require("telescope.actions")
|
local actions = require("telescope.actions")
|
||||||
local previewers = require("telescope.previewers")
|
local previewers = require("telescope.previewers")
|
||||||
|
local builtin = require("telescope.builtin")
|
||||||
local Job = require("plenary.job")
|
local Job = require("plenary.job")
|
||||||
|
|
||||||
local new_maker = function(filepath, bufnr, opts)
|
local new_maker = function(filepath, bufnr, opts)
|
||||||
|
@ -24,9 +25,16 @@ end
|
||||||
|
|
||||||
require("telescope").setup({
|
require("telescope").setup({
|
||||||
defaults = {
|
defaults = {
|
||||||
prompt_title = " ",
|
vimgrep_arguments = {
|
||||||
results_title = " ",
|
"rg",
|
||||||
preview_title = " ",
|
"--color=never",
|
||||||
|
"--no-heading",
|
||||||
|
"--with-filename",
|
||||||
|
"--line-number",
|
||||||
|
"--column",
|
||||||
|
"--smart-case",
|
||||||
|
"--trim",
|
||||||
|
},
|
||||||
sorting_strategy = "ascending",
|
sorting_strategy = "ascending",
|
||||||
layout_config = {
|
layout_config = {
|
||||||
width = 0.75,
|
width = 0.75,
|
||||||
|
@ -44,7 +52,7 @@ require("telescope").setup({
|
||||||
preview_title = false,
|
preview_title = false,
|
||||||
},
|
},
|
||||||
find_files = {
|
find_files = {
|
||||||
find_command = { "fd", "-t f", "-c always", "-H" },
|
find_command = { "fd", "-t f", "-c always", "-H", "--strip-cwd-prefix" },
|
||||||
hidden = true,
|
hidden = true,
|
||||||
},
|
},
|
||||||
file_browser = {
|
file_browser = {
|
||||||
|
@ -120,6 +128,10 @@ require("telescope").setup({
|
||||||
["<C-o>"] = actions.select_horizontal,
|
["<C-o>"] = actions.select_horizontal,
|
||||||
["<CR>"] = actions.select_default + actions.center,
|
["<CR>"] = actions.select_default + actions.center,
|
||||||
["<esc>"] = actions.close,
|
["<esc>"] = actions.close,
|
||||||
|
["<C-j>"] = actions.move_selection_next,
|
||||||
|
["<C-k>"] = actions.move_selection_previous,
|
||||||
|
["<TAB>"] = actions.toggle_selection + actions.move_selection_next,
|
||||||
|
["<C-s>"] = actions.send_selected_to_qflist,
|
||||||
},
|
},
|
||||||
n = {
|
n = {
|
||||||
["<C-q>"] = actions.smart_send_to_qflist + actions.open_qflist,
|
["<C-q>"] = actions.smart_send_to_qflist + actions.open_qflist,
|
||||||
|
@ -128,14 +140,45 @@ require("telescope").setup({
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Project_files = function()
|
||||||
|
local opts = {}
|
||||||
|
local ok = pcall(require("telescope.builtin").git_files, opts)
|
||||||
|
if not ok then
|
||||||
|
require("telescope.builtin").find_files(opts)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local delta = previewers.new_termopen_previewer({
|
||||||
|
get_command = function(entry)
|
||||||
|
return { "git", "-c", "core.pager=delta", "-c", "delta.side-by-side=false", "diff", entry.value .. "^!" }
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
Delta_git_commits = function(opts)
|
||||||
|
opts = opts or {}
|
||||||
|
opts.previewer = {
|
||||||
|
delta,
|
||||||
|
previewers.git_commit_message.new(opts),
|
||||||
|
previewers.git_commit_diff_as_was.new(opts),
|
||||||
|
}
|
||||||
|
|
||||||
|
builtin.git_commits(opts)
|
||||||
|
end
|
||||||
|
|
||||||
|
Delta_git_bcommits = function(opts)
|
||||||
|
opts = opts or {}
|
||||||
|
opts.previewer = {
|
||||||
|
delta,
|
||||||
|
previewers.git_commit_message.new(opts),
|
||||||
|
previewers.git_commit_diff_as_was.new(opts),
|
||||||
|
}
|
||||||
|
|
||||||
|
builtin.git_bcommits(opts)
|
||||||
|
end
|
||||||
|
|
||||||
local default_opts = { noremap = true, silent = true }
|
local default_opts = { noremap = true, silent = true }
|
||||||
vim.api.nvim_set_keymap("n", "<F1>", "<cmd>Telescope help_tags<CR>", default_opts)
|
vim.api.nvim_set_keymap("n", "<F1>", "<cmd>Telescope help_tags<CR>", default_opts)
|
||||||
vim.api.nvim_set_keymap(
|
vim.api.nvim_set_keymap("n", "<F2>", '<cmd>lua require("telescope").Project_files()<CR>', default_opts)
|
||||||
"n",
|
|
||||||
"<F2>",
|
|
||||||
'<cmd>lua require("telescope.builtin").find_files({cwd = "%:h", hidden=true})<CR>',
|
|
||||||
default_opts
|
|
||||||
)
|
|
||||||
vim.api.nvim_set_keymap("n", "<F3>", "<cmd>Telescope file_browser hidden=true<CR>", default_opts)
|
vim.api.nvim_set_keymap("n", "<F3>", "<cmd>Telescope file_browser hidden=true<CR>", 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", "<M-f>", "<cmd>Telescope live_grep<CR>", default_opts)
|
vim.api.nvim_set_keymap("n", "<M-f>", "<cmd>Telescope live_grep<CR>", default_opts)
|
||||||
|
|
|
@ -19,7 +19,6 @@ function M.init()
|
||||||
name = "js",
|
name = "js",
|
||||||
},
|
},
|
||||||
ts = {
|
ts = {
|
||||||
icon = "ﯤ",
|
|
||||||
color = "#519ABA",
|
color = "#519ABA",
|
||||||
name = "ts",
|
name = "ts",
|
||||||
},
|
},
|
||||||
|
@ -29,7 +28,6 @@ function M.init()
|
||||||
name = "rs",
|
name = "rs",
|
||||||
},
|
},
|
||||||
kt = {
|
kt = {
|
||||||
icon = "",
|
|
||||||
color = "#ffcb91",
|
color = "#ffcb91",
|
||||||
name = "kt",
|
name = "kt",
|
||||||
},
|
},
|
||||||
|
|
|
@ -14,7 +14,7 @@ if !exists('autocommands_loaded') && has('autocmd')
|
||||||
aug Miscs
|
aug Miscs
|
||||||
au TextYankPost * silent! lua vim.highlight.on_yank{timeout = 80, on_visual=true}
|
au TextYankPost * silent! lua vim.highlight.on_yank{timeout = 80, on_visual=true}
|
||||||
au BufEnter * set fo-=c fo-=r fo-=o
|
au BufEnter * set fo-=c fo-=r fo-=o
|
||||||
au CursorHold,CursorHoldI * lua vim.lsp.diagnostic.show_line_diagnostics({focusable=false, show_header=false})
|
au CursorHold,CursorHoldI * lua vim.diagnostic.open_float(nil, {focusable=false, header=""})
|
||||||
aug END
|
aug END
|
||||||
|
|
||||||
aug OnSave
|
aug OnSave
|
||||||
|
|
|
@ -2,3 +2,7 @@ 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! LspDiagnosticsLineNrWarning guibg=#51412A guifg=#FFA500 gui=bold
|
||||||
|
hi! LspDiagnosticsLineNrInformation guibg=#1E535D guifg=#00FFFF gui=bold
|
||||||
|
hi! LspDiagnosticsLineNrHint guibg=#1E205D guifg=#008bbd gui=bold
|
||||||
|
|
|
@ -1,9 +1,6 @@
|
||||||
set inccommand=nosplit
|
|
||||||
set clipboard^=unnamedplus
|
set clipboard^=unnamedplus
|
||||||
set number
|
set number
|
||||||
set signcolumn="yes"
|
|
||||||
set noswapfile
|
set noswapfile
|
||||||
set hidden
|
|
||||||
set lazyredraw
|
set lazyredraw
|
||||||
set matchpairs+=<:>
|
set matchpairs+=<:>
|
||||||
set updatetime=250
|
set updatetime=250
|
||||||
|
|
|
@ -20,10 +20,10 @@ local statusline_colors = {
|
||||||
active = "%#StatusLine#",
|
active = "%#StatusLine#",
|
||||||
inactive = "%#StatusLineNC#",
|
inactive = "%#StatusLineNC#",
|
||||||
git = "%#diffChanged#",
|
git = "%#diffChanged#",
|
||||||
err = "%#LspDiagnosticsDefaultError#",
|
err = "%#DiagnosticSignError#",
|
||||||
warn = "%#LspDiagnosticsDefaultWarning#",
|
warn = "%#DiagnosticSignWarn#",
|
||||||
nfo = "%#LspDiagnosticsDefaultInformation#",
|
nfo = "%#DiagnosticSignInfo#",
|
||||||
hnt = "%#LspDiagnosticsDefaultHint#",
|
hnt = "%#DiagnosticSignHint#",
|
||||||
line_col = "%#Delimiter#",
|
line_col = "%#Delimiter#",
|
||||||
percentage = "%#Delimiter#",
|
percentage = "%#Delimiter#",
|
||||||
}
|
}
|
||||||
|
@ -79,17 +79,16 @@ local get_diagnostics = function()
|
||||||
end
|
end
|
||||||
|
|
||||||
local status_parts = {}
|
local status_parts = {}
|
||||||
local errors = vim.lsp.diagnostic.get_count(0, [[Error]])
|
if not Is_htruncated(truncation_limit) then
|
||||||
|
local warnings = vim.diagnostic.get(0, { severity = vim.diagnostic.severity.WARN })
|
||||||
|
local hints = vim.diagnostic.get(0, { severity = vim.diagnostic.severity.HINT })
|
||||||
|
local infos = vim.diagnostic.get(0, { severity = vim.diagnostic.severity.INFO })
|
||||||
|
local errors = vim.diagnostic.get(0, { severity = vim.diagnostic.severity.ERROR })
|
||||||
|
|
||||||
if errors > 0 then
|
if errors > 0 then
|
||||||
table.insert(status_parts, statusline_colors.err .. symbol_config.indicator_error .. errors)
|
table.insert(status_parts, statusline_colors.err .. symbol_config.indicator_error .. errors)
|
||||||
end
|
end
|
||||||
|
|
||||||
if not Is_htruncated(truncation_limit) then
|
|
||||||
local warnings = vim.lsp.diagnostic.get_count(0, [[Warning]])
|
|
||||||
local hints = vim.lsp.diagnostic.get_count(0, [[Hint]])
|
|
||||||
local infos = vim.lsp.diagnostic.get_count(0, [[Info]])
|
|
||||||
|
|
||||||
if warnings > 0 then
|
if warnings > 0 then
|
||||||
table.insert(status_parts, statusline_colors.warn .. symbol_config.indicator_warning .. warnings)
|
table.insert(status_parts, statusline_colors.warn .. symbol_config.indicator_warning .. warnings)
|
||||||
end
|
end
|
||||||
|
@ -129,7 +128,7 @@ end
|
||||||
|
|
||||||
-- active statusline
|
-- active statusline
|
||||||
local statusline_normal = function()
|
local statusline_normal = function()
|
||||||
local diagnostics = get_diagnostics()
|
-- local diagnostics = get_diagnostics()
|
||||||
local flags = statusline_colors.active .. get_flags()
|
local flags = statusline_colors.active .. get_flags()
|
||||||
local filename = statusline_colors.active .. get_filename()
|
local filename = statusline_colors.active .. get_filename()
|
||||||
local git = statusline_colors.git .. get_git_status()
|
local git = statusline_colors.git .. get_git_status()
|
||||||
|
@ -137,7 +136,7 @@ local statusline_normal = function()
|
||||||
local percentage = statusline_colors.percentage .. get_percentage()
|
local percentage = statusline_colors.percentage .. get_percentage()
|
||||||
|
|
||||||
return table.concat({
|
return table.concat({
|
||||||
diagnostics,
|
-- diagnostics,
|
||||||
flags,
|
flags,
|
||||||
"%=% ",
|
"%=% ",
|
||||||
filename,
|
filename,
|
||||||
|
|
45
xbpaketes
45
xbpaketes
|
@ -26,7 +26,7 @@ cgo-0.6.1_1
|
||||||
chrony-4.1_1
|
chrony-4.1_1
|
||||||
cmake-3.21.1_1
|
cmake-3.21.1_1
|
||||||
curl-7.80.0_1
|
curl-7.80.0_1
|
||||||
delta-0.9.2_1
|
delta-0.10.2_1
|
||||||
delve-1.7.1_1
|
delve-1.7.1_1
|
||||||
dfc-3.1.1_2
|
dfc-3.1.1_2
|
||||||
dkms-2.8.4_2
|
dkms-2.8.4_2
|
||||||
|
@ -38,15 +38,15 @@ fcitx-configtool-0.4.10_2
|
||||||
fcitx-mozc-2.26.4472.102_2
|
fcitx-mozc-2.26.4472.102_2
|
||||||
fd-8.2.1_1
|
fd-8.2.1_1
|
||||||
feh-3.7.2_1
|
feh-3.7.2_1
|
||||||
ffmpeg-4.4_1
|
ffmpeg-4.4.1_1
|
||||||
figlet-2.2.5_6
|
figlet-2.2.5_6
|
||||||
figlet-fonts-20150508_4
|
figlet-fonts-20150508_4
|
||||||
file-roller-3.40.0_1
|
file-roller-3.40.0_1
|
||||||
firefox-94.0_1
|
firefox-94.0_1
|
||||||
font-misc-misc-1.1.2_7
|
font-misc-misc-1.1.2_7
|
||||||
fzf-0.28.0_2
|
fzf-0.28.0_2
|
||||||
git-2.33.1_1
|
git-2.34.1_1
|
||||||
git-libsecret-2.33.1_1
|
git-libsecret-2.34.1_1
|
||||||
glu-9.0.2_2
|
glu-9.0.2_2
|
||||||
glxinfo-8.4.0_3
|
glxinfo-8.4.0_3
|
||||||
gmic-2.9.9_1
|
gmic-2.9.9_1
|
||||||
|
@ -56,6 +56,7 @@ go-1.17.2_1
|
||||||
golangci-lint-1.42.1_1
|
golangci-lint-1.42.1_1
|
||||||
gopls-0.7.3_1
|
gopls-0.7.3_1
|
||||||
grub-2.06_2
|
grub-2.06_2
|
||||||
|
gucharmap-12.0.1_2
|
||||||
gzdoom-4.7.1_1
|
gzdoom-4.7.1_1
|
||||||
highlight-4.1_2
|
highlight-4.1_2
|
||||||
htop-3.1.1_1
|
htop-3.1.1_1
|
||||||
|
@ -72,20 +73,23 @@ libfcitx-gtk3-4.2.9.8_5
|
||||||
libgcc-32bit-10.2.1pre1_3
|
libgcc-32bit-10.2.1pre1_3
|
||||||
libglvnd-32bit-1.3.3_1
|
libglvnd-32bit-1.3.3_1
|
||||||
libstdc++-32bit-10.2.1pre1_3
|
libstdc++-32bit-10.2.1pre1_3
|
||||||
linux-headers-5.13_1
|
linux-headers-5.15_1
|
||||||
lm_sensors-3.6.0_1
|
lm_sensors-3.6.0_1
|
||||||
lolcat-c-1.2_1
|
lolcat-c-1.2_1
|
||||||
|
lua53-devel-5.3.5_7
|
||||||
|
lua54-devel-5.4.3_2
|
||||||
|
luarocks-lua54-3.7.0_1
|
||||||
maim-5.7.4_2
|
maim-5.7.4_2
|
||||||
mesa-dri-21.2.5_2
|
mesa-dri-21.2.6_1
|
||||||
mesa-dri-32bit-21.2.5_2
|
mesa-dri-32bit-21.2.6_1
|
||||||
mesa-vaapi-21.2.5_2
|
mesa-vaapi-21.2.6_1
|
||||||
mesa-vaapi-32bit-21.2.5_2
|
mesa-vaapi-32bit-21.2.6_1
|
||||||
mesa-vdpau-21.2.5_2
|
mesa-vdpau-21.2.6_1
|
||||||
mesa-vdpau-32bit-21.2.5_2
|
mesa-vdpau-32bit-21.2.6_1
|
||||||
mesa-vulkan-overlay-layer-21.2.5_2
|
mesa-vulkan-overlay-layer-21.2.6_1
|
||||||
mesa-vulkan-overlay-layer-32bit-21.2.5_2
|
mesa-vulkan-overlay-layer-32bit-21.2.6_1
|
||||||
mesa-vulkan-radeon-21.2.5_2
|
mesa-vulkan-radeon-21.2.6_1
|
||||||
mesa-vulkan-radeon-32bit-21.2.5_2
|
mesa-vulkan-radeon-32bit-21.2.6_1
|
||||||
mlocate-0.26_7
|
mlocate-0.26_7
|
||||||
mosh-1.3.2_23
|
mosh-1.3.2_23
|
||||||
mpv-0.34.0_1
|
mpv-0.34.0_1
|
||||||
|
@ -94,10 +98,10 @@ mumble-1.3.4_7
|
||||||
ncdu-1.16_1
|
ncdu-1.16_1
|
||||||
ncurses-devel-6.2_4
|
ncurses-devel-6.2_4
|
||||||
neomutt-20211029_1
|
neomutt-20211029_1
|
||||||
neovim-0.5.1_2
|
neovim-0.6.0_1
|
||||||
newsboat-2.25_1
|
newsboat-2.25_1
|
||||||
nfs-utils-2.5.4_1
|
nfs-utils-2.5.4_1
|
||||||
nftables-1.0.0_2
|
nftables-1.0.1_1
|
||||||
nicotine+-3.0.6_2
|
nicotine+-3.0.6_2
|
||||||
nodejs-16.9.1_1
|
nodejs-16.9.1_1
|
||||||
noto-fonts-cjk-20190416_2
|
noto-fonts-cjk-20190416_2
|
||||||
|
@ -107,9 +111,10 @@ opendoas-6.8.1_1
|
||||||
openjdk11-11.0.12+5_2
|
openjdk11-11.0.12+5_2
|
||||||
p7zip-16.02_5
|
p7zip-16.02_5
|
||||||
pass-1.7.4_1
|
pass-1.7.4_1
|
||||||
|
perl-File-MimeInfo-0.30_1
|
||||||
perl-Text-CharWidth-0.04_7
|
perl-Text-CharWidth-0.04_7
|
||||||
pinentry-gtk-1.2.0_1
|
pinentry-gtk-1.2.0_1
|
||||||
pipe-viewer-0.1.5_1
|
pipe-viewer-0.1.7_1
|
||||||
polybar-3.5.7_1
|
polybar-3.5.7_1
|
||||||
pulsemixer-1.5.1_2
|
pulsemixer-1.5.1_2
|
||||||
python3-neovim-0.4.3_2
|
python3-neovim-0.4.3_2
|
||||||
|
@ -122,7 +127,7 @@ rsync-3.2.3_3
|
||||||
runit-nftables-20200123_2
|
runit-nftables-20200123_2
|
||||||
setxkbmap-1.3.2_1
|
setxkbmap-1.3.2_1
|
||||||
shellcheck-0.8.0_1
|
shellcheck-0.8.0_1
|
||||||
shfmt-3.4.0_1
|
shfmt-3.4.1_1
|
||||||
simple-mtpfs-0.4.0_1
|
simple-mtpfs-0.4.0_1
|
||||||
snooze-0.5_1
|
snooze-0.5_1
|
||||||
socklog-void-20200115_2
|
socklog-void-20200115_2
|
||||||
|
@ -137,7 +142,7 @@ tremc-0.9.2_2
|
||||||
tty-solitaire-1.3.1_1
|
tty-solitaire-1.3.1_1
|
||||||
udevil-0.4.4_5
|
udevil-0.4.4_5
|
||||||
unclutter-xfixes-1.6_1
|
unclutter-xfixes-1.6_1
|
||||||
unrar-6.0.7_1
|
unrar-6.1.2_1
|
||||||
vkBasalt-0.3.2.4_1
|
vkBasalt-0.3.2.4_1
|
||||||
vkBasalt-32bit-0.3.2.4_1
|
vkBasalt-32bit-0.3.2.4_1
|
||||||
vkd3d-1.2_1
|
vkd3d-1.2_1
|
||||||
|
|
|
@ -15,6 +15,7 @@ alias \
|
||||||
ytv='pipe-viewer' \
|
ytv='pipe-viewer' \
|
||||||
vdf='nvim -d' \
|
vdf='nvim -d' \
|
||||||
vkl='vkpurge list' \
|
vkl='vkpurge list' \
|
||||||
|
gdl='gallery-dl --zip -q' \
|
||||||
sxiv='sxiv-rifle' \
|
sxiv='sxiv-rifle' \
|
||||||
news='neomutt -G' \
|
news='neomutt -G' \
|
||||||
pyserv='python -m http.server' \
|
pyserv='python -m http.server' \
|
||||||
|
|
Loading…
Reference in New Issue