Compare commits
2 Commits
058b033928
...
4eca421fa7
| Author | SHA1 | Date | |
|---|---|---|---|
| 4eca421fa7 | |||
| 17962caff1 |
@@ -2383,7 +2383,9 @@ function! s:git_validate(spec, check_branch)
|
|||||||
let err = join(['Invalid URI: '.remote,
|
let err = join(['Invalid URI: '.remote,
|
||||||
\ 'Expected: '.a:spec.uri,
|
\ 'Expected: '.a:spec.uri,
|
||||||
\ 'PlugClean required.'], "\n")
|
\ '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)
|
let sha = s:git_revision(a:spec.dir)
|
||||||
if empty(sha)
|
if empty(sha)
|
||||||
let err = join(add(result, 'PlugClean required.'), "\n")
|
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]),
|
\ a:spec.commit[:6], sha[:6]),
|
||||||
\ 'PlugUpdate required.'], "\n")
|
\ 'PlugUpdate required.'], "\n")
|
||||||
endif
|
endif
|
||||||
elseif a:check_branch
|
elseif has_key(a:spec, 'tag')
|
||||||
let current_branch = result[0]
|
|
||||||
" Check tag
|
|
||||||
let origin_branch = s:git_origin_branch(a:spec)
|
|
||||||
if has_key(a:spec, 'tag')
|
|
||||||
let tag = s:system_chomp('git describe --exact-match --tags HEAD 2>&1', a:spec.dir)
|
let tag = s:system_chomp('git describe --exact-match --tags HEAD 2>&1', a:spec.dir)
|
||||||
if a:spec.tag !=# tag && a:spec.tag !~ '\*'
|
if a:spec.tag !=# tag && a:spec.tag !~ '\*'
|
||||||
let err = printf('Invalid tag: %s (expected: %s). Try PlugUpdate.',
|
let err = printf('Invalid tag: %s (expected: %s). Try PlugUpdate.',
|
||||||
\ (empty(tag) ? 'N/A' : tag), a:spec.tag)
|
\ (empty(tag) ? 'N/A' : tag), a:spec.tag)
|
||||||
endif
|
endif
|
||||||
" Check branch
|
elseif a:check_branch
|
||||||
elseif origin_branch !=# current_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.',
|
let err = printf('Invalid branch: %s (expected: %s). Try PlugUpdate.',
|
||||||
\ current_branch, origin_branch)
|
\ current_branch, origin_branch)
|
||||||
endif
|
endif
|
||||||
|
|||||||
2877
autoload/plug.vim.old
Normal file
2877
autoload/plug.vim.old
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,5 @@
|
|||||||
|
vim.opt.wrap = true
|
||||||
vim.keymap.set({"n" , "v"} , "<leader>k" , "?=\\+ <CR>" , { desc = "MOVE UP HEADING" })
|
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"} , "<leader>j" , "/=\\+ <CR>" , { desc = "MOVE DOWN HEADING" })
|
||||||
vim.keymap.set({"n" , "v"} , "k" , "gk" , { desc = "MOVE UP VISUALLY" })
|
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" , "v"} , "j" , "gj" , { desc = "MOVE DOWN VISUALLY" })
|
|
||||||
|
|||||||
90
init.lua
90
init.lua
@@ -5,24 +5,24 @@
|
|||||||
--└──────┘
|
--└──────┘
|
||||||
local Plug = vim.fn['plug#']
|
local Plug = vim.fn['plug#']
|
||||||
vim.call('plug#begin')
|
vim.call('plug#begin')
|
||||||
Plug('ellisonleao/gruvbox.nvim')
|
--Plug('ellisonleao/gruvbox.nvim')
|
||||||
Plug('nvim-treesitter/nvim-treesitter')
|
Plug('nvim-treesitter/nvim-treesitter')
|
||||||
--Plug('stevearc/oil.nvim')
|
--Plug('stevearc/oil.nvim')
|
||||||
Plug('godlygeek/tabular')
|
Plug('godlygeek/tabular')
|
||||||
Plug('jbyuki/venn.nvim')
|
Plug('jbyuki/venn.nvim')
|
||||||
Plug('ribru17/bamboo.nvim')
|
--Plug('ribru17/bamboo.nvim')
|
||||||
Plug('sphamba/smear-cursor.nvim')
|
Plug('sphamba/smear-cursor.nvim')
|
||||||
Plug('savq/melange-nvim')
|
Plug('savq/melange-nvim')
|
||||||
Plug('smoka7/hop.nvim')
|
--Plug('smoka7/hop.nvim')
|
||||||
--Plug('MeanderingProgrammer/render-markdown.nvim')
|
--Plug('MeanderingProgrammer/render-markdown.nvim')
|
||||||
Plug('sainnhe/sonokai')
|
--Plug('sainnhe/sonokai')
|
||||||
Plug('sainnhe/everforest')
|
--Plug('sainnhe/everforest')
|
||||||
Plug('shaunsingh/nord.nvim')
|
--Plug('shaunsingh/nord.nvim')
|
||||||
Plug('sainnhe/gruvbox-material')
|
--Plug('sainnhe/gruvbox-material')
|
||||||
Plug('rebelot/kanagawa.nvim')
|
--Plug('rebelot/kanagawa.nvim')
|
||||||
Plug('hat0uma/csvview.nvim')
|
--Plug('hat0uma/csvview.nvim')
|
||||||
Plug('catppuccin/nvim')
|
--Plug('catppuccin/nvim')
|
||||||
Plug('jbyuki/carrot.nvim')
|
--Plug('jbyuki/carrot.nvim') -- evaluates lua code in markdown files
|
||||||
Plug('habamax/vim-asciidoctor')
|
Plug('habamax/vim-asciidoctor')
|
||||||
Plug('folke/which-key.nvim')
|
Plug('folke/which-key.nvim')
|
||||||
vim.call('plug#end')
|
vim.call('plug#end')
|
||||||
@@ -34,8 +34,8 @@ vim.call('plug#end')
|
|||||||
--└──────────────┘
|
--└──────────────┘
|
||||||
vim.opt.number = true
|
vim.opt.number = true
|
||||||
vim.opt.relativenumber = true
|
vim.opt.relativenumber = true
|
||||||
vim.opt.numberwidth = 4
|
vim.opt.numberwidth = 5
|
||||||
vim.opt.wrap = true
|
vim.opt.wrap = false
|
||||||
vim.opt.breakindent = true
|
vim.opt.breakindent = true
|
||||||
|
|
||||||
--┌────────┐
|
--┌────────┐
|
||||||
@@ -87,6 +87,7 @@ vim.opt.autochdir = true
|
|||||||
vim.opt.mouse = ""
|
vim.opt.mouse = ""
|
||||||
vim.opt.splitbelow = true
|
vim.opt.splitbelow = true
|
||||||
vim.opt.splitright = true
|
vim.opt.splitright = true
|
||||||
|
vim.opt.cpoptions:append("J")
|
||||||
|
|
||||||
--┌─────────────┐
|
--┌─────────────┐
|
||||||
--│ │
|
--│ │
|
||||||
@@ -97,15 +98,14 @@ vim.g.mapleader = " "
|
|||||||
vim.g.maplocalleader = " "
|
vim.g.maplocalleader = " "
|
||||||
|
|
||||||
vim.keymap.set({"n" , "v"} , "<leader>'" , ":e .<CR>" , { desc = "OPEN THE CURRENT BUFFER'S DIRECTORY" })
|
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>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>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>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>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>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>d" , function() vim.api.nvim_put({os.date('%Y-%m-%d-%H:%M:%S')},'c',true,true) end , { 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>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>o" , ":buffer<Space>" , { desc = "BUFFER MENU" })
|
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>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>te" , ":Tabularize /=<CR>" , { desc = "FORMAT MARKDOWN TABLES" })
|
||||||
@@ -136,39 +136,25 @@ vim.opt.clipboard:append("unnamedplus")
|
|||||||
--│ Treesitter │
|
--│ Treesitter │
|
||||||
--│ │
|
--│ │
|
||||||
--└────────────┘
|
--└────────────┘
|
||||||
require'nvim-treesitter.configs'.setup {
|
require'nvim-treesitter'.setup{
|
||||||
-- A list of parser names, or "all" (the listed parsers MUST always be installed)
|
ensure_installed = { "bash", "c", "css", "cpp", "go", "html", "java", "javascript", "json", "lua", "markdown", "markdown_inline", "python", "rust", "tsx", "typescript" },
|
||||||
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")!
|
|
||||||
highlight = {
|
highlight = {
|
||||||
enable = true,
|
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.
|
-- 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).
|
-- 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.
|
-- 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
|
-- Instead of true it can also be a list of languages
|
||||||
additional_vim_regex_highlighting = false,
|
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, },
|
-- latex = { enabled = true, },
|
||||||
--})
|
--})
|
||||||
|
|
||||||
--┌─────┐
|
-- --┌─────┐
|
||||||
--│ │
|
-- --│ │
|
||||||
--│ Hop │
|
-- --│ Hop │
|
||||||
--│ │
|
-- --│ │
|
||||||
--└─────┘
|
-- --└─────┘
|
||||||
require('hop').setup{
|
-- require('hop').setup{
|
||||||
keys = 'abdefghijklmnorstuvwy',
|
-- keys = 'abdefghijklmnorstuvwy',
|
||||||
}
|
-- }
|
||||||
|
|
||||||
--┌──────────────┐
|
--┌──────────────┐
|
||||||
--│ │
|
--│ │
|
||||||
--│ Visual Stuff │
|
--│ Visual Stuff │
|
||||||
--│ │
|
--│ │
|
||||||
--└──────────────┘
|
--└──────────────┘
|
||||||
require("bamboo").load()
|
-- require("bamboo").load()
|
||||||
vim.cmd(":colorscheme melange")
|
vim.cmd(":colorscheme melange")
|
||||||
vim.cmd [[
|
vim.cmd [[
|
||||||
highlight Normal guibg=none
|
highlight Normal guibg=none
|
||||||
@@ -247,7 +233,7 @@ vim.cmd [[
|
|||||||
--│ CSV View │
|
--│ CSV View │
|
||||||
--│ │
|
--│ │
|
||||||
--└──────────┘
|
--└──────────┘
|
||||||
require('csvview').setup()
|
-- require('csvview').setup()
|
||||||
|
|
||||||
--┌───────────────┐
|
--┌───────────────┐
|
||||||
--│ │
|
--│ │
|
||||||
|
|||||||
Reference in New Issue
Block a user