mirror of
https://github.com/jdhao/nvim-config.git
synced 2025-06-08 14:14:33 +02:00
Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
df9491b05b | ||
|
|
17d2e3ab3e | ||
|
|
2c9948300d | ||
|
|
dfaa3d97a5 | ||
|
|
8d74fcb75c | ||
|
|
b1f0ef63ef | ||
|
|
54ca6d4191 | ||
|
|
97af59e670 | ||
|
|
4d8ef868ad | ||
|
|
3137850db6 | ||
|
|
eccdc62f38 | ||
|
|
ad483a7dc0 |
@@ -13,7 +13,7 @@
|
||||
<img alt="Latest release" src="https://img.shields.io/github/v/release/jdhao/nvim-config" />
|
||||
</a>
|
||||
<a href="https://github.com/neovim/neovim/releases/tag/stable">
|
||||
<img src="https://img.shields.io/badge/Neovim-0.9.2-blueviolet.svg?style=flat-square&logo=Neovim&logoColor=green" alt="Neovim minimum version"/>
|
||||
<img src="https://img.shields.io/badge/Neovim-0.9.5-blueviolet.svg?style=flat-square&logo=Neovim&logoColor=green" alt="Neovim minimum version"/>
|
||||
</a>
|
||||
<a href="https://github.com/jdhao/nvim-config/search?l=vim-script">
|
||||
<img src="https://img.shields.io/github/languages/top/jdhao/nvim-config" alt="Top languages"/>
|
||||
@@ -21,8 +21,8 @@
|
||||
<a href="https://github.com/jdhao/nvim-config/graphs/commit-activity">
|
||||
<img src="https://img.shields.io/github/commit-activity/m/jdhao/nvim-config?style=flat-square" />
|
||||
</a>
|
||||
<a href="https://github.com/jdhao/nvim-config/releases/tag/v0.9.2">
|
||||
<img src="https://img.shields.io/github/commits-since/jdhao/nvim-config/v0.9.2?style=flat-square" />
|
||||
<a href="https://github.com/jdhao/nvim-config/releases/tag/v0.9.5">
|
||||
<img src="https://img.shields.io/github/commits-since/jdhao/nvim-config/v0.9.5?style=flat-square" />
|
||||
</a>
|
||||
<a href="https://github.com/jdhao/nvim-config/graphs/contributors">
|
||||
<img src="https://img.shields.io/github/contributors/jdhao/nvim-config?style=flat-square" />
|
||||
|
||||
@@ -128,11 +128,22 @@ endfunction
|
||||
|
||||
" Output current time or unix timestamp in human-readable format.
|
||||
function! utils#iso_time(timestamp) abort
|
||||
if a:timestamp
|
||||
return strftime('%Y-%m-%d %H:%M:%S%z', a:timestamp)
|
||||
" Get current datetime
|
||||
if !a:timestamp
|
||||
return strftime('%Y-%m-%d %H:%M:%S%z')
|
||||
endif
|
||||
|
||||
return strftime('%Y-%m-%d %H:%M:%S%z')
|
||||
" this timestamp in expressed in milliseconds
|
||||
if len(a:timestamp) == 13
|
||||
let l:timestamp = a:timestamp[:-4]
|
||||
" this timestamp in expressed in microseconds
|
||||
elseif len(a:timestamp) == 16
|
||||
let l:timestamp = a:timestamp[:-7]
|
||||
else
|
||||
let l:timestamp = a:timestamp
|
||||
endif
|
||||
return strftime('%Y-%m-%d %H:%M:%S%z', l:timestamp)
|
||||
|
||||
endfunction
|
||||
|
||||
" Check if we are inside a Git repo.
|
||||
|
||||
5
init.lua
5
init.lua
@@ -14,7 +14,7 @@ vim.loader.enable()
|
||||
local version = vim.version
|
||||
|
||||
-- check if we have the latest stable version of nvim
|
||||
local expected_ver = "0.9.2"
|
||||
local expected_ver = "0.9.5"
|
||||
local ev = version.parse(expected_ver)
|
||||
local actual_ver = version()
|
||||
|
||||
@@ -33,10 +33,11 @@ local core_conf_files = {
|
||||
"colorschemes.lua", -- colorscheme settings
|
||||
}
|
||||
|
||||
local viml_conf_dir = vim.fn.stdpath("config") .. "/viml_conf"
|
||||
-- source all the core config files
|
||||
for _, file_name in ipairs(core_conf_files) do
|
||||
if vim.endswith(file_name, 'vim') then
|
||||
local path = string.format("%s/core/%s", vim.fn.stdpath("config"), file_name)
|
||||
local path = string.format("%s/%s", viml_conf_dir, file_name)
|
||||
local source_cmd = "source " .. path
|
||||
vim.cmd(source_cmd)
|
||||
else
|
||||
|
||||
@@ -1,69 +1,68 @@
|
||||
{
|
||||
"LeaderF": { "branch": "master", "commit": "9c4451d2c1a6ea1f32e39fe52d58f6f5655b231d" },
|
||||
"asyncrun.vim": { "branch": "master", "commit": "42385d54b8546c163b946fd50eed2103ef7993c9" },
|
||||
"LeaderF": { "branch": "master", "commit": "a77f45791edeaa82fa75c5959ca73a59d7549549" },
|
||||
"asyncrun.vim": { "branch": "master", "commit": "61cc3081963a12048e00e89f8cedc8bd1cb83b8c" },
|
||||
"better-escape.vim": { "branch": "master", "commit": "6b16a45a839727977277f6ab11bded63e9ed86bb" },
|
||||
"bufferline.nvim": { "branch": "main", "commit": "9961d87bb3ec008213c46ba14b3f384a5f520eb5" },
|
||||
"catppuccin": { "branch": "main", "commit": "85e93601e0f0b48aa2c6bbfae4d0e9d7a1898280" },
|
||||
"bufferline.nvim": { "branch": "main", "commit": "357cc8f8eeb64702e6fcf2995e3b9becee99a5d3" },
|
||||
"catppuccin": { "branch": "main", "commit": "fc537040147f0374a22b88142a20eb6781141f0b" },
|
||||
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
||||
"cmp-emoji": { "branch": "main", "commit": "19075c36d5820253d32e2478b6aaf3734aeaafa0" },
|
||||
"cmp-nvim-lsp": { "branch": "main", "commit": "44b16d11215dce86f253ce0c30949813c0a90765" },
|
||||
"cmp-nvim-ultisnips": { "branch": "main", "commit": "24bca5c3e137b28cd87442d4fc51a2b312dd99cc" },
|
||||
"cmp-omni": { "branch": "main", "commit": "9436e6cdd7c5dfa24a99a60d9280b24dbdea3649" },
|
||||
"cmp-omni": { "branch": "main", "commit": "4ef610bbd85a5ee4e97e09450c0daecbdc60de86" },
|
||||
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
||||
"committia.vim": { "branch": "master", "commit": "0b4df1a7f48ffbc23b009bd14d58ee1be541917c" },
|
||||
"dashboard-nvim": { "branch": "master", "commit": "bbe0234168501b8ba46f24b4fb3cb7c5b88c0784" },
|
||||
"dashboard-nvim": { "branch": "master", "commit": "8721edccead31c07c2cda0bc5ac75b0491b5adcd" },
|
||||
"delimitMate": { "branch": "master", "commit": "537a1da0fa5eeb88640425c37e545af933c56e1b" },
|
||||
"dressing.nvim": { "branch": "master", "commit": "c1e1d5fa44fe08811b6ef4aadac2b50e602f9504" },
|
||||
"dressing.nvim": { "branch": "master", "commit": "1f2d1206a03bd3add8aedf6251e4534611de577f" },
|
||||
"edge": { "branch": "master", "commit": "a4fd4f458331d42677d992f428235c491b2016aa" },
|
||||
"emmylua-nvim": { "branch": "master", "commit": "38720eb5f1dac8e87254fd944dbe0959b2e67d94" },
|
||||
"emmylua-nvim": { "branch": "master", "commit": "c8f3c20276041c2b847cf041bca5928671b2eaa0" },
|
||||
"everforest": { "branch": "master", "commit": "83b666410d7ae0eccf96dbbe3b4b6ac5b8172d38" },
|
||||
"fidget.nvim": { "branch": "main", "commit": "0ba1e16d07627532b6cae915cc992ecac249fb97" },
|
||||
"firenvim": { "branch": "master", "commit": "138424db463e6c0e862a05166a4ccc781cd7c19d" },
|
||||
"gitlinker.nvim": { "branch": "master", "commit": "cc59f732f3d043b626c8702cb725c82e54d35c25" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "907ae8636016aab2f283576fc60d46ca3427e579" },
|
||||
"gruvbox-material": { "branch": "master", "commit": "b5f8c6a6c1cda630c53b061b765068a0898d47a3" },
|
||||
"hop.nvim": { "branch": "master", "commit": "1a1eceafe54b5081eae4cb91c723abd1d450f34b" },
|
||||
"indent-blankline.nvim": { "branch": "master", "commit": "9637670896b68805430e2f72cf5d16be5b97a22a" },
|
||||
"kanagawa.nvim": { "branch": "master", "commit": "a4e99f089110c6d00bc33f5497709200e914e763" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "2a9354c7d2368d78cbd5575a51a2af5bd8a6ad01" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "ff01d34daaed72f271a8ffa088a7e839a60c640f" },
|
||||
"gruvbox-material": { "branch": "master", "commit": "c75bf1e96fdc33b8b3b613e5172a0acdba198fca" },
|
||||
"hop.nvim": { "branch": "master", "commit": "1cbaa79457e6b5e9b04e6d5d8d19bd6b65ffa2be" },
|
||||
"indent-blankline.nvim": { "branch": "master", "commit": "0fe34b4c1b926e106d105d3ae88ef6cbf6743572" },
|
||||
"kanagawa.nvim": { "branch": "master", "commit": "c19b9023842697ec92caf72cd3599f7dd7be4456" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "33c447b96e1cb1a5a2be87982d5d32bb5054079d" },
|
||||
"lspkind-nvim": { "branch": "master", "commit": "57610d5ab560c073c465d6faf0c19f200cb67e6e" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "45e27ca739c7be6c49e5496d14fcf45a303c3a63" },
|
||||
"markdown-preview.nvim": { "branch": "master", "commit": "02cc3874738bc0f86e4b91f09b8a0ac88aef8e96" },
|
||||
"material.nvim": { "branch": "main", "commit": "1ecaa2d065a1ea308bd7702a77c2bf35ede8f536" },
|
||||
"material.nvim": { "branch": "main", "commit": "6989f7e0076f4fa4e01056bd62c785cf0fef4caf" },
|
||||
"monokai.nvim": { "branch": "master", "commit": "b8bd44d5796503173627d7a1fc51f77ec3a08a63" },
|
||||
"neoformat": { "branch": "master", "commit": "0c285d7a7c06a6ee88db70871a274797693fce42" },
|
||||
"nightfox.nvim": { "branch": "main", "commit": "e886e39e592e89f316536a6f070365a9d88901c9" },
|
||||
"nord.nvim": { "branch": "master", "commit": "15fbfc38a83980b93e169b32a1bf64757f1e2bf4" },
|
||||
"nvim-bqf": { "branch": "main", "commit": "a906a9dfc1bd7b3ac51ac954e32e157ffad9a7cd" },
|
||||
"neoformat": { "branch": "master", "commit": "aedb6f9d3f53d5da229095f7d761d749f8c5c7e0" },
|
||||
"nightfox.nvim": { "branch": "main", "commit": "fe2fc7b93d66349eff2c5baa6cec922ee3958f56" },
|
||||
"nord.nvim": { "branch": "master", "commit": "0a22a387c92bb3b46e3d245522712ae7497bec38" },
|
||||
"nvim-bqf": { "branch": "main", "commit": "8784eebf34371049b641646d00232c2603215297" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "5dce1b778b85c717f6614e3f4da45e9f19f54435" },
|
||||
"nvim-hlslens": { "branch": "main", "commit": "f0281591a59e95400babf61a96e59ba20e5c9533" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "cc388d3f6b9c7c943ae2b2dcd46ad470fd257f91" },
|
||||
"nvim-notify": { "branch": "master", "commit": "94859430020f5cf32a1b97ddd9e596fed9db7981" },
|
||||
"nvim-tree.lua": { "branch": "master", "commit": "94c7c810af205c0f00c8f105dcf490c8eb17658a" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "bf8b089eecef9e9e8c1765f81613a2fd5e49175c" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "973ab742f143a796a779af4d786ec409116a0d87" },
|
||||
"onedark.nvim": { "branch": "master", "commit": "dac8c39812dae025255c9069a260e1f69d967927" },
|
||||
"onedarkpro.nvim": { "branch": "main", "commit": "fa861b992471d55f653751f1fea8769ca536a554" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "cab7233cd6a89ec952dfd40c4b74341b1165830e" },
|
||||
"nvim-notify": { "branch": "master", "commit": "e4a2022f4fec2d5ebc79afa612f96d8b11c627b3" },
|
||||
"nvim-tree.lua": { "branch": "master", "commit": "53b0bcaadaffb505acff230578b56a86ec1ab38a" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "783e5fc3079680b307e8ac518935317907e71a59" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "a1e6268779411048a87f767a27380089362a0ce2" },
|
||||
"onedark.nvim": { "branch": "master", "commit": "826fb77e9ca92d3c0f3d937328663d4a6dc7fee1" },
|
||||
"onedarkpro.nvim": { "branch": "main", "commit": "7c02b4eeb310173ef6d741e60200d72b76923eae" },
|
||||
"open-browser.vim": { "branch": "master", "commit": "7d4c1d8198e889d513a030b5a83faa07606bac27" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "9ce85b0f7dcfe5358c0be937ad23e456907d410b" },
|
||||
"rose-pine": { "branch": "main", "commit": "e29002cbee4854a9c8c4b148d8a52fae3176070f" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "50012918b2fc8357b87cff2a7f7f0446e47da174" },
|
||||
"sonokai": { "branch": "master", "commit": "17308ee6d9c764bfc1e0fa97213e7a99701b4144" },
|
||||
"tabular": { "branch": "master", "commit": "339091ac4dd1f17e225fe7d57b48aff55f99b23a" },
|
||||
"targets.vim": { "branch": "master", "commit": "642d3a4ce306264b05ea3219920b13ea80931767" },
|
||||
"telescope-symbols.nvim": { "branch": "master", "commit": "f2060117d965df4a626f068a4ebbd8ee051aa076" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "59812c26d826e8c717e29406267ea1260f71e103" },
|
||||
"ultisnips": { "branch": "master", "commit": "24a3ebb36687b6d59a19d63173713575b486d739" },
|
||||
"unicode.vim": { "branch": "master", "commit": "c8aa12b1e2e1b6254885b12bdb239ce6c885fdb1" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "74ce793a60759e3db0d265174f137fb627430355" },
|
||||
"ultisnips": { "branch": "master", "commit": "f6d1501b630cb783b0af8507c5588328f826d40f" },
|
||||
"unicode.vim": { "branch": "master", "commit": "bc20d0fb3331a7b41708388c56bb8221c2104da7" },
|
||||
"vim-auto-save": { "branch": "master", "commit": "2e3e54ea4c0fc946c21b0a4ee4c1c295ba736ee8" },
|
||||
"vim-commentary": { "branch": "master", "commit": "e87cd90dc09c2a203e13af9704bd0ef79303d755" },
|
||||
"vim-conflicted": { "branch": "master", "commit": "068c320796f807ac4961618e3e62316773803996" },
|
||||
"vim-eunuch": { "branch": "master", "commit": "67f3dd32b4dcd1c427085f42ff5f29c7adc645c6" },
|
||||
"vim-flog": { "branch": "master", "commit": "58c1d39ec42f92d23a1204b1869e5d1dece8b86c" },
|
||||
"vim-fugitive": { "branch": "master", "commit": "6fcb0ad03982de646e3fecb6915e585651b9a9fb" },
|
||||
"vim-fugitive": { "branch": "master", "commit": "cbe9dfa162c178946afa689dd3f42d4ea8bf89c1" },
|
||||
"vim-grammarous": { "branch": "master", "commit": "db46357465ce587d5325e816235b5e92415f8c05" },
|
||||
"vim-highlighturl": { "branch": "master", "commit": "012fee983e03913db6ba6393307eac434999b896" },
|
||||
"vim-indent-object": { "branch": "master", "commit": "5c5b24c959478929b54a9e831a8e2e651a465965" },
|
||||
"vim-markdown": { "branch": "master", "commit": "cc82d88e2a791f54d2b6e2b26e41f743351ac947" },
|
||||
"vim-markdown": { "branch": "master", "commit": "4e9b4deda11d05a157ab34e97f76089669b5b7af" },
|
||||
"vim-markdownfootnotes": { "branch": "master", "commit": "2b288149f48cfaf7465d25bb094ed62898f5e5b0" },
|
||||
"vim-matchup": { "branch": "master", "commit": "6dbe108230c7dbbf00555b7d4d9f6a891837ef07" },
|
||||
"vim-mundo": { "branch": "master", "commit": "b53d35fb5ca9923302b9ef29e618ab2db4cc675e" },
|
||||
@@ -78,11 +77,11 @@
|
||||
"vim-tmux": { "branch": "master", "commit": "cfe76281efc29890548cf9eedd42ad51c7a1faf0" },
|
||||
"vim-toml": { "branch": "main", "commit": "d36caa6b1cf508a4df1c691f915572fc02143258" },
|
||||
"vim-xkbswitch": { "branch": "master", "commit": "42b55bfec8f6dbd715135ce582a6f769831face1" },
|
||||
"vimtex": { "branch": "master", "commit": "2b8a5f16a5768b3ae1780c266b73022dbb658af1" },
|
||||
"vista.vim": { "branch": "master", "commit": "40daf5e97be70a90465182fbbdfba92442bfd8e1" },
|
||||
"vimtex": { "branch": "master", "commit": "cbb20643b7bfe721902dac5760bf0d4889fb5f7e" },
|
||||
"vista.vim": { "branch": "master", "commit": "58dabc027909330970ac549e52bf799a723878c5" },
|
||||
"which-key.nvim": { "branch": "main", "commit": "7ccf476ebe0445a741b64e36c78a682c1c6118b7" },
|
||||
"whitespace.nvim": { "branch": "master", "commit": "f0fc9e9c4ce3f7d2166e9e5a069b64b9ca4a3f15" },
|
||||
"wilder.nvim": { "branch": "master", "commit": "679f348dc90d80ff9ba0e7c470c40a4d038dcecf" },
|
||||
"yanky.nvim": { "branch": "main", "commit": "4c85d8d6808d9859e72f8bd6c25302199e6a5eac" },
|
||||
"zen-mode.nvim": { "branch": "main", "commit": "68f554702de63f4b7b6b6d4bcb10178f41a0acc7" }
|
||||
"yanky.nvim": { "branch": "main", "commit": "cc3fc03c780a14f189290edcf1c47dc1306626d4" },
|
||||
"zen-mode.nvim": { "branch": "main", "commit": "cb73b8bd0ef9d765b942db09dc762c603a89ae44" }
|
||||
}
|
||||
@@ -16,7 +16,6 @@ M.colorscheme2dir = {
|
||||
nightfox = "nightfox.nvim",
|
||||
kanagawa = "kanagawa.nvim",
|
||||
catppuccin = "catppuccin",
|
||||
rose_pine = "rose-pine",
|
||||
onedarkpro = "onedarkpro.nvim",
|
||||
monokai = "monokai.nvim",
|
||||
material = "material.nvim",
|
||||
@@ -94,16 +93,6 @@ M.catppuccin = function()
|
||||
vim.cmd([[colorscheme catppuccin]])
|
||||
end
|
||||
|
||||
M.rose_pine = function()
|
||||
require('rose-pine').setup({
|
||||
--- @usage 'main' | 'moon'
|
||||
dark_variant = 'moon',
|
||||
})
|
||||
|
||||
-- set colorscheme after options
|
||||
vim.cmd('colorscheme rose-pine')
|
||||
end
|
||||
|
||||
M.onedarkpro = function()
|
||||
-- set colorscheme after options
|
||||
vim.cmd('colorscheme onedark_vivid')
|
||||
|
||||
@@ -1,21 +1,28 @@
|
||||
local api = vim.api
|
||||
|
||||
local exclude_ft = { "help", "git", "markdown", "snippets", "text", "gitconfig", "alpha" }
|
||||
require("indent_blankline").setup {
|
||||
-- U+2502 may also be a good choice, it will be on the middle of cursor.
|
||||
-- U+250A is also a good choice
|
||||
char = "▏",
|
||||
show_end_of_line = false,
|
||||
disable_with_nolist = true,
|
||||
buftype_exclude = { "terminal" },
|
||||
filetype_exclude = exclude_ft,
|
||||
local exclude_ft = { "help", "git", "markdown", "snippets", "text", "gitconfig", "alpha", "dashboard" }
|
||||
|
||||
require("ibl").setup {
|
||||
indent = {
|
||||
-- -- U+2502 may also be a good choice, it will be on the middle of cursor.
|
||||
-- -- U+250A is also a good choice
|
||||
char = "▏",
|
||||
},
|
||||
scope = {
|
||||
show_start = false,
|
||||
show_end = false,
|
||||
},
|
||||
exclude = {
|
||||
filetypes = exclude_ft,
|
||||
buftypes = { "terminal" },
|
||||
},
|
||||
}
|
||||
|
||||
local gid = api.nvim_create_augroup("indent_blankline", { clear = true })
|
||||
api.nvim_create_autocmd("InsertEnter", {
|
||||
pattern = "*",
|
||||
group = gid,
|
||||
command = "IndentBlanklineDisable",
|
||||
command = "IBLDisable",
|
||||
})
|
||||
|
||||
api.nvim_create_autocmd("InsertLeave", {
|
||||
@@ -23,7 +30,7 @@ api.nvim_create_autocmd("InsertLeave", {
|
||||
group = gid,
|
||||
callback = function()
|
||||
if not vim.tbl_contains(exclude_ft, vim.bo.filetype) then
|
||||
vim.cmd([[IndentBlanklineEnable]])
|
||||
vim.cmd([[IBLEnable]])
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
@@ -12,7 +12,6 @@ nvim_tree.setup {
|
||||
update_cwd = false,
|
||||
view = {
|
||||
width = 30,
|
||||
hide_root_folder = false,
|
||||
side = "left",
|
||||
preserve_window_proportions = false,
|
||||
number = false,
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
vim.cmd([[hi HopNextKey cterm=bold ctermfg=176 gui=bold guibg=#ff00ff guifg=#ffffff]])
|
||||
vim.cmd([[hi HopNextKey1 cterm=bold ctermfg=176 gui=bold guibg=#ff00ff guifg=#ffffff]])
|
||||
vim.cmd([[hi HopNextKey2 cterm=bold ctermfg=176 gui=bold guibg=#ff00ff guifg=#ffffff]])
|
||||
|
||||
local keymap = vim.keymap
|
||||
local hop = require("hop")
|
||||
hop.setup {
|
||||
@@ -18,3 +14,14 @@ keymap.set({ "n", "v", "o" }, "f", "", {
|
||||
end,
|
||||
desc = "nvim-hop char2",
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd("ColorScheme", {
|
||||
pattern = "*",
|
||||
callback = function ()
|
||||
vim.cmd([[
|
||||
hi HopNextKey cterm=bold ctermfg=176 gui=bold guibg=#ff00ff guifg=#ffffff
|
||||
hi HopNextKey1 cterm=bold ctermfg=176 gui=bold guibg=#ff00ff guifg=#ffffff
|
||||
hi HopNextKey2 cterm=bold ctermfg=176 gui=bold guibg=#ff00ff guifg=#ffffff
|
||||
]])
|
||||
end
|
||||
})
|
||||
|
||||
@@ -97,6 +97,27 @@ local diff = function()
|
||||
return info
|
||||
end
|
||||
|
||||
local virtual_env = function()
|
||||
-- only show virtual env for Python
|
||||
if vim.bo.filetype ~= 'python' then
|
||||
return ""
|
||||
end
|
||||
|
||||
local conda_env = os.getenv('CONDA_DEFAULT_ENV')
|
||||
local venv_path = os.getenv('VIRTUAL_ENV')
|
||||
|
||||
if venv_path == nil then
|
||||
if conda_env == nil then
|
||||
return ""
|
||||
else
|
||||
return string.format(" %s (conda)", conda_env)
|
||||
end
|
||||
else
|
||||
local venv_name = vim.fn.fnamemodify(venv_path, ':t')
|
||||
return string.format(" %s (venv)", venv_name)
|
||||
end
|
||||
end
|
||||
|
||||
require("lualine").setup {
|
||||
options = {
|
||||
icons_enabled = true,
|
||||
@@ -116,6 +137,10 @@ require("lualine").setup {
|
||||
"diff",
|
||||
source = diff,
|
||||
},
|
||||
{
|
||||
virtual_env,
|
||||
color = { fg = 'black', bg = "#F1CA81" }
|
||||
}
|
||||
},
|
||||
lualine_c = {
|
||||
"filename",
|
||||
|
||||
@@ -88,12 +88,10 @@ local plugin_specs = {
|
||||
|
||||
-- Super fast buffer jump
|
||||
{
|
||||
"phaazon/hop.nvim",
|
||||
"smoka7/hop.nvim",
|
||||
event = "VeryLazy",
|
||||
config = function()
|
||||
vim.defer_fn(function()
|
||||
require("config.nvim_hop")
|
||||
end, 2000)
|
||||
require("config.nvim_hop")
|
||||
end,
|
||||
},
|
||||
|
||||
@@ -134,7 +132,6 @@ local plugin_specs = {
|
||||
{ "EdenEast/nightfox.nvim", lazy = true },
|
||||
{ "rebelot/kanagawa.nvim", lazy = true },
|
||||
{ "catppuccin/nvim", name = "catppuccin", lazy = true },
|
||||
{ "rose-pine/neovim", name = "rose-pine", lazy = true },
|
||||
{ "olimorris/onedarkpro.nvim", lazy = true },
|
||||
{ "tanvirtin/monokai.nvim", lazy = true },
|
||||
{ "marko-cerovac/material.nvim", lazy = true },
|
||||
@@ -171,6 +168,7 @@ local plugin_specs = {
|
||||
{
|
||||
"lukas-reineke/indent-blankline.nvim",
|
||||
event = "VeryLazy",
|
||||
main = 'ibl',
|
||||
config = function()
|
||||
require("config.indent-blankline")
|
||||
end,
|
||||
@@ -184,9 +182,7 @@ local plugin_specs = {
|
||||
"rcarriga/nvim-notify",
|
||||
event = "VeryLazy",
|
||||
config = function()
|
||||
vim.defer_fn(function()
|
||||
require("config.nvim-notify")
|
||||
end, 2000)
|
||||
require("config.nvim-notify")
|
||||
end,
|
||||
},
|
||||
|
||||
@@ -313,6 +309,11 @@ local plugin_specs = {
|
||||
|
||||
-- Better git commit experience
|
||||
{ "rhysd/committia.vim", lazy = true },
|
||||
|
||||
{
|
||||
"sindrets/diffview.nvim"
|
||||
},
|
||||
|
||||
{
|
||||
"kevinhwang91/nvim-bqf",
|
||||
ft = "qf",
|
||||
@@ -461,9 +462,7 @@ local plugin_specs = {
|
||||
"folke/which-key.nvim",
|
||||
event = "VeryLazy",
|
||||
config = function()
|
||||
vim.defer_fn(function()
|
||||
require("config.which-key")
|
||||
end, 2000)
|
||||
require("config.which-key")
|
||||
end,
|
||||
},
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
scriptencoding utf-8
|
||||
|
||||
" change fillchars for folding, vertical split, end of buffer, and message separator
|
||||
set fillchars=fold:\ ,vert:\│,eob:\ ,msgsep:‾
|
||||
set fillchars=fold:\ ,vert:\│,eob:\ ,msgsep:‾,diff:╱
|
||||
|
||||
" Split window below/right when creating horizontal/vertical windows
|
||||
set splitbelow splitright
|
||||
@@ -1,7 +1,7 @@
|
||||
scriptencoding utf-8
|
||||
|
||||
" Plugin specification and lua stuff
|
||||
lua require('plugins')
|
||||
lua require('plugin_specs')
|
||||
|
||||
" Use short names for common plugin manager commands to simplify typing.
|
||||
" To use these shortcuts: first activate command line with `:`, then input the
|
||||
Reference in New Issue
Block a user