Compare commits

...

3 Commits

4 changed files with 2948 additions and 81 deletions

View File

@@ -2383,7 +2383,9 @@ function! s:git_validate(spec, check_branch)
let err = join(['Invalid URI: '.remote,
\ 'Expected: '.a:spec.uri,
\ 'PlugClean required.'], "\n")
elseif a:check_branch && has_key(a:spec, 'commit')
elseif !a:check_branch
return ['', 0]
elseif has_key(a:spec, 'commit')
let sha = s:git_revision(a:spec.dir)
if empty(sha)
let err = join(add(result, 'PlugClean required.'), "\n")
@@ -2392,18 +2394,16 @@ function! s:git_validate(spec, check_branch)
\ a:spec.commit[:6], sha[:6]),
\ 'PlugUpdate required.'], "\n")
endif
elseif a:check_branch
let current_branch = result[0]
" Check tag
let origin_branch = s:git_origin_branch(a:spec)
if has_key(a:spec, 'tag')
elseif has_key(a:spec, 'tag')
let tag = s:system_chomp('git describe --exact-match --tags HEAD 2>&1', a:spec.dir)
if a:spec.tag !=# tag && a:spec.tag !~ '\*'
let err = printf('Invalid tag: %s (expected: %s). Try PlugUpdate.',
\ (empty(tag) ? 'N/A' : tag), a:spec.tag)
endif
" Check branch
elseif origin_branch !=# current_branch
elseif a:check_branch
let current_branch = result[0]
let origin_branch = s:git_origin_branch(a:spec)
if origin_branch !=# current_branch
let err = printf('Invalid branch: %s (expected: %s). Try PlugUpdate.',
\ current_branch, origin_branch)
endif

2877
autoload/plug.vim.old Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,10 @@
vim.opt.wrap = true
vim.keymap.set({"n" , "v"} , "<leader>k" , "?=\\+ <CR>" , { desc = "MOVE UP HEADING" })
vim.keymap.set({"n" , "v"} , "<leader>j" , "/=\\+ <CR>" , { desc = "MOVE DOWN HEADING" })
vim.keymap.set({"n" , "v"} , "k" , "gk" , { desc = "MOVE UP VISUALLY" })
vim.keymap.set({"n" , "v"} , "j" , "gj" , { desc = "MOVE DOWN VISUALLY" })
vim.keymap.set({"n" , "v"} , "j" , "gj" , { desc = "MOVE DOWN VISUALLY" })
vim.keymap.set({"n"} , "<leader>ep" , ":Asciidoctor2PDF<CR>" , { desc = "EXPORT TO PDF" })
vim.keymap.set({"n"} , "<leader>eh" , ":Asciidoctor2HTML<CR>" , { desc = "EXPORT TO HTML" })
vim.keymap.set({"n" , "v"} , "<leader>tt" , ":Tabularize /|/l0<CR>" , { desc = "FORMAT TABLE" })

View File

