parent
4053f19333
commit
9b7d9a60a3
@ -1 +1,2 @@
|
||||
plugin/
|
||||
.DS_Store
|
||||
|
@ -1,17 +1,20 @@
|
||||
vim.g.python3_host_prog = '/usr/bin/python'
|
||||
vim.g.mapleader = ' '
|
||||
vim.g.python3_host_prog = "/usr/bin/python"
|
||||
vim.g.mapleader = " "
|
||||
|
||||
-- Setup packer
|
||||
local fn = vim.fn
|
||||
local install_path = fn.stdpath('data') .. '/site/pack/packer/start/packer.nvim'
|
||||
if fn.empty(fn.glob(install_path)) > 0 then
|
||||
fn.system({
|
||||
'git', 'clone', '--depth', '1',
|
||||
'https://github.com/wbthomason/packer.nvim', install_path
|
||||
-- Setup lazy.nvim
|
||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if not vim.loop.fs_stat(lazypath) then
|
||||
vim.fn.system({
|
||||
"git",
|
||||
"clone",
|
||||
"--filter=blob:none",
|
||||
"https://github.com/folke/lazy.nvim.git",
|
||||
"--branch=stable", -- latest stable release
|
||||
lazypath,
|
||||
})
|
||||
vim.cmd 'packadd packer.nvim'
|
||||
end
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
-- Source settings
|
||||
require('plugins')
|
||||
require('settings')
|
||||
require("settings")
|
||||
require("lazy").setup("plugins")
|
||||
|
@ -0,0 +1,88 @@
|
||||
{
|
||||
"Comment.nvim": { "branch": "master", "commit": "0236521ea582747b58869cb72f70ccfa967d2e89" },
|
||||
"LuaSnip": { "branch": "master", "commit": "0b4950a237ce441a6a3a947d501622453f6860ea" },
|
||||
"aerial.nvim": { "branch": "master", "commit": "fc04a097d0b0e828dfd508f9b079774bd072431e" },
|
||||
"clipboard-image.nvim": { "branch": "main", "commit": "d1550dc26729b7954f95269952e90471b838fa25" },
|
||||
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
||||
"cmp-cmdline": { "branch": "main", "commit": "8ee981b4a91f536f52add291594e89fb6645e451" },
|
||||
"cmp-git": { "branch": "main", "commit": "f900a4cf117300fdc3ba31d26f8b6223ccd9c574" },
|
||||
"cmp-nvim-lsp": { "branch": "main", "commit": "44b16d11215dce86f253ce0c30949813c0a90765" },
|
||||
"cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "3d8912ebeb56e5ae08ef0906e3a54de1c66b92f1" },
|
||||
"cmp-omni": { "branch": "main", "commit": "9436e6cdd7c5dfa24a99a60d9280b24dbdea3649" },
|
||||
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
||||
"cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" },
|
||||
"colorbuddy.vim": { "branch": "master", "commit": "cdb5b0654d3cafe61d2a845e15b2b4b0e78e752a" },
|
||||
"copilot-cmp": { "branch": "master", "commit": "11eb015fbf9f07ad1c72dbdc9d830ebac610b5cd" },
|
||||
"copilot.lua": { "branch": "master", "commit": "2c942f33ba5c621c906e625e00a1bb504b65e2f0" },
|
||||
"diffview.nvim": { "branch": "main", "commit": "7e5a85c186027cab1e825d018f07c350177077fc" },
|
||||
"doom-one.nvim": { "branch": "main", "commit": "a43528cbd7908ccec7af4587ec8e18be149095bd" },
|
||||
"dressing.nvim": { "branch": "master", "commit": "c1e1d5fa44fe08811b6ef4aadac2b50e602f9504" },
|
||||
"fidget.nvim": { "branch": "main", "commit": "0ba1e16d07627532b6cae915cc992ecac249fb97" },
|
||||
"friendly-snippets": { "branch": "main", "commit": "ebf6d6e83494cdd88a54a429340256f4dbb6a052" },
|
||||
"git-blame.nvim": { "branch": "master", "commit": "41e22dc843c6821a410db57be0b7025154f9d8ec" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "d927caa075df63bf301d92f874efb72fd22fd3b4" },
|
||||
"hex.nvim": { "branch": "master", "commit": "63411ffe59fb8ecc3611367731cf13effc4d706f" },
|
||||
"incline.nvim": { "branch": "main", "commit": "fdd7e08a6e3d0dd8d9aa02428861fa30c37ba306" },
|
||||
"indent-blankline.nvim": { "branch": "master", "commit": "9637670896b68805430e2f72cf5d16be5b97a22a" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "2a9354c7d2368d78cbd5575a51a2af5bd8a6ad01" },
|
||||
"leap.nvim": { "branch": "main", "commit": "5efe985cf68fac3b6a6dfe7a75fbfaca8db2af9c" },
|
||||
"lspkind-nvim": { "branch": "master", "commit": "57610d5ab560c073c465d6faf0c19f200cb67e6e" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "45e27ca739c7be6c49e5496d14fcf45a303c3a63" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "dfdd771b792fbb4bad8e057d72558255695aa1a7" },
|
||||
"mason-tool-installer.nvim": { "branch": "main", "commit": "031903fefbf59371502092ef9e22cab9161d90ba" },
|
||||
"mason.nvim": { "branch": "main", "commit": "ee6a7f179ebf8aa9da9d53b1cf1b57d292ea0182" },
|
||||
"material.nvim": { "branch": "main", "commit": "1ecaa2d065a1ea308bd7702a77c2bf35ede8f536" },
|
||||
"mini.nvim": { "branch": "stable", "commit": "707dca4f4152c2d9c9b4c5e02635f78dfd33db50" },
|
||||
"mkdnflow.nvim": { "branch": "main", "commit": "a728a3533bb57502fdfd6fdb4e5839fc87430edc" },
|
||||
"neo-tree.nvim": { "branch": "v3.x", "commit": "9b5b4c874b13e372500f07c37187ba06c0c1ac0a" },
|
||||
"neoconf.nvim": { "branch": "main", "commit": "9873bc90d7e6bee70ec8f552b4663c3ff51ec7f6" },
|
||||
"neodev.nvim": { "branch": "main", "commit": "dcd34653b0f1d3e7ea9aeb3e37dc7c8da445c4fe" },
|
||||
"neogit": { "branch": "master", "commit": "69482aa8404bf8b4775110393c8248e784fccbf1" },
|
||||
"neotest": { "branch": "master", "commit": "bec7be0f13ee19c85561943fc5f7b8daa4f4d465" },
|
||||
"neotest-go": { "branch": "main", "commit": "f2580cad67ef0181403cf65858ab638ffd3ede9f" },
|
||||
"neotest-jest": { "branch": "main", "commit": "ae559fbd405084ee38dd711eede6d74f3dc1d463" },
|
||||
"neotest-python": { "branch": "master", "commit": "81d2265efac717bb567bc15cc652ae10801286b3" },
|
||||
"nui.nvim": { "branch": "main", "commit": "aa1b4c1e05983ff7debd2b4b2788651db099de2f" },
|
||||
"null-ls.nvim": { "branch": "main", "commit": "0010ea927ab7c09ef0ce9bf28c2b573fc302f5a7" },
|
||||
"nvim-autopairs": { "branch": "master", "commit": "35493556b895f54c129918aca43ae9a63af42a1f" },
|
||||
"nvim-base16": { "branch": "master", "commit": "6247ca9aa9f34644dfa290a6df3f6feefb73eb97" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "5dce1b778b85c717f6614e3f4da45e9f19f54435" },
|
||||
"nvim-colorizer.lua": { "branch": "master", "commit": "36c610a9717cc9ec426a07c8e6bf3b3abcb139d6" },
|
||||
"nvim-dap": { "branch": "master", "commit": "31e1ece773e10448dcb616d5144290946a6264b7" },
|
||||
"nvim-dap-ui": { "branch": "master", "commit": "85b16ac2309d85c88577cd8ee1733ce52be8227e" },
|
||||
"nvim-lightbulb": { "branch": "master", "commit": "8f00b89dd1b1dbde16872bee5fbcee2e58c9b8e9" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "499314f76fa6e8f82f7cfd116578906d61ba2560" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "95d02cdafe704fa5b86eac81f2eb1de3d8f52330" },
|
||||
"nvim-ts-autotag": { "branch": "main", "commit": "6be1192965df35f94b8ea6d323354f7dc7a557e4" },
|
||||
"nvim-ts-context-commentstring": { "branch": "main", "commit": "9bff161dfece6ecf3459e6e46ca42e49f9ed939f" },
|
||||
"nvim-ufo": { "branch": "main", "commit": "890b94870f052773d77175d07a51f2e083210632" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "bc11ee2498de2310de5776477dd9dce65d03b464" },
|
||||
"octo.nvim": { "branch": "master", "commit": "d1e52f9b3c755fcebb93d635821663a2c0f53281" },
|
||||
"onebuddy": { "branch": "main", "commit": "7e16006e7dde15e3cb72889f736c49409db6ff42" },
|
||||
"orgmode": { "branch": "master", "commit": "6cbebbdeb4e6e2b76c6dff338c294eb1fc037427" },
|
||||
"package-info.nvim": { "branch": "master", "commit": "4d98c8cc90d970d87c472c04bf7ca712336cc753" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "0dbe561ae023f02c2fb772b879e905055b939ce3" },
|
||||
"project.nvim": { "branch": "main", "commit": "ceb3fc7606c5599b70a21f9bf79b860ef61d1790" },
|
||||
"promise-async": { "branch": "main", "commit": "e94f35161b8c5d4a4ca3b6ff93dd073eb9214c0e" },
|
||||
"refactoring.nvim": { "branch": "master", "commit": "2ec9bc0fb5f3c8c6a0f776f0159dd2a3b1663554" },
|
||||
"rest.nvim": { "branch": "main", "commit": "22673c848768ff25517154a5aebfebc0c77d0b4f" },
|
||||
"rnvimr": { "branch": "main", "commit": "5f0483d1c107ab1fe7e0af08cdf7900aa0dcb40e" },
|
||||
"schemastore.nvim": { "branch": "main", "commit": "9d7b4c8d1c2ad029234d531871a55c075a116b7d" },
|
||||
"telescope-file-browser.nvim": { "branch": "master", "commit": "ad7b637c72549713b9aaed7c4f9c79c62bcbdff0" },
|
||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "9bc8237565ded606e6c366a71c64c0af25cd7a50" },
|
||||
"telescope-ui-select.nvim": { "branch": "master", "commit": "62ea5e58c7bbe191297b983a9e7e89420f581369" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "776b509f80dd49d8205b9b0d94485568236d1192" },
|
||||
"todo-comments.nvim": { "branch": "main", "commit": "3094ead8edfa9040de2421deddec55d3762f64d1" },
|
||||
"toggleterm.nvim": { "branch": "main", "commit": "b90a1381e9b5b8596f49070ee86c71db267ac868" },
|
||||
"tokyonight.nvim": { "branch": "main", "commit": "9a01eada39558dc3243278e6805d90e8dff45dc0" },
|
||||
"trouble.nvim": { "branch": "main", "commit": "3f85d8ed30e97ceeddbbcf80224245d347053711" },
|
||||
"twilight.nvim": { "branch": "main", "commit": "a4843e6e67092a1e6fa9666f02bf0ab59174c1df" },
|
||||
"typescript.nvim": { "branch": "main", "commit": "4de85ef699d7e6010528dcfbddc2ed4c2c421467" },
|
||||
"vim-blade": { "branch": "master", "commit": "5d729f9be29cdf2ceb3b541e605fa5ef57321daf" },
|
||||
"vim-eunuch": { "branch": "master", "commit": "67f3dd32b4dcd1c427085f42ff5f29c7adc645c6" },
|
||||
"vim-repeat": { "branch": "master", "commit": "24afe922e6a05891756ecf331f39a1f6743d3d5a" },
|
||||
"vim-table-mode": { "branch": "master", "commit": "9555a3e6e5bcf285ec181b7fc983eea90500feb4" },
|
||||
"which-key.nvim": { "branch": "main", "commit": "7ccf476ebe0445a741b64e36c78a682c1c6118b7" },
|
||||
"zen-mode.nvim": { "branch": "main", "commit": "68f554702de63f4b7b6b6d4bcb10178f41a0acc7" },
|
||||
"zk-nvim": { "branch": "main", "commit": "797618aa07f58ceba6f79fb6e777e8e45c51e1ce" }
|
||||
}
|
@ -1,5 +0,0 @@
|
||||
local utils = require('utils')
|
||||
|
||||
utils.opt('o', 'termguicolors', true)
|
||||
vim.g.tokyonight_style = 'night'
|
||||
vim.cmd('colorscheme tokyonight')
|
@ -1,4 +0,0 @@
|
||||
local utils = require("utils")
|
||||
utils.map("n", "<C-l>", "<cmd>noh<CR>") -- Clear highlights
|
||||
utils.map("n", "]q", "<cmd>cn<CR>")
|
||||
utils.map("n", "[q", "<cmd>cp<CR>")
|
@ -0,0 +1,159 @@
|
||||
local setup_cmp = function()
|
||||
local lspkind = require("lspkind")
|
||||
local luasnip = require("luasnip")
|
||||
local cmp = require("cmp")
|
||||
|
||||
local has_words_before = function()
|
||||
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
|
||||
end
|
||||
|
||||
cmp.setup({
|
||||
confirm_opts = {
|
||||
behavior = cmp.ConfirmBehavior.Replace,
|
||||
select = false,
|
||||
},
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
require("luasnip").lsp_expand(args.body)
|
||||
end,
|
||||
},
|
||||
window = {
|
||||
completion = cmp.config.window.bordered(),
|
||||
documentation = cmp.config.window.bordered(),
|
||||
},
|
||||
formatting = {
|
||||
format = lspkind.cmp_format({
|
||||
mode = "symbol_text",
|
||||
maxwidth = 50,
|
||||
before = function(_, vim_item)
|
||||
return vim_item
|
||||
end,
|
||||
}),
|
||||
},
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
["<C-b>"] = cmp.mapping.scroll_docs(-4),
|
||||
["<C-f>"] = cmp.mapping.scroll_docs(4),
|
||||
["<C-Space>"] = cmp.mapping.complete(),
|
||||
["<C-e>"] = cmp.mapping.abort(),
|
||||
["<CR>"] = cmp.mapping.confirm({
|
||||
select = false,
|
||||
}),
|
||||
|
||||
["<Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
elseif luasnip.expand_or_jumpable() then
|
||||
luasnip.expand_or_jump()
|
||||
elseif has_words_before() then
|
||||
-- cmp.complete()
|
||||
fallback()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
|
||||
["<S-Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_prev_item()
|
||||
elseif luasnip.jumpable(-1) then
|
||||
luasnip.jump(-1)
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
}),
|
||||
|
||||
sources = cmp.config.sources({
|
||||
{ name = "copilot" },
|
||||
{ name = "nvim_lsp" },
|
||||
{ name = "luasnip" },
|
||||
{ name = "nvim_lsp_signature_help" },
|
||||
{ name = "nvim_lua" },
|
||||
{ name = "orgmode" },
|
||||
{ name = "path" },
|
||||
{ name = "buffer" },
|
||||
}),
|
||||
})
|
||||
|
||||
-- Set configuration for specific filetype.
|
||||
cmp.setup.filetype("gitcommit", {
|
||||
sources = cmp.config.sources({
|
||||
{ name = "cmp_git" },
|
||||
}, {
|
||||
{ name = "buffer" },
|
||||
}),
|
||||
})
|
||||
|
||||
-- Use buffer source for `/` (if you enabled `native_menu`, this won't work anymore).
|
||||
cmp.setup.cmdline({ "/", "?" }, {
|
||||
mapping = cmp.mapping.preset.cmdline(),
|
||||
sources = {
|
||||
{
|
||||
name = "buffer",
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
-- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore).
|
||||
cmp.setup.cmdline(":", {
|
||||
mapping = cmp.mapping.preset.cmdline(),
|
||||
sources = cmp.config.sources({
|
||||
{
|
||||
name = "path",
|
||||
},
|
||||
}, {
|
||||
{
|
||||
name = "cmdline",
|
||||
},
|
||||
}),
|
||||
})
|
||||
end
|
||||
|
||||
return {
|
||||
{
|
||||
"windwp/nvim-autopairs",
|
||||
event = "InsertEnter",
|
||||
config = true,
|
||||
},
|
||||
"onsails/lspkind-nvim", -- Pretty icons
|
||||
"hrsh7th/cmp-nvim-lsp",
|
||||
"hrsh7th/cmp-buffer",
|
||||
"hrsh7th/cmp-path",
|
||||
"hrsh7th/cmp-cmdline",
|
||||
"hrsh7th/cmp-omni",
|
||||
"hrsh7th/cmp-nvim-lsp-signature-help",
|
||||
{ "petertriho/cmp-git", config = true },
|
||||
{
|
||||
"zbirenbaum/copilot.lua",
|
||||
cmd = "Copilot",
|
||||
build = ":Copilot auth",
|
||||
opts = {
|
||||
suggestion = { enabled = false },
|
||||
panel = { enabled = false },
|
||||
filetypes = {
|
||||
markdown = true,
|
||||
help = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"zbirenbaum/copilot-cmp",
|
||||
dependencies = { "zbirenbaum/copilot.lua" },
|
||||
config = true,
|
||||
},
|
||||
{
|
||||
"hrsh7th/nvim-cmp",
|
||||
init = function()
|
||||
vim.o.completeopt = "menu,menuone,noselect"
|
||||
end,
|
||||
config = setup_cmp,
|
||||
},
|
||||
{
|
||||
"L3MON4D3/LuaSnip",
|
||||
version = "2.*",
|
||||
build = "make install_jsregexp",
|
||||
dependencies = { "rafamadriz/friendly-snippets" },
|
||||
},
|
||||
"saadparwaiz1/cmp_luasnip",
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
return {
|
||||
{
|
||||
"Th3Whit3Wolf/onebuddy",
|
||||
dependencies = { "tjdevries/colorbuddy.vim" },
|
||||
},
|
||||
"RRethy/nvim-base16",
|
||||
"NTBBloodbath/doom-one.nvim",
|
||||
"folke/tokyonight.nvim",
|
||||
"marko-cerovac/material.nvim",
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
return {
|
||||
{
|
||||
"numToStr/Comment.nvim",
|
||||
config = true,
|
||||
opts = {
|
||||
pre_hook = require("ts_context_commentstring.integrations.comment_nvim").create_pre_hook(),
|
||||
},
|
||||
dependencies = {
|
||||
"JoosepAlviste/nvim-ts-context-commentstring",
|
||||
},
|
||||
lazy = false,
|
||||
},
|
||||
}
|
@ -0,0 +1,46 @@
|
||||
return {
|
||||
{
|
||||
"nvim-neo-tree/neo-tree.nvim",
|
||||
branch = "v3.x",
|
||||
cmd = "Neotree",
|
||||
config = true,
|
||||
opts = {
|
||||
filesystem = {
|
||||
use_libuv_file_watcher = true,
|
||||
follow_current_file = {
|
||||
enabled = false, -- This will find and focus the file in the active buffer every time
|
||||
},
|
||||
},
|
||||
},
|
||||
init = function()
|
||||
local wk = require("which-key")
|
||||
|
||||
wk.register({
|
||||
o = {
|
||||
p = { "<cmd>Neotree<CR>", "Open project sidebar" },
|
||||
},
|
||||
}, {
|
||||
prefix = "<leader>",
|
||||
})
|
||||
end,
|
||||
},
|
||||
{
|
||||
"kevinhwang91/rnvimr",
|
||||
init = function()
|
||||
local wk = require("which-key")
|
||||
|
||||
wk.register({
|
||||
f = {
|
||||
r = { "<cmd>RnvimrToggle<CR>", "Toggle Ranger" },
|
||||
},
|
||||
}, {
|
||||
prefix = "<leader>",
|
||||
})
|
||||
|
||||
vim.g.rnvimr_enable_ex = 0
|
||||
vim.g.rnvimr_enable_picker = 1
|
||||
vim.g.rnvimr_enable_bw = 0
|
||||
end,
|
||||
cmd = "RnvimrToggle",
|
||||
},
|
||||
}
|
@ -0,0 +1,114 @@
|
||||
local init_orgmode = function()
|
||||
local wk = require("which-key")
|
||||
|
||||
vim.api.nvim_create_autocmd("BufEnter", {
|
||||
pattern = "*.org",
|
||||
callback = function()
|
||||
vim.wo.foldexpr = "nvim_treesitter#foldexpr()"
|
||||
vim.wo.foldmethod = "expr"
|
||||
end,
|
||||
})
|
||||
|
||||
local wk_open_org_agenda = {
|
||||
[[<cmd>lua require('orgmode').action("agenda.prompt")<CR>]],
|
||||
"Org agenda",
|
||||
}
|
||||
|
||||
wk.register({
|
||||
O = {
|
||||
name = "Org mode",
|
||||
a = wk_open_org_agenda,
|
||||
f = {
|
||||
[[<cmd>lua require('telescope.builtin').find_files{ cwd = '~/.org' }<CR>]],
|
||||
"Find file in notes",
|
||||
},
|
||||
n = {
|
||||
[[<cmd>lua require('orgmode').action("capture.prompt")<CR>]],
|
||||
"Org capture",
|
||||
},
|
||||
s = {
|
||||
[[<cmd>lua require('telescope.builtin').live_grep{ cwd = '~/.org' }<CR>]],
|
||||
"Search notes",
|
||||
},
|
||||
},
|
||||
}, {
|
||||
prefix = "<leader>",
|
||||
})
|
||||
end
|
||||
|
||||
local init_package_info = function()
|
||||
local augroup = vim.api.nvim_create_augroup("PackageJson", {})
|
||||
local patt = { "package.json" }
|
||||
|
||||
local wk = require("which-key")
|
||||
|
||||
vim.api.nvim_clear_autocmds({ group = augroup })
|
||||
vim.api.nvim_create_autocmd("BufEnter", {
|
||||
group = augroup,
|
||||
pattern = patt,
|
||||
callback = function(bufnr)
|
||||
wk.register({
|
||||
s = {
|
||||
function()
|
||||
require("package-info").toggle()
|
||||
end,
|
||||
"Toggle package versions",
|
||||
},
|
||||
d = {
|
||||
function()
|
||||
require("package-info").delete()
|
||||
end,
|
||||
"Delete dependency",
|
||||
},
|
||||
c = {
|
||||
function()
|
||||
require("package-info").change_version()
|
||||
end,
|
||||
"Change dependency version",
|
||||
},
|
||||
a = {
|
||||
function()
|
||||
require("package-info").install()
|
||||
end,
|
||||
"Add new dependency",
|
||||
},
|
||||
u = {
|
||||
function()
|
||||
require("package-info").update()
|
||||
end,
|
||||
"Update dependency",
|
||||
},
|
||||
}, {
|
||||
mode = "n",
|
||||
bufnr = bufnr,
|
||||
prefix = "<localleader>",
|
||||
})
|
||||
end,
|
||||
})
|
||||
end
|
||||
|
||||
return {
|
||||
{ "RaafatTurki/hex.nvim", config = true },
|
||||
"Eduruiz/vim-blade",
|
||||
{
|
||||
"nvim-orgmode/orgmode",
|
||||
opts = {
|
||||
org_agenda_files = {
|
||||
"~/.org/work/*",
|
||||
"~/.org/learning/*",
|
||||
"~/.org/projects/*",
|
||||
"~/.org/calendars/*",
|
||||
"~/.org/conferences/*",
|
||||
},
|
||||
org_default_notes_file = "~/.org/refile.org",
|
||||
},
|
||||
init = init_orgmode,
|
||||
},
|
||||
{
|
||||
"vuki656/package-info.nvim",
|
||||
dependencies = {
|
||||
"MunifTanjim/nui.nvim",
|
||||
},
|
||||
init = init_package_info,
|
||||
},
|
||||
}
|
@ -0,0 +1,125 @@
|
||||
local init = function()
|
||||
local wk = require("which-key")
|
||||
local actions = require("telescope.actions")
|
||||
|
||||
local M = {}
|
||||
|
||||
M.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
|
||||
|
||||
M.file_browser = function()
|
||||
require("telescope").extensions.file_browser.file_browser({
|
||||
cwd = vim.fn.expand("%:p:h"),
|
||||
})
|
||||
end
|
||||
|
||||
require("telescope").setup({
|
||||
defaults = {
|
||||
mappings = {
|
||||
i = {
|
||||
["<esc>"] = actions.close,
|
||||
},
|
||||
},
|
||||
},
|
||||
pickers = {
|
||||
git_files = {
|
||||
show_untracked = true,
|
||||
},
|
||||
find_files = {
|
||||
hidden = true,
|
||||
follow = true,
|
||||
},
|
||||
live_grep = {
|
||||
hidden = true,
|
||||
follow = true,
|
||||
},
|
||||
},
|
||||
extensions = {
|
||||
file_browser = {
|
||||
hidden = true,
|
||||
follow = true,
|
||||
},
|
||||
fzf = {
|
||||
fuzzy = true,
|
||||
override_generic_sorter = true,
|
||||
override_file_sorter = true,
|
||||
case_mode = "smart_case",
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
require("telescope").load_extension("file_browser")
|
||||
require("telescope").load_extension("ui-select")
|
||||
require("telescope").load_extension("fzf")
|
||||
require("telescope").load_extension("projects")
|
||||
|
||||
local browse_files = {
|
||||
function()
|
||||
M.file_browser()
|
||||
end,
|
||||
"Browse files",
|
||||
}
|
||||
local find_file_in_project = {
|
||||
function()
|
||||
M.project_files()
|
||||
end,
|
||||
"Find file in project",
|
||||
}
|
||||
|
||||
wk.register({
|
||||
f = {
|
||||
f = { "<cmd>Telescope find_files<cr>", "Find file" },
|
||||
p = {
|
||||
[[<cmd>lua require('telescope.builtin').git_files{ cwd = '~/.config/nvim/' }<CR>]],
|
||||
"Find config file",
|
||||
},
|
||||
o = { "<cmd>Telescope oldfiles<cr>", "Open recent file" },
|
||||
b = browse_files,
|
||||
},
|
||||
b = {
|
||||
b = { "<cmd>Telescope buffers<CR>", "Switch buffer" },
|
||||
},
|
||||
h = {
|
||||
h = { "<cmd>Telescope help_tags<CR>", "Vim help tags" },
|
||||
m = { "<cmd>Telescope man_pages<CR>", "Man pages" },
|
||||
},
|
||||
p = {
|
||||
p = { "<cmd>Telescope projects<CR>", "Switch to project" },
|
||||
f = find_file_in_project,
|
||||
},
|
||||
g = {
|
||||
c = { "<cmd>Telescope git_commits<CR>", "Checkout commit" },
|
||||
C = { "<cmd>Telescope git_bcommits<CR>", "Checkout buffer commit" },
|
||||
B = { "<cmd>Telescope git_branches<CR>", "Switch branch" },
|
||||
s = { "<cmd>Telescope git_stash<CR>", "Apply stash" },
|
||||
},
|
||||
["<space>"] = find_file_in_project,
|
||||
["."] = browse_files,
|
||||
[","] = { "<cmd>Telescope buffers<CR>", "Switch buffer" },
|
||||
["/"] = { "<cmd>Telescope live_grep<CR>", "Live grep" },
|
||||
}, {
|
||||
prefix = "<leader>",
|
||||
})
|
||||
end
|
||||
|
||||
return {
|
||||
{
|
||||
"nvim-telescope/telescope.nvim",
|
||||
tag = "0.1.2",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
{
|
||||
"nvim-telescope/telescope-fzf-native.nvim",
|
||||
build = "cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build",
|
||||
},
|
||||
"nvim-telescope/telescope-file-browser.nvim",
|
||||
"nvim-telescope/telescope-ui-select.nvim",
|
||||
},
|
||||
init = init,
|
||||
},
|
||||
}
|
@ -0,0 +1,50 @@
|
||||
return {
|
||||
{
|
||||
"kevinhwang91/nvim-ufo",
|
||||
opts = {
|
||||
provider_selector = function(bufnr, filetype, buftype)
|
||||
return { "treesitter", "indent" }
|
||||
end,
|
||||
|
||||
fold_virt_text_handler = function(virtText, lnum, endLnum, width, truncate)
|
||||
local newVirtText = {}
|
||||
local suffix = (" %d "):format(endLnum - lnum)
|
||||
local sufWidth = vim.fn.strdisplaywidth(suffix)
|
||||
local targetWidth = width - sufWidth
|
||||
local curWidth = 0
|
||||
for _, chunk in ipairs(virtText) do
|
||||
local chunkText = chunk[1]
|
||||
local chunkWidth = vim.fn.strdisplaywidth(chunkText)
|
||||
if targetWidth > curWidth + chunkWidth then
|
||||
table.insert(newVirtText, chunk)
|
||||
else
|
||||
chunkText = truncate(chunkText, targetWidth - curWidth)
|
||||
local hlGroup = chunk[2]
|
||||
table.insert(newVirtText, { chunkText, hlGroup })
|
||||
chunkWidth = vim.fn.strdisplaywidth(chunkText)
|
||||
-- str width returned from truncate() may less than 2nd argument, need padding
|
||||
if curWidth + chunkWidth < targetWidth then
|
||||
suffix = suffix .. (" "):rep(targetWidth - curWidth - chunkWidth)
|
||||
end
|
||||
break
|
||||
end
|
||||
curWidth = curWidth + chunkWidth
|
||||
end
|
||||
table.insert(newVirtText, { suffix, "MoreMsg" })
|
||||
return newVirtText
|
||||
end,
|
||||
},
|
||||
init = function()
|
||||
vim.o.fillchars = [[eob: ,fold: ,foldopen:,foldsep: ,foldclose:]]
|
||||
vim.o.foldmethod = "manual"
|
||||
vim.o.foldenable = true
|
||||
vim.o.foldcolumn = "0"
|
||||
vim.o.foldlevel = 99
|
||||
vim.o.foldlevelstart = 99
|
||||
|
||||
vim.keymap.set("n", "zR", require("ufo").openAllFolds)
|
||||
vim.keymap.set("n", "zM", require("ufo").closeAllFolds)
|
||||
end,
|
||||
dependencies = { "nvim-treesitter/nvim-treesitter", "kevinhwang91/promise-async" },
|
||||
},
|
||||
}
|
@ -0,0 +1,89 @@
|
||||
local setup_indent_blankline = function()
|
||||
vim.g.indent_blankline_use_treesitter = true
|
||||
vim.g.indent_blankline_filetype_exclude = {
|
||||
"help",
|
||||
"dashboard",
|
||||
"dashpreview",
|
||||
"coc-explorer",
|
||||
"startify",
|
||||
"vista",
|
||||
"sagahover",
|
||||
"lspinfo",
|
||||
}
|
||||
|
||||
vim.opt.list = true
|
||||
vim.opt.listchars:append("space:⋅")
|
||||
vim.opt.listchars:append("eol:↴")
|
||||
|
||||
require("indent_blankline").setup({
|
||||
space_char_blankline = " ",
|
||||
show_current_context = true,
|
||||
show_current_context_start = true,
|
||||
})
|
||||
|
||||
local wk = require("which-key")
|
||||
|
||||
wk.register({
|
||||
t = {
|
||||
i = {
|
||||
function()
|
||||
vim.cmd("IndentBlanklineToggle!")
|
||||
if vim.g.indent_blankline_enabled then
|
||||
vim.opt.list = true
|
||||
else
|
||||
vim.opt.list = false
|
||||
end
|
||||
end,
|
||||
"Indent guides",
|
||||
},
|
||||
},
|
||||
}, {
|
||||
prefix = "<leader>",
|
||||
})
|
||||
end
|
||||
|
||||
local setup_zen_mode = function()
|
||||
require("zen-mode").setup()
|
||||
|
||||
local wk = require("which-key")
|
||||
|
||||
wk.register({
|
||||
t = {
|
||||
z = { "<cmd>ZenMode<CR>", "Zen mode" },
|
||||
},
|
||||
}, {
|
||||
prefix = "<leader>",
|
||||
})
|
||||
end
|
||||
|
||||
local setup_twilight = function()
|
||||
require("twilight").setup({
|
||||
treesitter = true,
|
||||
expand = {
|
||||
"function",
|
||||
"method",
|
||||
"table",
|
||||
"if_statement",
|
||||
},
|
||||
})
|
||||
|
||||
local wk = require("which-key")
|
||||
|
||||
wk.register({
|
||||
t = {
|
||||
t = { "<cmd>Twilight<CR>", "Twilight" },
|
||||
},
|
||||
}, {
|
||||
prefix = "<leader>",
|
||||
})
|
||||
end
|
||||
|
||||
return {
|
||||
{ "stevearc/dressing.nvim", event = "VeryLazy" },
|
||||
{ "lukas-reineke/indent-blankline.nvim", event = "VeryLazy", init = setup_indent_blankline },
|
||||
{ "folke/zen-mode.nvim", init = setup_zen_mode },
|
||||
{ "folke/twilight.nvim", init = setup_twilight },
|
||||
{ "folke/todo-comments.nvim", requires = "nvim-lua/plenary.nvim" },
|
||||
{ "nvim-tree/nvim-web-devicons", opts = { default = true } },
|
||||
"norcalli/nvim-colorizer.lua",
|
||||
}
|
@ -1 +0,0 @@
|
||||
require("hex").setup()
|
@ -1,41 +0,0 @@
|
||||
vim.g.indent_blankline_use_treesitter = true
|
||||
vim.g.indent_blankline_filetype_exclude = {
|
||||
"help",
|
||||
"dashboard",
|
||||
"dashpreview",
|
||||
"coc-explorer",
|
||||
"startify",
|
||||
"vista",
|
||||
"sagahover",
|
||||
"lspinfo",
|
||||
}
|
||||
|
||||
vim.opt.list = true
|
||||
vim.opt.listchars:append("space:⋅")
|
||||
vim.opt.listchars:append("eol:↴")
|
||||
|
||||
require("indent_blankline").setup({
|
||||
space_char_blankline = " ",
|
||||
show_current_context = true,
|
||||
show_current_context_start = true,
|
||||
})
|
||||
|
||||
local wk = require("which-key")
|
||||
|
||||
wk.register({
|
||||
t = {
|
||||
i = {
|
||||
function()
|
||||
vim.cmd("IndentBlanklineToggle!")
|
||||
if vim.g.indent_blankline_enabled then
|
||||
vim.opt.list = true
|
||||
else
|
||||
vim.opt.list = false
|
||||
end
|
||||
end,
|
||||
"Indent guides",
|
||||
},
|
||||
},
|
||||
}, {
|
||||
prefix = "<leader>",
|
||||
})
|
@ -1,329 +0,0 @@
|
||||
---@diagnostic disable: undefined-global
|
||||
return require("packer").startup(function()
|
||||
use("wbthomason/packer.nvim")
|
||||
|
||||
use("antoinemadec/FixCursorHold.nvim")
|
||||
|
||||
-- Project management
|
||||
use({
|
||||
"ahmedkhalf/project.nvim",
|
||||
config = [[require('plugins.project-nvim')]],
|
||||
})
|
||||
|
||||
-- GUI
|
||||
use("stevearc/dressing.nvim")
|
||||
|
||||
-- Fuzzy finder
|
||||
use({
|
||||
{
|
||||
"nvim-telescope/telescope-fzf-native.nvim",
|
||||
run = "make",
|
||||
},
|
||||
"nvim-telescope/telescope-file-browser.nvim",
|
||||
"nvim-telescope/telescope-ui-select.nvim",
|
||||
{
|
||||
"nvim-telescope/telescope.nvim",
|
||||
requires = { "nvim-lua/plenary.nvim" },
|
||||
config = [[require('plugins.telescope-nvim')]],
|
||||
},
|
||||
})
|
||||
|
||||
-- File explorer
|
||||
use({
|
||||
"kevinhwang91/rnvimr",
|
||||
config = [[require('plugins.rnvimr')]],
|
||||
})
|
||||
|
||||
use({
|
||||
"kyazdani42/nvim-tree.lua",
|
||||
config = [[require('plugins.nvim-tree')]],
|
||||
})
|
||||
|
||||
-- Refactor
|
||||
use({
|
||||
"ThePrimeagen/refactoring.nvim",
|
||||
requires = {
|
||||
{ "nvim-lua/plenary.nvim" },
|
||||
{ "nvim-treesitter/nvim-treesitter" },
|
||||
},
|
||||
config = [[ require('refactoring').setup({}) ]],
|
||||
})
|
||||
|
||||
-- LSP
|
||||
use({
|
||||
"folke/lsp-colors.nvim", -- Color groups
|
||||
"WhoIsSethDaniel/mason-tool-installer.nvim",
|
||||
"williamboman/mason.nvim",
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
"folke/neodev.nvim", -- Lua
|
||||
"jose-elias-alvarez/typescript.nvim", -- Typsecript
|
||||
"jose-elias-alvarez/null-ls.nvim", -- Tooling
|
||||
"stevearc/aerial.nvim", -- Outline
|
||||
"b0o/schemastore.nvim", -- JSON schemas
|
||||
"folke/trouble.nvim", -- Diagnostics
|
||||
"kosayoda/nvim-lightbulb", -- Lightbulb
|
||||
"j-hui/fidget.nvim", -- LSP Status indicator
|
||||
{
|
||||
"neovim/nvim-lspconfig", -- Config
|
||||
config = [[require('plugins.lsp')]],
|
||||
},
|
||||
})
|
||||
|
||||
-- Buffer line
|
||||
-- use {
|
||||
-- 'akinsho/bufferline.nvim',
|
||||
-- tag = "v2.*",
|
||||
-- requires = 'kyazdani42/nvim-web-devicons',
|
||||
-- config = function() require("bufferline").setup {} end
|
||||
-- }
|
||||
|
||||
-- Completion
|
||||
use({
|
||||
"onsails/lspkind-nvim", -- Pretty icons
|
||||
"hrsh7th/cmp-nvim-lsp",
|
||||
"hrsh7th/cmp-buffer",
|
||||
"hrsh7th/cmp-path",
|
||||
"hrsh7th/cmp-cmdline",
|
||||
"hrsh7th/cmp-omni",
|
||||
"petertriho/cmp-git",
|
||||
"hrsh7th/cmp-nvim-lsp-signature-help",
|
||||
{
|
||||
"zbirenbaum/copilot-cmp",
|
||||
requires = { "zbirenbaum/copilot.lua" },
|
||||
},
|
||||
{
|
||||
"hrsh7th/nvim-cmp",
|
||||
config = [[require('plugins.nvim-cmp')]],
|
||||
},
|
||||
})
|
||||
|
||||
-- Snippets
|
||||
use("L3MON4D3/LuaSnip")
|
||||
use("saadparwaiz1/cmp_luasnip")
|
||||
use("rafamadriz/friendly-snippets")
|
||||
|
||||
-- Comments
|
||||
use({
|
||||
"numToStr/Comment.nvim",
|
||||
config = function()
|
||||
require("Comment").setup()
|
||||
end,
|
||||
})
|
||||
|
||||
-- Autopairs
|
||||
use({
|
||||
"windwp/nvim-autopairs",
|
||||
config = function()
|
||||
require("nvim-autopairs").setup()
|
||||
end,
|
||||
})
|
||||
|
||||
-- Tree-sitter
|
||||
use({
|
||||
"JoosepAlviste/nvim-ts-context-commentstring",
|
||||
"windwp/nvim-ts-autotag", -- XML-like auto tags
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
run = ":TSUpdate",
|
||||
config = [[require('plugins.nvim-treesitter')]],
|
||||
},
|
||||
{
|
||||
"nvim-orgmode/orgmode",
|
||||
config = [[require('plugins.orgmode-nvim')]],
|
||||
},
|
||||
})
|
||||
|
||||
-- Note taking
|
||||
use({
|
||||
{
|
||||
"jakewvincent/mkdnflow.nvim",
|
||||
rocks = "luautf8",
|
||||
},
|
||||
"ekickx/clipboard-image.nvim",
|
||||
{
|
||||
"mickael-menu/zk-nvim",
|
||||
config = [[require('plugins.notes')]],
|
||||
},
|
||||
})
|
||||
|
||||
-- Terminal
|
||||
use({
|
||||
"akinsho/toggleterm.nvim",
|
||||
tag = "v2.*",
|
||||
config = [[require('plugins.term')]],
|
||||
})
|
||||
|
||||
-- Git
|
||||
use({
|
||||
{
|
||||
"lewis6991/gitsigns.nvim",
|
||||
requires = "nvim-lua/plenary.nvim",
|
||||
},
|
||||
"tpope/vim-fugitive",
|
||||
"TimUntersberger/neogit",
|
||||
"f-person/git-blame.nvim",
|
||||
{
|
||||
"sindrets/diffview.nvim",
|
||||
requires = "nvim-lua/plenary.nvim",
|
||||
},
|
||||
{
|
||||
"pwntester/octo.nvim",
|
||||
requires = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"nvim-telescope/telescope.nvim",
|
||||
"kyazdani42/nvim-web-devicons",
|
||||
},
|
||||
config = [[require('plugins.git')]],
|
||||
},
|
||||
})
|
||||
|
||||
-- Indent lines
|
||||
use({
|
||||
"lukas-reineke/indent-blankline.nvim",
|
||||
config = [[require('plugins.indent-blankline-nvim')]],
|
||||
})
|
||||
|
||||
-- Handy stuff
|
||||
use({
|
||||
"echasnovski/mini.nvim",
|
||||
branch = "stable",
|
||||
config = function()
|
||||
require("mini.jump").setup({})
|
||||
require("mini.bufremove").setup({})
|
||||
end,
|
||||
})
|
||||
use({
|
||||
"ggandor/leap.nvim",
|
||||
requires = {
|
||||
"tpope/vim-repeat",
|
||||
},
|
||||
config = function()
|
||||
require("leap").set_default_keymaps()
|
||||
end,
|
||||
})
|
||||
|
||||
use({
|
||||
"ygm2/rooter.nvim",
|
||||
config = function()
|
||||
vim.g.outermost_root = false
|
||||
end,
|
||||
})
|
||||
use({ "dhruvasagar/vim-table-mode" })
|
||||
use({ "tpope/vim-eunuch" })
|
||||
|
||||
use({
|
||||
"folke/which-key.nvim",
|
||||
config = [[require('plugins.which-key')]],
|
||||
})
|
||||
|
||||
use({
|
||||
"folke/zen-mode.nvim",
|
||||
config = [[require('plugins.zen-mode-nvim')]],
|
||||
})
|
||||
|
||||
use({
|
||||
"folke/twilight.nvim",
|
||||
config = [[require('plugins.twilight-nvim')]],
|
||||
})
|
||||
|
||||
use({
|
||||
"folke/todo-comments.nvim",
|
||||
requires = "nvim-lua/plenary.nvim",
|
||||
config = function()
|
||||
require("todo-comments").setup()
|
||||
end,
|
||||
})
|
||||
|
||||
-- Statusline
|
||||
-- use {
|
||||
-- 'ojroques/nvim-hardline',
|
||||
-- config = [[require('plugins.hardline')]]
|
||||
-- }
|
||||
|
||||
use({
|
||||
"b0o/incline.nvim",
|
||||
{
|
||||
"hoob3rt/lualine.nvim",
|
||||
requires = {
|
||||
"kyazdani42/nvim-web-devicons",
|
||||
opt = true,
|
||||
},
|
||||
config = [[require('plugins.lualine')]],
|
||||
},
|
||||
})
|
||||
|
||||
-- Folding
|
||||
-- use({
|
||||
-- "kevinhwang91/nvim-ufo",
|
||||
-- requires = "kevinhwang91/promise-async",
|
||||
-- config = [[require('plugins.nvim-ufo')]],
|
||||
-- })
|
||||
|
||||
-- Color highlighting
|
||||
use({
|
||||
"norcalli/nvim-colorizer.lua",
|
||||
config = function()
|
||||
require("colorizer").setup()
|
||||
end,
|
||||
})
|
||||
|
||||
-- Colorschemes
|
||||
use({
|
||||
"Th3Whit3Wolf/onebuddy",
|
||||
requires = { "tjdevries/colorbuddy.vim" },
|
||||
})
|
||||
use({ "RRethy/nvim-base16" })
|
||||
use({ "NTBBloodbath/doom-one.nvim" })
|
||||
use({ "folke/tokyonight.nvim" })
|
||||
use({ "marko-cerovac/material.nvim" })
|
||||
|
||||
use({
|
||||
"kyazdani42/nvim-web-devicons",
|
||||
config = [[require('plugins.nvim-web-devicons')]],
|
||||
})
|
||||
|
||||
-- package.json
|
||||
use("vuki656/package-info.nvim")
|
||||
|
||||
-- Blade
|
||||
use({ "Eduruiz/vim-blade" })
|
||||
|
||||
-- DAP
|
||||
use({
|
||||
"mfussenegger/nvim-dap",
|
||||
{
|
||||
"rcarriga/nvim-dap-ui",
|
||||
config = [[require('plugins.debugging')]],
|
||||
},
|
||||
})
|
||||
|
||||
-- Test runner
|
||||
use({
|
||||
"nvim-neotest/neotest",
|
||||
requires = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
"antoinemadec/FixCursorHold.nvim",
|
||||
-- {
|
||||
-- "nvim-neotest/neotest-jest",
|
||||
-- commit = "219033658bf8de6b91e201036a5cc5456905d9d2",
|
||||
-- },
|
||||
"nvim-neotest/neotest-jest",
|
||||
"nvim-neotest/neotest-go",
|
||||
"nvim-neotest/neotest-python",
|
||||
},
|
||||
config = [[require('plugins.testing')]],
|
||||
})
|
||||
|
||||
-- REST
|
||||
use({
|
||||
"rest-nvim/rest.nvim",
|
||||
config = [[require('plugins.rest')]],
|
||||
})
|
||||
|
||||
-- Hex
|
||||
use({
|
||||
"RaafatTurki/hex.nvim",
|
||||
config = [[require('plugins.hex')]],
|
||||
})
|
||||
end)
|
@ -0,0 +1,81 @@
|
||||
local init = function()
|
||||
local wk = require("which-key")
|
||||
|
||||
wk.register({
|
||||
f = {
|
||||
name = "File",
|
||||
C = {
|
||||
function()
|
||||
vim.api.nvim_input(":Copy " .. vim.fn.expand("%"))
|
||||
end,
|
||||
"Copy file",
|
||||
},
|
||||
R = {
|
||||
function()
|
||||
vim.api.nvim_input(":Move " .. vim.fn.expand("%"))
|
||||
end,
|
||||
"Rename/move file",
|
||||
},
|
||||
D = {
|
||||
function()
|
||||
vim.api.nvim_input(":Delete")
|
||||
end,
|
||||
"Delete file",
|
||||
},
|
||||
P = {
|
||||
function()
|
||||
print(vim.fn.expand("%:p"))
|
||||
end,
|
||||
"Print absolute path",
|
||||
},
|
||||
},
|
||||
b = {
|
||||
name = "Buffer",
|
||||
d = { "<cmd>bdel<CR>", "Delete buffer" },
|
||||
s = { "<cmd>write<CR>", "Save buffer" },
|
||||
},
|
||||
c = {
|
||||
name = "Code",
|
||||
},
|
||||
h = {
|
||||
name = "Help",
|
||||
},
|
||||
p = {
|
||||
name = "Project",
|
||||
},
|
||||
n = {
|
||||
name = "Note",
|
||||
},
|
||||
t = {
|
||||
name = "Toggle",
|
||||
},
|
||||
g = {
|
||||
name = "Git",
|
||||
},
|
||||
r = {
|
||||
name = "Run",
|
||||
},
|
||||
o = {
|
||||
name = "Open",
|
||||
t = { '<cmd>exe v:count1 . "ToggleTerm"<CR>', "Open terminal" },
|
||||
T = { "<cmd>terminal<CR>", "Open terminal here" },
|
||||
},
|
||||
w = {
|
||||
name = "Window",
|
||||
d = { "<cmd>close<CR>", "Close window" },
|
||||
v = { "<cmd>vsplit<CR>", "Vertical split" },
|
||||
s = { "<cmd>split<CR>", "Horizontal split" },
|
||||
},
|
||||
q = {
|
||||
name = "Quit",
|
||||
q = { "<cmd>qa<CR>", "Quit nvim" },
|
||||
},
|
||||
}, {
|
||||
prefix = "<leader>",
|
||||
})
|
||||
end
|
||||
|
||||
return {
|
||||
"folke/which-key.nvim",
|
||||
init = init,
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
local utils = require('utils')
|
||||
local opts = { noremap = true, silent = true }
|
||||
|
||||
utils.map('n', '<leader>gg', '<cmd>LazyGit<CR>', opts)
|
||||
utils.map('n', '<leader>gc', '<cmd>LazyGitConfig<CR>', opts)
|
||||
|
||||
vim.env.GIT_EDITOR = 'nvr --remote-wait'
|
||||
vim.g.lazygit_floating_window_use_plenary = 1
|
||||
vim.g.lazygit_use_neovim_remote = 1
|
@ -1,42 +0,0 @@
|
||||
local lualine = require("lualine")
|
||||
|
||||
local conditions = {
|
||||
buffer_not_empty = function()
|
||||
return vim.fn.empty(vim.fn.expand("%:t")) ~= 1
|
||||
end,
|
||||
}
|
||||
|
||||
-- Config
|
||||
local config = {
|
||||
options = {
|
||||
-- Disable sections and component separators
|
||||
component_separators = "",
|
||||
section_separators = "",
|
||||
disabled_filetypes = { "NvimTree" },
|
||||
globalstatus = true,
|
||||
theme = tokyonight,
|
||||
},
|
||||
sections = {
|
||||
-- these are to remove the defaults
|
||||
lualine_a = { "mode" },
|
||||
lualine_b = { "branch", "diff" },
|
||||
lualine_c = {},
|
||||
lualine_x = { "location", "progress" },
|
||||
lualine_y = { "diagnostics", "filetype" },
|
||||
lualine_z = {},
|
||||
},
|
||||
}
|
||||
|
||||
table.insert(config.sections.lualine_c, {
|
||||
"filename",
|
||||
condition = conditions.buffer_not_empty,
|
||||
path = 1,
|
||||
})
|
||||
|
||||
lualine.setup(config)
|
||||
|
||||
require("incline").setup({
|
||||
hide = {
|
||||
cursorline = true,
|
||||
},
|
||||
})
|
@ -1,120 +0,0 @@
|
||||
local utils = require("utils")
|
||||
local lspkind = require("lspkind")
|
||||
local luasnip = require("luasnip")
|
||||
local cmp = require("cmp")
|
||||
|
||||
local has_words_before = function()
|
||||
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
|
||||
end
|
||||
|
||||
utils.opt("o", "completeopt", "menu,menuone,noselect")
|
||||
|
||||
cmp.setup({
|
||||
confirm_opts = {
|
||||
behavior = cmp.ConfirmBehavior.Replace,
|
||||
select = false,
|
||||
},
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
require("luasnip").lsp_expand(args.body)
|
||||
end,
|
||||
},
|
||||
window = {
|
||||
completion = cmp.config.window.bordered(),
|
||||
documentation = cmp.config.window.bordered(),
|
||||
},
|
||||
formatting = {
|
||||
format = lspkind.cmp_format({
|
||||
mode = "symbol_text",
|
||||
maxwidth = 50,
|
||||
before = function(_, vim_item)
|
||||
return vim_item
|
||||
end,
|
||||
}),
|
||||
},
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
["<C-b>"] = cmp.mapping.scroll_docs(-4),
|
||||
["<C-f>"] = cmp.mapping.scroll_docs(4),
|
||||
["<C-Space>"] = cmp.mapping.complete(),
|
||||
["<C-e>"] = cmp.mapping.abort(),
|
||||
["<CR>"] = cmp.mapping.confirm({
|
||||
select = false,
|
||||
}),
|
||||
|
||||
["<Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
elseif luasnip.expand_or_jumpable() then
|
||||
luasnip.expand_or_jump()
|
||||
elseif has_words_before() then
|
||||
-- cmp.complete()
|
||||
fallback()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
|
||||
["<S-Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_prev_item()
|
||||
elseif luasnip.jumpable(-1) then
|
||||
luasnip.jump(-1)
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
}),
|
||||
|
||||
sources = cmp.config.sources({
|
||||
{ name = "copilot" },
|
||||
{ name = "nvim_lsp" },
|
||||
{ name = "luasnip" },
|
||||
{ name = "nvim_lsp_signature_help" },
|
||||
{ name = "nvim_lua" },
|
||||
{ name = "orgmode" },
|
||||
{ name = "path" },
|
||||
{ name = "buffer" },
|
||||
}),
|
||||
})
|
||||
|
||||
-- Set configuration for specific filetype.
|
||||
cmp.setup.filetype("gitcommit", {
|
||||
sources = cmp.config.sources({
|
||||
{ name = "cmp_git" },
|
||||
}, {
|
||||
{ name = "buffer" },
|
||||
}),
|
||||
})
|
||||
|
||||
-- Use buffer source for `/` (if you enabled `native_menu`, this won't work anymore).
|
||||
cmp.setup.cmdline({ "/", "?" }, {
|
||||
mapping = cmp.mapping.preset.cmdline(),
|
||||
sources = {
|
||||
{
|
||||
name = "buffer",
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
-- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore).
|
||||
cmp.setup.cmdline(":", {
|
||||
mapping = cmp.mapping.preset.cmdline(),
|
||||
sources = cmp.config.sources({
|
||||
{
|
||||
name = "path",
|
||||
},
|
||||
}, {
|
||||
{
|
||||
name = "cmdline",
|
||||
},
|
||||
}),
|
||||
})
|
||||
|
||||
require("cmp_git").setup()
|
||||
|
||||
require("copilot").setup({
|
||||
suggestion = { enabled = false },
|
||||
panel = { enabled = false },
|
||||
})
|
||||
require("copilot_cmp").setup()
|
@ -1,85 +0,0 @@
|
||||
local wk = require("which-key")
|
||||
|
||||
wk.register({
|
||||
o = {
|
||||
p = { "<cmd>NvimTreeToggle<CR>", "Open project sidebar" },
|
||||
},
|
||||
}, {
|
||||
prefix = "<leader>",
|
||||
})
|
||||
|
||||
require("nvim-tree").setup({
|
||||
auto_reload_on_write = true,
|
||||
create_in_closed_folder = false,
|
||||
disable_netrw = false,
|
||||
hijack_netrw = true,
|
||||
hijack_unnamed_buffer_when_opening = false,
|
||||
open_on_tab = false,
|
||||
sort_by = "name",
|
||||
update_cwd = true,
|
||||
reload_on_bufenter = false,
|
||||
respect_buf_cwd = true,
|
||||
hijack_cursor = false,
|
||||
update_focused_file = {
|
||||
enable = true,
|
||||
update_cwd = true,
|
||||
ignore_list = {},
|
||||
},
|
||||
system_open = {
|
||||
cmd = nil,
|
||||
args = {},
|
||||
},
|
||||
view = {
|
||||
width = 30,
|
||||
side = "left",
|
||||
signcolumn = "no",
|
||||
mappings = {
|
||||
custom_only = false,
|
||||
list = {},
|
||||
},
|
||||
},
|
||||
git = {
|
||||
ignore = false,
|
||||
},
|
||||
renderer = {
|
||||
special_files = {},
|
||||
group_empty = false,
|
||||
highlight_git = true,
|
||||
icons = {
|
||||
git_placement = "before",
|
||||
show = {
|
||||
file = true,
|
||||
folder = true,
|
||||
folder_arrow = true,
|
||||
git = true,
|
||||
},
|
||||
glyphs = {
|
||||
default = "",
|
||||
symlink = "",
|
||||
git = {
|
||||
unstaged = "",
|
||||
staged = "",
|
||||
unmerged = "",
|
||||
renamed = "",
|
||||
untracked = "",
|
||||
deleted = "",
|
||||
ignored = "",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
diagnostics = {
|
||||
enable = false,
|
||||
show_on_dirs = false,
|
||||
icons = {
|
||||
hint = "",
|
||||
info = "",
|
||||
warning = "",
|
||||
error = "",
|
||||
},
|
||||
},
|
||||
trash = {
|
||||
cmd = "trash",
|
||||
require_confirm = true,
|
||||
},
|
||||
})
|
@ -1,34 +0,0 @@
|
||||
local utils = require("utils")
|
||||
local tsconf = require("nvim-treesitter.configs")
|
||||
|
||||
require("orgmode").setup_ts_grammar()
|
||||
require("nvim-ts-autotag").setup()
|
||||
|
||||
if not tsconf then
|
||||
vim.cmd([[ echom 'Cannot load `nvim-treesitter.configs`' ]])
|
||||
return
|
||||
end
|
||||
|
||||
tsconf.setup({
|
||||
ensure_installed = "all",
|
||||
ignore_install = { "phpdoc" },
|
||||
highlight = {
|
||||
enable = true,
|
||||
additional_vim_regex_highlighting = { "org" },
|
||||
},
|
||||
indent = {
|
||||
enable = true,
|
||||
},
|
||||
incremental_selection = {
|
||||
enable = true,
|
||||
keymaps = {
|
||||
init_selection = "gnn",
|
||||
node_incremental = "grn",
|
||||
scope_incremental = "grc",
|
||||
node_decremental = "grm",
|
||||
},
|
||||
},
|
||||
context_commentstring = {
|
||||
enable = true,
|
||||
},
|
||||
})
|
@ -1,44 +0,0 @@
|
||||
vim.o.fillchars = [[eob: ,fold: ,foldopen:,foldsep: ,foldclose:]]
|
||||
|
||||
vim.o.foldenable = true
|
||||
vim.o.foldmethod = "manual"
|
||||
vim.o.foldcolumn = "1"
|
||||
vim.o.foldlevel = 99
|
||||
vim.o.foldlevelstart = 99
|
||||
|
||||
local handler = function(virtText, lnum, endLnum, width, truncate)
|
||||
local newVirtText = {}
|
||||
local suffix = (" %d "):format(endLnum - lnum)
|
||||
local sufWidth = vim.fn.strdisplaywidth(suffix)
|
||||
local targetWidth = width - sufWidth
|
||||
local curWidth = 0
|
||||
for _, chunk in ipairs(virtText) do
|
||||
local chunkText = chunk[1]
|
||||
local chunkWidth = vim.fn.strdisplaywidth(chunkText)
|
||||
if targetWidth > curWidth + chunkWidth then
|
||||
table.insert(newVirtText, chunk)
|
||||
else
|
||||
chunkText = truncate(chunkText, targetWidth - curWidth)
|
||||
local hlGroup = chunk[2]
|
||||
table.insert(newVirtText, { chunkText, hlGroup })
|
||||
chunkWidth = vim.fn.strdisplaywidth(chunkText)
|
||||
-- str width returned from truncate() may less than 2nd argument, need padding
|
||||
if curWidth + chunkWidth < targetWidth then
|
||||
suffix = suffix .. (" "):rep(targetWidth - curWidth - chunkWidth)
|
||||
end
|
||||
break
|
||||
end
|
||||
curWidth = curWidth + chunkWidth
|
||||
end
|
||||
table.insert(newVirtText, { suffix, "MoreMsg" })
|
||||
return newVirtText
|
||||
end
|
||||
|
||||
vim.keymap.set("n", "zR", require("ufo").openAllFolds)
|
||||
vim.keymap.set("n", "zM", require("ufo").closeAllFolds)
|
||||
|
||||
require("ufo").setup({
|
||||
provider_selector = function()
|
||||
return { "treesitter", "indent" }
|
||||
end,
|
||||
})
|
@ -1,3 +0,0 @@
|
||||
require'nvim-web-devicons'.setup {
|
||||
default = true;
|
||||
}
|
@ -1,46 +0,0 @@
|
||||
local wk = require("which-key")
|
||||
|
||||
require("orgmode").setup({
|
||||
org_agenda_files = {
|
||||
"~/.org/work/*",
|
||||
"~/org/learning/*",
|
||||
"~/.org/projects/*",
|
||||
"~/.org/calendars/*",
|
||||
"~/.org/conferences/*",
|
||||
},
|
||||
org_default_notes_file = "~/.org/refile.org",
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd("BufEnter", {
|
||||
pattern = "*.org",
|
||||
callback = function()
|
||||
vim.wo.foldexpr = "nvim_treesitter#foldexpr()"
|
||||
vim.wo.foldmethod = "expr"
|
||||
end,
|
||||
})
|
||||
|
||||
local wk_open_org_agenda = {
|
||||
[[<cmd>lua require('orgmode').action("agenda.prompt")<CR>]],
|
||||
"Org agenda",
|
||||
}
|
||||
|
||||
wk.register({
|
||||
O = {
|
||||
name = "Org mode",
|
||||
a = wk_open_org_agenda,
|
||||
f = {
|
||||
[[<cmd>lua require('telescope.builtin').find_files{ cwd = '~/.org' }<CR>]],
|
||||
"Find file in notes",
|
||||
},
|
||||
n = {
|
||||
[[<cmd>lua require('orgmode').action("capture.prompt")<CR>]],
|
||||
"Org capture",
|
||||
},
|
||||
s = {
|
||||
[[<cmd>lua require('telescope.builtin').live_grep{ cwd = '~/.org' }<CR>]],
|
||||
"Search notes",
|
||||
},
|
||||
},
|
||||
}, {
|
||||
prefix = "<leader>",
|
||||
})
|
@ -1,20 +0,0 @@
|
||||
require("project_nvim").setup({
|
||||
manual_mode = false,
|
||||
detection_methods = { "lsp", "pattern" },
|
||||
patterns = {
|
||||
".git",
|
||||
"_darcs",
|
||||
".hg",
|
||||
".bzr",
|
||||
".svn",
|
||||
"Makefile",
|
||||
"package.json",
|
||||
".luarc.json",
|
||||
".zk",
|
||||
},
|
||||
ignore_lsp = {},
|
||||
exclude_dirs = {},
|
||||
show_hidden = true,
|
||||
silent_chdir = true,
|
||||
datapath = vim.fn.stdpath("data"),
|
||||
})
|
@ -0,0 +1,26 @@
|
||||
return {
|
||||
{
|
||||
-- "ahmedkhalf/project.nvim",
|
||||
"hawk78/project.nvim",
|
||||
config = function(_, opts)
|
||||
require("project_nvim").setup(opts)
|
||||
end,
|
||||
opts = {
|
||||
manual_mode = true,
|
||||
detection_methods = { "lsp", "pattern" },
|
||||
patterns = {
|
||||
".git",
|
||||
"Makefile",
|
||||
"package.json",
|
||||
".luarc.json",
|
||||
"lazy-lock.json",
|
||||
".zk",
|
||||
},
|
||||
ignore_lsp = {},
|
||||
exclude_dirs = {},
|
||||
show_hidden = true,
|
||||
silent_chdir = true,
|
||||
datapath = vim.fn.stdpath("data"),
|
||||
},
|
||||
},
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
local wk = require("which-key")
|
||||
|
||||
wk.register({
|
||||
f = {
|
||||
r = {"<cmd>RnvimrToggle<CR>", "Toggle Ranger"}
|
||||
}
|
||||
}, {
|
||||
prefix = "<leader>"
|
||||
})
|
||||
|
||||
vim.g.rnvimr_enable_ex = 0
|
||||
vim.g.rnvimr_enable_picker = 1
|
||||
vim.g.rnvimr_enable_bw = 0
|
@ -0,0 +1,44 @@
|
||||
return {
|
||||
{
|
||||
"b0o/incline.nvim",
|
||||
opts = {
|
||||
hide = {
|
||||
cursorline = true,
|
||||
},
|
||||
},
|
||||
lazy = false,
|
||||
config = true,
|
||||
},
|
||||
{
|
||||
"hoob3rt/lualine.nvim",
|
||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||
opts = {
|
||||
options = {
|
||||
-- Disable sections and component separators
|
||||
component_separators = "",
|
||||
section_separators = "",
|
||||
disabled_filetypes = { "neo-tree" },
|
||||
globalstatus = true,
|
||||
theme = "tokyonight",
|
||||
},
|
||||
sections = {
|
||||
-- these are to remove the defaults
|
||||
lualine_a = { "mode" },
|
||||
lualine_b = { "branch", "diff" },
|
||||
lualine_c = {
|
||||
{
|
||||
"filename",
|
||||
condition = function()
|
||||
return vim.fn.empty(vim.fn.expand("%:t")) ~= 1
|
||||
end,
|
||||
path = 1,
|
||||
},
|
||||
},
|
||||
lualine_x = { "location", "progress" },
|
||||
lualine_y = { "diagnostics", "filetype" },
|
||||
lualine_z = {},
|
||||
},
|
||||
},
|
||||
config = true,
|
||||
},
|
||||
}
|
@ -1,108 +0,0 @@
|
||||
local wk = require("which-key")
|
||||
local actions = require("telescope.actions")
|
||||
|
||||
local M = {}
|
||||
|
||||
M.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
|
||||
|
||||
M.file_browser = function()
|
||||
require("telescope").extensions.file_browser.file_browser({
|
||||
cwd = vim.fn.expand("%:p:h"),
|
||||
})
|
||||
end
|
||||
|
||||
require("telescope").setup({
|
||||
defaults = {
|
||||
mappings = {
|
||||
i = {
|
||||
["<esc>"] = actions.close,
|
||||
},
|
||||
},
|
||||
},
|
||||
pickers = {
|
||||
git_files = {
|
||||
show_untracked = true,
|
||||
},
|
||||
find_files = {
|
||||
hidden = true,
|
||||
follow = true,
|
||||
},
|
||||
live_grep = {
|
||||
hidden = true,
|
||||
follow = true,
|
||||
},
|
||||
},
|
||||
extensions = {
|
||||
file_browser = {
|
||||
hidden = true,
|
||||
follow = true,
|
||||
},
|
||||
fzf = {
|
||||
fuzzy = true,
|
||||
override_generic_sorter = true,
|
||||
override_file_sorter = true,
|
||||
case_mode = "smart_case",
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
require("telescope").load_extension("file_browser")
|
||||
require("telescope").load_extension("ui-select")
|
||||
require("telescope").load_extension("fzf")
|
||||
require("telescope").load_extension("projects")
|
||||
|
||||
local browse_files = {
|
||||
function()
|
||||
M.file_browser()
|
||||
end,
|
||||
"Browse files",
|
||||
}
|
||||
local find_file_in_project = {
|
||||
function()
|
||||
M.project_files()
|
||||
end,
|
||||
"Find file in project",
|
||||
}
|
||||
|
||||
wk.register({
|
||||
f = {
|
||||
f = { "<cmd>Telescope find_files<cr>", "Find file" },
|
||||
p = {
|
||||
[[<cmd>lua require('telescope.builtin').git_files{ cwd = '~/.config/nvim/' }<CR>]],
|
||||
"Find config file",
|
||||
},
|
||||
o = { "<cmd>Telescope oldfiles<cr>", "Open recent file" },
|
||||
b = browse_files,
|
||||
},
|
||||
b = {
|
||||
b = { "<cmd>Telescope buffers<CR>", "Switch buffer" },
|
||||
},
|
||||
h = {
|
||||
h = { "<cmd>Telescope help_tags<CR>", "Vim help tags" },
|
||||
m = { "<cmd>Telescope man_pages<CR>", "Man pages" },
|
||||
},
|
||||
p = {
|
||||
p = { "<cmd>Telescope projects<CR>", "Switch to project" },
|
||||
f = find_file_in_project,
|
||||
},
|
||||
g = {
|
||||
c = { "<cmd>Telescope git_commits<CR>", "Checkout commit" },
|
||||
C = { "<cmd>Telescope git_bcommits<CR>", "Checkout buffer commit" },
|
||||
B = { "<cmd>Telescope git_branches<CR>", "Switch branch" },
|
||||
s = { "<cmd>Telescope git_stash<CR>", "Apply stash" },
|
||||
},
|
||||
["<space>"] = find_file_in_project,
|
||||
["."] = browse_files,
|
||||
[","] = { "<cmd>Telescope buffers<CR>", "Switch buffer" },
|
||||
["/"] = { "<cmd>Telescope live_grep<CR>", "Live grep" },
|
||||
}, {
|
||||
prefix = "<leader>",
|
||||
})
|
||||
|
||||
return M
|
@ -0,0 +1,115 @@
|
||||
return {
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
build = ":TSUpdate",
|
||||
config = function()
|
||||
local configs = require("nvim-treesitter.configs")
|
||||
|
||||
if not configs then
|
||||
vim.cmd([[ echom 'Cannot load `nvim-treesitter.configs`' ]])
|
||||
return
|
||||
end
|
||||
|
||||
require("orgmode").setup_ts_grammar()
|
||||
require("nvim-ts-autotag").setup()
|
||||
|
||||
configs.setup({
|
||||
ensure_installed = {
|
||||
"arduino",
|
||||
"bash",
|
||||
"bibtex",
|
||||
"c",
|
||||
"c_sharp",
|
||||
"cmake",
|
||||
"clojure",
|
||||
"commonlisp",
|
||||
"cpp",
|
||||
"css",
|
||||
"csv",
|
||||
"dart",
|
||||
"diff",
|
||||
"dockerfile",
|
||||
"dot",
|
||||
"fennel",
|
||||
"fish",
|
||||
"gdscript",
|
||||
"git_config",
|
||||
"git_rebase",
|
||||
"gitattributes",
|
||||
"gitcommit",
|
||||
"gitignore",
|
||||
"go",
|
||||
"gpg",
|
||||
"graphql",
|
||||
"html",
|
||||
"http",
|
||||
"ini",
|
||||
"java",
|
||||
"javascript",
|
||||
"jq",
|
||||
"jsdoc",
|
||||
"json",
|
||||
"json5",
|
||||
"jsonc",
|
||||
"kotlin",
|
||||
"latex",
|
||||
"llvm",
|
||||
"lua",
|
||||
"luadoc",
|
||||
"luap",
|
||||
"luau",
|
||||
"make",
|
||||
"markdown",
|
||||
"markdown_inline",
|
||||
"meson",
|
||||
"ninja",
|
||||
"nix",
|
||||
"pem",
|
||||
"perl",
|
||||
"php",
|
||||
"python",
|
||||
"requirements",
|
||||
"ruby",
|
||||
"rust",
|
||||
"scss",
|
||||
"sql",
|
||||
"toml",
|
||||
"tsx",
|
||||
"typescript",
|
||||
"vim",
|
||||
"vimdoc",
|
||||
"vue",
|
||||
"xml",
|
||||
"yaml",
|
||||
},
|
||||
highlight = {
|
||||
enable = true,
|
||||
additional_vim_regex_highlighting = { "org" },
|
||||
},
|
||||
indent = {
|
||||
enable = true,
|
||||
},
|
||||
incremental_selection = {
|
||||
enable = true,
|
||||
keymaps = {
|
||||
init_selection = "gnn",
|
||||
node_incremental = "grn",
|
||||
scope_incremental = "grc",
|
||||
node_decremental = "grm",
|
||||
},
|
||||
},
|
||||
context_commentstring = {
|
||||
enable = true,
|
||||
},
|
||||
autotag = {
|
||||
enable = true,
|
||||
},
|
||||
})
|
||||
end,
|
||||
dependencies = {
|
||||
"JoosepAlviste/nvim-ts-context-commentstring",
|
||||
"windwp/nvim-ts-autotag",
|
||||
"nvim-orgmode/orgmode",
|
||||
},
|
||||
},
|
||||
}
|
@ -1,19 +0,0 @@
|
||||
require("twilight").setup({
|
||||
treesitter = true,
|
||||
expand = {
|
||||
"function",
|
||||
"method",
|
||||
"table",
|
||||
"if_statement",
|
||||
},
|
||||
})
|
||||
|
||||
local wk = require("which-key")
|
||||
|
||||
wk.register({
|
||||
t = {
|
||||
t = { "<cmd>Twilight<CR>", "Twilight" },
|
||||
},
|
||||
}, {
|
||||
prefix = "<leader>",
|
||||
})
|
@ -0,0 +1,29 @@
|
||||
return {
|
||||
{
|
||||
"echasnovski/mini.nvim",
|
||||
branch = "stable",
|
||||
config = function()
|
||||
require("mini.jump").setup({})
|
||||
require("mini.bufremove").setup({})
|
||||
end,
|
||||
},
|
||||
{
|
||||
"ggandor/leap.nvim",
|
||||
dependencies = {
|
||||
"tpope/vim-repeat",
|
||||
},
|
||||
config = function()
|
||||
require("leap").add_default_mappings()
|
||||
end,
|
||||
},
|
||||
"dhruvasagar/vim-table-mode",
|
||||
"tpope/vim-eunuch",
|
||||
{
|
||||
"ThePrimeagen/refactoring.nvim",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
},
|
||||
config = true,
|
||||
},
|
||||
}
|
@ -1,76 +0,0 @@
|
||||
local wk = require("which-key")
|
||||
|
||||
wk.setup()
|
||||
|
||||
wk.register({
|
||||
f = {
|
||||
name = "File",
|
||||
C = {
|
||||
function()
|
||||
vim.api.nvim_input(":Copy " .. vim.fn.expand("%"))
|
||||
end,
|
||||
"Copy file",
|
||||
},
|
||||
R = {
|
||||
function()
|
||||
vim.api.nvim_input(":Move " .. vim.fn.expand("%"))
|
||||
end,
|
||||
"Rename/move file",
|
||||
},
|
||||
D = {
|
||||
function()
|
||||
vim.api.nvim_input(":Delete")
|
||||
end,
|
||||
"Delete file",
|
||||
},
|
||||
P = {
|
||||
function()
|
||||
print(vim.fn.expand("%:p"))
|
||||
end,
|
||||
"Print absolute path",
|
||||
},
|
||||
},
|
||||
b = {
|
||||
name = "Buffer",
|
||||
d = { "<cmd>bdel<CR>", "Delete buffer" },
|
||||
s = { "<cmd>write<CR>", "Save buffer" },
|
||||
},
|
||||
c = {
|
||||
name = "Code",
|
||||
},
|
||||
h = {
|
||||
name = "Help",
|
||||
},
|
||||
p = {
|
||||
name = "Project",
|
||||
},
|
||||
n = {
|
||||
name = "Note",
|
||||
},
|
||||
t = {
|
||||
name = "Toggle",
|
||||
},
|
||||
g = {
|
||||
name = "Git",
|
||||
},
|
||||
r = {
|
||||
name = "Run",
|
||||
},
|
||||
o = {
|
||||
name = "Open",
|
||||
t = { '<cmd>exe v:count1 . "ToggleTerm"<CR>', "Open terminal" },
|
||||
T = { "<cmd>terminal<CR>", "Open terminal here" },
|
||||
},
|
||||
w = {
|
||||
name = "Window",
|
||||
d = { "<cmd>close<CR>", "Close window" },
|
||||
v = { "<cmd>vsplit<CR>", "Vertical split" },
|
||||
s = { "<cmd>split<CR>", "Horizontal split" },
|
||||
},
|
||||
q = {
|
||||
name = "Quit",
|
||||
q = { "<cmd>qa<CR>", "Quit nvim" },
|
||||
},
|
||||
}, {
|
||||
prefix = "<leader>",
|
||||
})
|
@ -1,11 +0,0 @@
|
||||
require("zen-mode").setup()
|
||||
|
||||
local wk = require('which-key')
|
||||
|
||||
wk.register({
|
||||
t = {
|
||||
z = {"<cmd>ZenMode<CR>", "Zen mode"}
|
||||
}
|
||||
}, {
|
||||
prefix = "<leader>"
|
||||
})
|
@ -1,15 +0,0 @@
|
||||
local utils = { }
|
||||
|
||||
local scopes = {o = vim.o, b = vim.bo, w = vim.wo}
|
||||
|
||||
function utils.opt(scope, key, value)
|
||||
scopes[scope][key] = value
|
||||
if scope ~= 'o' then scopes['o'][key] = value end
|
||||
end
|
||||
|
||||
function utils.map(mode, lhs, rhs, opts)
|
||||
opts = opts or { noremap = true }
|
||||
vim.api.nvim_set_keymap(mode, lhs, rhs, opts)
|
||||
end
|
||||
|
||||
return utils
|
Loading…
Reference in new issue