@@ -5,24 +5,24 @@
--└──────┘
local Plug = vim.fn['plug#']
vim.call('plug#begin')
Plug('ellisonleao/gruvbox.nvim')
--Plug('ellisonleao/gruvbox.nvim')
Plug('nvim-treesitter/nvim-treesitter')
--Plug('stevearc/oil.nvim')
Plug('godlygeek/tabular')
Plug('jbyuki/venn.nvim')
Plug('ribru17/bamboo.nvim')
--Plug('ribru17/bamboo.nvim')
Plug('sphamba/smear-cursor.nvim')
Plug('savq/melange-nvim')
Plug('smoka7/hop.nvim')
--Plug('smoka7/hop.nvim')
--Plug('MeanderingProgrammer/render-markdown.nvim')
Plug('sainnhe/sonokai')
Plug('sainnhe/everforest')
Plug('shaunsingh/nord.nvim')
Plug('sainnhe/gruvbox-material')
Plug('rebelot/kanagawa.nvim')
Plug('hat0uma/csvview.nvim')
Plug('catppuccin/nvim')
Plug('jbyuki/carrot.nvim')
--Plug('sainnhe/sonokai')
--Plug('sainnhe/everforest')
--Plug('shaunsingh/nord.nvim')
--Plug('sainnhe/gruvbox-material')
--Plug('rebelot/kanagawa.nvim')
--Plug('hat0uma/csvview.nvim')
--Plug('catppuccin/nvim')
--Plug('jbyuki/carrot.nvim') -- evaluates lua code in markdown files
Plug('habamax/vim-asciidoctor')
Plug('folke/which-key.nvim')
vim.call('plug#end')
@@ -34,8 +34,8 @@ vim.call('plug#end')
--└──────────────┘
vim.opt.number = true
vim.opt.relativenumber = true
vim.opt.numberwidth = 4
vim.opt.wrap = true
vim.opt.numberwidth = 5
vim.opt.wrap = false
vim.opt.breakindent = true
--┌────────┐
@@ -87,6 +87,7 @@ vim.opt.autochdir = true
vim.opt.mouse = ""
vim.opt.splitbelow = true
vim.opt.splitright = true
vim.opt.cpoptions:append("J")
--┌─────────────┐
--│ │
@@ -97,20 +98,19 @@ vim.g.mapleader = " "
vim.g.maplocalleader = " "
vim.keymap.set({"n" , "v"} , "<leader>'" , ":e .<CR>" , { desc = "OPEN THE CURRENT BUFFER'S DIRECTORY" })
vim.keymap.set({"n" , "v"} , "<leader><leader>" , ":HopWord<CR>" , { desc = "HOP TO WORDS" })
--vim.keymap.set({"n" , "v"} , "<leader><leader>" , ":HopWord<CR>" , { desc = "HOP TO WORDS" })
vim.keymap.set({"n" , "v"} , "<leader>C" , ":put =execute('lua =" , { desc = "QUICK LUA CALCULATION AND INSERT" })
vim.keymap.set({"n" , "v"} , "<leader>E" , ":set ve=none<CR>" , { desc = "DISABLE VISUAL EDIT MODE" })
vim.keymap.set({"n" , "v"} , "<leader>b" , "ly$h%p" , { desc = "COPY CONTEXT COMMENT TO OTHER END OF SCOPE" })
vim.keymap.set({"n" , "v"} , "<leader>c" , ":lua =" , { desc = "QUICK LUA CALCULATION" })
vim.keymap.set({"n" , "v"} , "<leader>d" , ":put =strftime('%Y-%m-%d-%H:%M:%S')<CR> :normal I[<ESC>A]<ESC>kJ" , { desc = "APPEND TIMESTAMP TO LINE" })
vim.keymap.set({"n" , "v"} , "<leader>e" , ":set ve=all<CR>" , { desc = "ENABLE VISUAL EDIT MODE" })
vim.keymap.set({"n" , "v"} , "<leader>l" , "f)hvi)gf" , { desc = "OPEN MARKDOWN LINK UNDER CURSOR" })
vim.keymap.set({"n" , "v"} , "<leader>mm" , ":bd<CR>" , { desc = "CLOSE BUFFER" })
--vim.keymap.set({"n" , "v"} , "<leader>d" , ":put =strftime('%Y-%m-%d-%H:%M:%S')<CR> :normal I[<ESC>A]<ESC>kJ" , { desc = "APPEND TIMESTAMP TO LINE" })
vim.keymap.set({"n"} , "<leader>id" , function() vim.api.nvim_put({os.date(' %Y-%m-%d-%H:%M:%S')},'c',true,true) end , { desc = "INSERT TIMESTAMP BEFORE CURSOR" })
vim.keymap.set({"n"} , "<leader>ad" , function() vim.api.nvim_put({os.date('%Y-%m-%d-%H:%M:%S ')},'c',true,true) end , { desc = "APPEND TIMESTAMP AFTER CURSOR" })
vim.keymap.set({"n" , "v"} , "<leader>ve" , ":set ve=all<CR>" , { desc = "ENABLE VISUAL EDIT MODE" })
vim.keymap.set({"n" , "v"} , "<leader>o" , ":buffer<Space>" , { desc = "BUFFER MENU" })
vim.keymap.set({"n" , "v"} , "<leader>p" , "\"*p" , { desc = "PASTE FROM CLIPBOARD" })
vim.keymap.set({"n" , "v"} , "<leader>te" , ":Tabularize /=<CR>" , { desc = "FORMAT MARKDOWN TABLES" })
vim.keymap.set({"n" , "v"} , "<leader>tt" , ":Tabularize /|/l0<CR>" , { desc = "FORMAT MARKDOWN TABLES" })
vim.keymap.set({"n" , "v"} , "<leader>v" , ":VBoxO<CR>" , { desc = "DISABLE VISUAL EDIT MODE" })
vim.keymap.set({"n" , "v"} , "<leader>te" , ":Tabularize /=<CR>" , { desc = "ALIGN EQUALS SIGNS" })
vim.keymap.set({"n" , "v"} , "<leader>vv" , ":VBoxO<CR>" , { desc = "DISABLE VISUAL EDIT MODE" })
vim.keymap.set({"n" , "v"} , "<leader>w" , "<C-w><C-w>" , { desc = "SWITCH WINDOW" })
vim.keymap.set({"n" , "v"} , "<leader>x<Space>" , ":%s/ \\+$//<CR>" , { desc = "REMOVE ALL TRAILING SPACES" })
vim.keymap.set({"n" , "v"} , "<leader>y" , "\"+y" , { desc = "YANK TO CLIPBOARD" })
@@ -136,39 +136,25 @@ vim.opt.clipboard:append("unnamedplus")
--│ Treesitter │
--│ │
--└────────────┘
require'nvim-treesitter.configs'.setup {
-- A list of parser names, or "all" (the listed parsers MUST always be installed)
ensure_installed = { "c", "lua", "vim", "vimdoc", "query", "markdown", "markdown_inline", "javascript", "html", "nginx", "bash", "cmake"},
-- Install parsers synchronously (only applied to `ensure_installed`)
sync_install = false,
-- Automatically install missing parsers when entering buffer
-- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally
auto_install = false,
-- List of parsers to ignore installing (or "all")
--ignore_install = { "javascript" },
---- If you need to change the installation directory of the parsers (see -> Advanced Setup)
-- parser_install_dir = "/some/path/to/store/parsers", -- Remember to run vim.opt.runtimepath:append("/some/path/to/store/parsers")!
require'nvim-treesitter'.setup{
ensure_installed = { "bash", "c", "css", "cpp", "go", "html", "java", "javascript", "json", "lua", "markdown", "markdown_inline", "python", "rust", "tsx", "typescript" },
highlight = {
enable = true,
-- NOTE: these are the names of the parsers and not the filetype. (for example if you want to
-- disable highlighting for the `tex` filetype, you need to include `latex` in this list as this is
-- the name of the parser)
-- list of language that will be disabled
--disable = { "c", "rust" },
-- Or use a function for more flexibility, e.g. to disable slow treesitter highlight for large files
disable = function(lang, buf)
local max_filesize = 100 * 1024 -- 100 KB
local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf))
if ok and stats and stats.size > max_filesize then
return true
end
end,
-- Setting this to true will run `:h syntax` and tree-sitter at the same time.
-- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
-- Using this option may slow down your editor, and you may see some duplicate highlights.
-- Instead of true it can also be a list of languages
additional_vim_regex_highlighting = false,
},
-- incremental_selection = {
-- enable = true,
-- keymaps = {
-- init_selection = "gnn", -- set to `false` to disable one of the mappings
-- node_incremental = "grn",
-- scope_incremental = "grc",
-- node_decremental = "grm",
-- },
-- },
}
--┌──────────────┐
@@ -216,21 +202,21 @@ require('smear_cursor').enabled = true
-- latex = { enabled = true, },
--})
--┌─────┐
--│ │
--│ Hop │
--│ │
--└─────┘
require('hop').setup{
keys = 'abdefghijklmnorstuvwy',
}
-- --┌─────┐
-- --│ │
-- --│ Hop │
-- --│ │
-- --└─────┘
-- require('hop').setup{
-- keys = 'abdefghijklmnorstuvwy',
-- }
--┌──────────────┐
--│ │
--│ Visual Stuff │
--│ │
--└──────────────┘
require("bamboo").load()
-- require("bamboo").load()
vim.cmd(":colorscheme melange")
vim.cmd [[
highlight Normal guibg=none
@@ -247,7 +233,7 @@ vim.cmd [[
--│ CSV View │
--│ │
--└──────────┘
require('csvview').setup()
-- require('csvview').setup()
--┌───────────────┐
--│ │