nvim: the epic config restructure
This commit is contained in:
@ -1,4 +1,3 @@
|
|||||||
require("plugins")
|
require("config.options")
|
||||||
require("options")
|
require("config.mappings")
|
||||||
require("mappings")
|
require("config.plugins")
|
||||||
require("colors")
|
|
||||||
|
|||||||
@ -1,2 +0,0 @@
|
|||||||
-- vim.cmd("colorscheme wal")
|
|
||||||
-- vim.cmd("colorscheme monokai")
|
|
||||||
13
.config/nvim/lua/config/plugins.lua
Normal file
13
.config/nvim/lua/config/plugins.lua
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
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,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
vim.opt.rtp:prepend(lazypath)
|
||||||
|
require("lazy").setup("plugins")
|
||||||
@ -1,274 +0,0 @@
|
|||||||
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,
|
|
||||||
})
|
|
||||||
end
|
|
||||||
vim.opt.rtp:prepend(lazypath)
|
|
||||||
require("lazy").setup({
|
|
||||||
|
|
||||||
{
|
|
||||||
"echasnovski/mini.nvim",
|
|
||||||
config = function()
|
|
||||||
require("plugins.mini")
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
|
|
||||||
--
|
|
||||||
-- dev
|
|
||||||
--
|
|
||||||
|
|
||||||
-- lspconfig
|
|
||||||
{
|
|
||||||
"neovim/nvim-lspconfig",
|
|
||||||
config = function()
|
|
||||||
require("plugins.lsp")
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
|
|
||||||
-- nvim lint
|
|
||||||
{
|
|
||||||
"mfussenegger/nvim-lint",
|
|
||||||
config = function()
|
|
||||||
require("plugins.lint")
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
|
|
||||||
-- cmp
|
|
||||||
{
|
|
||||||
"hrsh7th/nvim-cmp",
|
|
||||||
config = function()
|
|
||||||
require("plugins.cmp")
|
|
||||||
end,
|
|
||||||
dependencies = {
|
|
||||||
"hrsh7th/cmp-nvim-lsp",
|
|
||||||
"hrsh7th/cmp-vsnip",
|
|
||||||
"hrsh7th/cmp-buffer",
|
|
||||||
"hrsh7th/cmp-path",
|
|
||||||
"hrsh7th/cmp-nvim-lsp-signature-help",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
-- snippets
|
|
||||||
{
|
|
||||||
"hrsh7th/vim-vsnip",
|
|
||||||
config = function()
|
|
||||||
require("plugins.vsnip")
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
|
|
||||||
"rafamadriz/friendly-snippets",
|
|
||||||
|
|
||||||
-- autopairs
|
|
||||||
{
|
|
||||||
"windwp/nvim-autopairs",
|
|
||||||
config = function()
|
|
||||||
require("plugins.autopairs")
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
|
|
||||||
-- treesitter
|
|
||||||
{
|
|
||||||
"nvim-treesitter/nvim-treesitter",
|
|
||||||
config = function()
|
|
||||||
require("plugins.treesitter")
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
"nvim-treesitter/nvim-treesitter-context",
|
|
||||||
config = function()
|
|
||||||
require("plugins.treesitter-context")
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
"RRethy/nvim-treesitter-textsubjects",
|
|
||||||
config = function()
|
|
||||||
require("plugins.treesitter-textobjects")
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
|
|
||||||
-- formatter
|
|
||||||
{
|
|
||||||
"mhartington/formatter.nvim",
|
|
||||||
cmd = { "Format", "FormatWrite" },
|
|
||||||
config = function()
|
|
||||||
require("plugins.formatter")
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
|
|
||||||
-- dap
|
|
||||||
{
|
|
||||||
"mfussenegger/nvim-dap",
|
|
||||||
config = function()
|
|
||||||
require("plugins.dap")
|
|
||||||
end,
|
|
||||||
dependencies = {
|
|
||||||
"leoluz/nvim-dap-go",
|
|
||||||
"mfussenegger/nvim-dap-python",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
-- trouble
|
|
||||||
{
|
|
||||||
"folke/trouble.nvim",
|
|
||||||
cmd = { "Trouble", "TroubleToggle" },
|
|
||||||
config = function()
|
|
||||||
require("plugins.trouble")
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
|
|
||||||
-- toggleterm
|
|
||||||
{
|
|
||||||
"akinsho/toggleterm.nvim",
|
|
||||||
cmd = { "ToggleTerm" },
|
|
||||||
config = function()
|
|
||||||
require("plugins.toggleterm")
|
|
||||||
end,
|
|
||||||
dependencies = {
|
|
||||||
"chomosuke/term-edit.nvim",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
-- neogen
|
|
||||||
{
|
|
||||||
"danymat/neogen",
|
|
||||||
config = function()
|
|
||||||
require("plugins.neogen")
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
|
|
||||||
-- neotest
|
|
||||||
{
|
|
||||||
"nvim-neotest/neotest",
|
|
||||||
config = function()
|
|
||||||
require("plugins.neotest")
|
|
||||||
end,
|
|
||||||
dependencies = {
|
|
||||||
"antoinemadec/FixCursorHold.nvim",
|
|
||||||
"nvim-neotest/neotest-python",
|
|
||||||
},
|
|
||||||
keys = {
|
|
||||||
"<leader>n",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
-- refactoring
|
|
||||||
{
|
|
||||||
"ThePrimeagen/refactoring.nvim",
|
|
||||||
config = function()
|
|
||||||
require("plugins.refactoring")
|
|
||||||
end,
|
|
||||||
keys = {
|
|
||||||
"<leader>r",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
--
|
|
||||||
-- git
|
|
||||||
--
|
|
||||||
|
|
||||||
-- "tpope/vim-fugitive",
|
|
||||||
{
|
|
||||||
"TimUntersberger/neogit",
|
|
||||||
config = function()
|
|
||||||
require("plugins.neogit")
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
"sindrets/diffview.nvim",
|
|
||||||
|
|
||||||
--
|
|
||||||
-- files (and more)
|
|
||||||
--
|
|
||||||
|
|
||||||
-- telescope
|
|
||||||
{
|
|
||||||
"nvim-telescope/telescope.nvim",
|
|
||||||
config = function()
|
|
||||||
require("plugins.telescope")
|
|
||||||
end,
|
|
||||||
dependencies = {
|
|
||||||
"nvim-lua/plenary.nvim",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
-- nvim tree
|
|
||||||
{
|
|
||||||
"kyazdani42/nvim-tree.lua",
|
|
||||||
config = function()
|
|
||||||
require("plugins.nvim-tree")
|
|
||||||
end,
|
|
||||||
dependencies = {
|
|
||||||
"kyazdani42/nvim-web-devicons",
|
|
||||||
},
|
|
||||||
cmd = { "NvimTreeOpen", "NvimTreeToggle" },
|
|
||||||
},
|
|
||||||
|
|
||||||
--
|
|
||||||
-- looks
|
|
||||||
--
|
|
||||||
|
|
||||||
-- lualine
|
|
||||||
{
|
|
||||||
"hoob3rt/lualine.nvim",
|
|
||||||
config = function()
|
|
||||||
require("plugins.lualine")
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
|
|
||||||
--
|
|
||||||
-- colorscheme
|
|
||||||
--
|
|
||||||
|
|
||||||
{
|
|
||||||
"nekonako/xresources-nvim",
|
|
||||||
config = function()
|
|
||||||
require('xresources')
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
|
|
||||||
--
|
|
||||||
-- telekasten
|
|
||||||
--
|
|
||||||
|
|
||||||
{
|
|
||||||
"renerocksai/telekasten.nvim",
|
|
||||||
config = function()
|
|
||||||
require("plugins.telekasten")
|
|
||||||
end,
|
|
||||||
dependencies = {
|
|
||||||
"telescope.nvim",
|
|
||||||
},
|
|
||||||
key = {
|
|
||||||
"<leader>z",
|
|
||||||
},
|
|
||||||
ft = {
|
|
||||||
"markdown",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
"renerocksai/calendar-vim",
|
|
||||||
|
|
||||||
{
|
|
||||||
"shortcuts/no-neck-pain.nvim",
|
|
||||||
config = function()
|
|
||||||
require("plugins.no-neck-pain")
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
"folke/which-key.nvim",
|
|
||||||
key = {
|
|
||||||
"<leader>",
|
|
||||||
},
|
|
||||||
config = function()
|
|
||||||
require("plugins.which-key")
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
@ -1,6 +1,11 @@
|
|||||||
-- autopairs
|
return {
|
||||||
require("nvim-autopairs").setup({})
|
"windwp/nvim-autopairs",
|
||||||
-- insert () after selecting functions
|
config = function()
|
||||||
local cmp_autopairs = require("nvim-autopairs.completion.cmp")
|
-- autopairs
|
||||||
local cmp = require("cmp")
|
require("nvim-autopairs").setup({})
|
||||||
cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done({ map_char = { tex = "" } }))
|
-- insert () after selecting functions
|
||||||
|
local cmp_autopairs = require("nvim-autopairs.completion.cmp")
|
||||||
|
local cmp = require("cmp")
|
||||||
|
cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done({ map_char = { tex = "" } }))
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
|||||||
@ -1 +0,0 @@
|
|||||||
vim.g.calendar_no_mappings = true
|
|
||||||
@ -1,52 +1,67 @@
|
|||||||
vim.opt.completeopt = { "menuone", "noselect" }
|
return {
|
||||||
|
"hrsh7th/nvim-cmp",
|
||||||
|
config = function()
|
||||||
|
require("plugins.cmp")
|
||||||
|
end,
|
||||||
|
dependencies = {
|
||||||
|
"hrsh7th/cmp-nvim-lsp",
|
||||||
|
"hrsh7th/cmp-vsnip",
|
||||||
|
"hrsh7th/cmp-buffer",
|
||||||
|
"hrsh7th/cmp-path",
|
||||||
|
"hrsh7th/cmp-nvim-lsp-signature-help",
|
||||||
|
},
|
||||||
|
opts = function()
|
||||||
|
vim.opt.completeopt = { "menuone", "noselect" }
|
||||||
|
|
||||||
local cmp = require("cmp")
|
local cmp = require("cmp")
|
||||||
local neogen = require("neogen")
|
local neogen = require("neogen")
|
||||||
|
|
||||||
cmp.setup({
|
cmp.setup({
|
||||||
snippet = {
|
snippet = {
|
||||||
expand = function(args)
|
expand = function(args)
|
||||||
vim.fn["vsnip#anonymous"](args.body)
|
vim.fn["vsnip#anonymous"](args.body)
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
mapping = {
|
mapping = {
|
||||||
-- ['<C-n>'] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }),
|
-- ['<C-n>'] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }),
|
||||||
-- ['<C-p>'] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert }),
|
-- ['<C-p>'] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert }),
|
||||||
["<C-n>"] = cmp.mapping.select_next_item(),
|
["<C-n>"] = cmp.mapping.select_next_item(),
|
||||||
["<C-p>"] = cmp.mapping.select_prev_item(),
|
["<C-p>"] = cmp.mapping.select_prev_item(),
|
||||||
["<C-Space>"] = cmp.mapping.complete(),
|
["<C-Space>"] = cmp.mapping.complete(),
|
||||||
["<C-e>"] = cmp.mapping.close(),
|
["<C-e>"] = cmp.mapping.close(),
|
||||||
["<CR>"] = cmp.mapping.confirm({
|
["<CR>"] = cmp.mapping.confirm({
|
||||||
behavior = cmp.ConfirmBehavior.Replace,
|
behavior = cmp.ConfirmBehavior.Replace,
|
||||||
select = false,
|
select = false,
|
||||||
}),
|
}),
|
||||||
["<tab>"] = cmp.mapping(function(fallback)
|
["<tab>"] = cmp.mapping(function(fallback)
|
||||||
if neogen.jumpable() then
|
if neogen.jumpable() then
|
||||||
neogen.jump_next()
|
neogen.jump_next()
|
||||||
else
|
else
|
||||||
fallback()
|
fallback()
|
||||||
end
|
end
|
||||||
end, {
|
end, {
|
||||||
"i",
|
"i",
|
||||||
"s",
|
"s",
|
||||||
}),
|
}),
|
||||||
["<S-tab>"] = cmp.mapping(function(fallback)
|
["<S-tab>"] = cmp.mapping(function(fallback)
|
||||||
if neogen.jumpable(true) then
|
if neogen.jumpable(true) then
|
||||||
neogen.jump_prev()
|
neogen.jump_prev()
|
||||||
else
|
else
|
||||||
fallback()
|
fallback()
|
||||||
end
|
end
|
||||||
end, {
|
end, {
|
||||||
"i",
|
"i",
|
||||||
"s",
|
"s",
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
sources = {
|
sources = {
|
||||||
{ name = "nvim_lsp" },
|
{ name = "nvim_lsp" },
|
||||||
{ name = "nvim_lsp_signature_help" },
|
{ name = "nvim_lsp_signature_help" },
|
||||||
{ name = "path" },
|
{ name = "path" },
|
||||||
{ name = "buffer", keyword_length = 5 },
|
{ name = "buffer", keyword_length = 5 },
|
||||||
{ name = "vsnip" },
|
{ name = "vsnip" },
|
||||||
{ name = "orgmode" },
|
{ name = "orgmode" },
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
|||||||
@ -1,2 +1,11 @@
|
|||||||
require("dap-go").setup()
|
return {
|
||||||
require("dap-python").setup()
|
"mfussenegger/nvim-dap",
|
||||||
|
config = function()
|
||||||
|
require("dap-go").setup()
|
||||||
|
require("dap-python").setup()
|
||||||
|
end,
|
||||||
|
dependencies = {
|
||||||
|
"leoluz/nvim-dap-go",
|
||||||
|
"mfussenegger/nvim-dap-python",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|||||||
@ -1,23 +1,29 @@
|
|||||||
require("formatter").setup({
|
return {
|
||||||
filetype = {
|
"mhartington/formatter.nvim",
|
||||||
lua = {
|
cmd = { "Format", "FormatWrite" },
|
||||||
require("formatter.filetypes.lua").stylua,
|
config = function()
|
||||||
},
|
require("formatter").setup({
|
||||||
go = {
|
filetype = {
|
||||||
require("formatter.filetypes.go").gofumpt,
|
lua = {
|
||||||
require("formatter.filetypes.go").goimports,
|
require("formatter.filetypes.lua").stylua,
|
||||||
},
|
},
|
||||||
json = {
|
go = {
|
||||||
require("formatter.filetypes.json").jq,
|
require("formatter.filetypes.go").gofumpt,
|
||||||
},
|
require("formatter.filetypes.go").goimports,
|
||||||
python = {
|
},
|
||||||
require("formatter.filetypes.python").autopep8,
|
json = {
|
||||||
},
|
require("formatter.filetypes.json").jq,
|
||||||
rust = {
|
},
|
||||||
require("formatter.filetypes.rust").rustfmt,
|
python = {
|
||||||
},
|
require("formatter.filetypes.python").autopep8,
|
||||||
toml = {
|
},
|
||||||
require("formatter.filetypes.toml").taplo,
|
rust = {
|
||||||
},
|
require("formatter.filetypes.rust").rustfmt,
|
||||||
},
|
},
|
||||||
})
|
toml = {
|
||||||
|
require("formatter.filetypes.toml").taplo,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
|||||||
@ -1,6 +1,11 @@
|
|||||||
require("lint").linters_by_ft = {
|
return {
|
||||||
python = { "mypy" },
|
"mfussenegger/nvim-lint",
|
||||||
rust = { "ruff" },
|
config = function()
|
||||||
}
|
require("lint").linters_by_ft = {
|
||||||
|
python = { "mypy" },
|
||||||
|
rust = { "ruff" },
|
||||||
|
}
|
||||||
|
|
||||||
vim.cmd("au BufWrite <buffer> lua require('lint').try_lint()")
|
vim.cmd("au BufWrite <buffer> lua require('lint').try_lint()")
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
|||||||
@ -1,9 +1,14 @@
|
|||||||
local lsp = require("lspconfig")
|
return {
|
||||||
|
{
|
||||||
-- lsp.jedi_language_server.setup{}
|
"neovim/nvim-lspconfig",
|
||||||
lsp.pyright.setup{}
|
config = function()
|
||||||
lsp.gopls.setup{}
|
lsp = require("lspconfig")
|
||||||
lsp.rust_analyzer.setup{}
|
lsp.pyright.setup({})
|
||||||
lsp.clangd.setup{}
|
lsp.gopls.setup({})
|
||||||
lsp.lua_ls.setup{}
|
lsp.rust_analyzer.setup({})
|
||||||
lsp.solargraph.setup{}
|
lsp.clangd.setup({})
|
||||||
|
lsp.lua_ls.setup({})
|
||||||
|
lsp.solargraph.setup({})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|||||||
@ -1,8 +1,12 @@
|
|||||||
-- lualine colorscheme
|
return {
|
||||||
require("lualine").setup({
|
"hoob3rt/lualine.nvim",
|
||||||
options = {
|
config = function()
|
||||||
theme = "auto",
|
require("lualine").setup({
|
||||||
section_separators = { "", "" },
|
options = {
|
||||||
component_separators = { "", "" },
|
theme = "auto",
|
||||||
},
|
section_separators = { "", "" },
|
||||||
})
|
component_separators = { "", "" },
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
|||||||
@ -1,17 +0,0 @@
|
|||||||
require("mini.ai").setup()
|
|
||||||
require("mini.bracketed").setup()
|
|
||||||
require("mini.comment").setup()
|
|
||||||
require("mini.move").setup()
|
|
||||||
require("mini.starter").setup()
|
|
||||||
require("mini.tabline").setup()
|
|
||||||
require("mini.surround").setup({
|
|
||||||
mappings = {
|
|
||||||
add = "<space>sa",
|
|
||||||
delete = "<space>sd",
|
|
||||||
find = "<space>sf",
|
|
||||||
find_left = "<space>sF",
|
|
||||||
highlight = "<space>sh",
|
|
||||||
replace = "<space>sr",
|
|
||||||
update_n_lines = "<space>sn",
|
|
||||||
},
|
|
||||||
})
|
|
||||||
@ -1,9 +1,14 @@
|
|||||||
require("neogen").setup({
|
return {
|
||||||
languages = {
|
"danymat/neogen",
|
||||||
python = {
|
config = function()
|
||||||
template = {
|
require("neogen").setup({
|
||||||
annotation_convention = "reST",
|
languages = {
|
||||||
|
python = {
|
||||||
|
template = {
|
||||||
|
annotation_convention = "reST",
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
})
|
||||||
},
|
end,
|
||||||
})
|
}
|
||||||
|
|||||||
@ -1,7 +1,15 @@
|
|||||||
local neogit = require("neogit")
|
return {
|
||||||
|
"TimUntersberger/neogit",
|
||||||
neogit.setup({
|
dependencies = {
|
||||||
integrations = {
|
"sindrets/diffview.nvim",
|
||||||
diffview = true,
|
|
||||||
},
|
},
|
||||||
})
|
config = function()
|
||||||
|
local neogit = require("neogit")
|
||||||
|
|
||||||
|
neogit.setup({
|
||||||
|
integrations = {
|
||||||
|
diffview = true,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
|||||||
@ -1,7 +1,19 @@
|
|||||||
require("neotest").setup({
|
return {
|
||||||
adapters = {
|
"nvim-neotest/neotest",
|
||||||
require("neotest-python")({
|
config = function()
|
||||||
runner = "pytest",
|
require("neotest").setup({
|
||||||
}),
|
adapters = {
|
||||||
|
require("neotest-python")({
|
||||||
|
runner = "pytest",
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
dependencies = {
|
||||||
|
"antoinemadec/FixCursorHold.nvim",
|
||||||
|
"nvim-neotest/neotest-python",
|
||||||
},
|
},
|
||||||
})
|
keys = {
|
||||||
|
"<leader>n",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|||||||
@ -1,7 +1,12 @@
|
|||||||
require("no-neck-pain").setup({
|
return {
|
||||||
buffers = {
|
"shortcuts/no-neck-pain.nvim",
|
||||||
right = {
|
config = function()
|
||||||
enabled = false,
|
require("no-neck-pain").setup({
|
||||||
},
|
buffers = {
|
||||||
},
|
right = {
|
||||||
})
|
enabled = false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
|||||||
@ -1,13 +1,22 @@
|
|||||||
-- nvim tree
|
return {
|
||||||
require("nvim-tree").setup({
|
"kyazdani42/nvim-tree.lua",
|
||||||
update_cwd = true,
|
config = function()
|
||||||
diagnostics = {
|
-- nvim tree
|
||||||
enable = true,
|
require("nvim-tree").setup({
|
||||||
},
|
update_cwd = true,
|
||||||
})
|
diagnostics = {
|
||||||
|
enable = true,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
-- close tab/vim when nvim-tree is the last window in the tab
|
-- close tab/vim when nvim-tree is the last window in the tab
|
||||||
vim.api.nvim_create_autocmd("BufEnter", {
|
vim.api.nvim_create_autocmd("BufEnter", {
|
||||||
pattern = "*",
|
pattern = "*",
|
||||||
command = "if winnr('$') == 1 && bufname() == 'NvimTree_' . tabpagenr() | quit | endif",
|
command = "if winnr('$') == 1 && bufname() == 'NvimTree_' . tabpagenr() | quit | endif",
|
||||||
})
|
})
|
||||||
|
end,
|
||||||
|
dependencies = {
|
||||||
|
"kyazdani42/nvim-web-devicons",
|
||||||
|
},
|
||||||
|
cmd = { "NvimTreeOpen", "NvimTreeToggle" },
|
||||||
|
}
|
||||||
|
|||||||
@ -1 +1,9 @@
|
|||||||
require("refactoring").setup()
|
return {
|
||||||
|
"ThePrimeagen/refactoring.nvim",
|
||||||
|
config = function()
|
||||||
|
require("refactoring").setup()
|
||||||
|
end,
|
||||||
|
keys = {
|
||||||
|
"<leader>r",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|||||||
@ -1,2 +1,17 @@
|
|||||||
local home = vim.fn.expand("~/docs/zettelkasten")
|
return {
|
||||||
require("telekasten").setup({ home = home })
|
"renerocksai/telekasten.nvim",
|
||||||
|
config = function()
|
||||||
|
local home = vim.fn.expand("~/docs/zettelkasten")
|
||||||
|
require("telekasten").setup({ home = home })
|
||||||
|
vim.g.calendar_no_mappings = true
|
||||||
|
end,
|
||||||
|
dependencies = {
|
||||||
|
"renerocksai/calendar-vim",
|
||||||
|
},
|
||||||
|
key = {
|
||||||
|
"<leader>z",
|
||||||
|
},
|
||||||
|
ft = {
|
||||||
|
"markdown",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|||||||
@ -1,13 +1,20 @@
|
|||||||
-- telescope settings
|
return {
|
||||||
require("telescope").setup({
|
"nvim-telescope/telescope.nvim",
|
||||||
defaults = {
|
config = function()
|
||||||
-- sorting
|
require("telescope").setup({
|
||||||
file_sorter = require("telescope.sorters").get_fzy_sorter,
|
defaults = {
|
||||||
generic_sorter = require("telescope.sorters").get_fzy_sorter,
|
-- sorting
|
||||||
|
file_sorter = require("telescope.sorters").get_fzy_sorter,
|
||||||
|
generic_sorter = require("telescope.sorters").get_fzy_sorter,
|
||||||
|
},
|
||||||
|
pickers = {
|
||||||
|
colorscheme = {
|
||||||
|
enable_preview = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
dependencies = {
|
||||||
|
"nvim-lua/plenary.nvim",
|
||||||
},
|
},
|
||||||
pickers = {
|
}
|
||||||
colorscheme = {
|
|
||||||
enable_preview = true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|||||||
@ -1,7 +1,16 @@
|
|||||||
vim.o.hidden = true
|
return {
|
||||||
require("toggleterm").setup({
|
"akinsho/toggleterm.nvim",
|
||||||
start_in_insert = false,
|
cmd = { "ToggleTerm" },
|
||||||
})
|
config = function()
|
||||||
require("term-edit").setup({
|
vim.o.hidden = true
|
||||||
prompt_end = "%$ ",
|
require("toggleterm").setup({
|
||||||
})
|
start_in_insert = false,
|
||||||
|
})
|
||||||
|
require("term-edit").setup({
|
||||||
|
prompt_end = "%$ ",
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
dependencies = {
|
||||||
|
"chomosuke/term-edit.nvim",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|||||||
@ -1 +1,18 @@
|
|||||||
require("treesitter-context").setup()
|
return {
|
||||||
|
"nvim-treesitter/nvim-treesitter-context",
|
||||||
|
"RRethy/nvim-treesitter-textsubjects",
|
||||||
|
config = function()
|
||||||
|
require("treesitter-context").setup()
|
||||||
|
require("nvim-treesitter.configs").setup({
|
||||||
|
textsubjects = {
|
||||||
|
enable = true,
|
||||||
|
prev_selection = ",", -- (Optional) keymap to select the previous selection
|
||||||
|
keymaps = {
|
||||||
|
["."] = "textsubjects-smart",
|
||||||
|
[";"] = "textsubjects-container-outer",
|
||||||
|
["i;"] = "textsubjects-container-inner",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
|||||||
@ -1,11 +0,0 @@
|
|||||||
require("nvim-treesitter.configs").setup({
|
|
||||||
textsubjects = {
|
|
||||||
enable = true,
|
|
||||||
prev_selection = ",", -- (Optional) keymap to select the previous selection
|
|
||||||
keymaps = {
|
|
||||||
["."] = "textsubjects-smart",
|
|
||||||
[";"] = "textsubjects-container-outer",
|
|
||||||
["i;"] = "textsubjects-container-inner",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
@ -1,5 +1,10 @@
|
|||||||
require("nvim-treesitter.configs").setup({
|
return {
|
||||||
highlight = {
|
"nvim-treesitter/nvim-treesitter",
|
||||||
enable = true,
|
config = function()
|
||||||
},
|
require("nvim-treesitter.configs").setup({
|
||||||
})
|
highlight = {
|
||||||
|
enable = true,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
|||||||
@ -1 +1,8 @@
|
|||||||
require("trouble").setup()
|
return {
|
||||||
|
"folke/trouble.nvim",
|
||||||
|
cmd = { "Trouble", "TroubleToggle" },
|
||||||
|
config = function()
|
||||||
|
require("plugins.trouble")
|
||||||
|
require("trouble").setup()
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
|||||||
@ -1,7 +1,19 @@
|
|||||||
-- jumpable mappings
|
return {
|
||||||
vim.api.nvim_exec([[
|
"hrsh7th/vim-vsnip",
|
||||||
|
|
||||||
|
dependencies = {
|
||||||
|
"rafamadriz/friendly-snippets",
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
-- jumpable mappings
|
||||||
|
vim.api.nvim_exec(
|
||||||
|
[[
|
||||||
imap <expr> <Tab> vsnip#jumpable(1) ? '<Plug>(vsnip-jump-next)' : '<Tab>'
|
imap <expr> <Tab> vsnip#jumpable(1) ? '<Plug>(vsnip-jump-next)' : '<Tab>'
|
||||||
smap <expr> <Tab> vsnip#jumpable(1) ? '<Plug>(vsnip-jump-next)' : '<Tab>'
|
smap <expr> <Tab> vsnip#jumpable(1) ? '<Plug>(vsnip-jump-next)' : '<Tab>'
|
||||||
imap <expr> <S-Tab> vsnip#jumpable(-1) ? '<Plug>(vsnip-jump-prev)' : '<S-Tab>'
|
imap <expr> <S-Tab> vsnip#jumpable(-1) ? '<Plug>(vsnip-jump-prev)' : '<S-Tab>'
|
||||||
smap <expr> <S-Tab> vsnip#jumpable(-1) ? '<Plug>(vsnip-jump-prev)' : '<S-Tab>'
|
smap <expr> <S-Tab> vsnip#jumpable(-1) ? '<Plug>(vsnip-jump-prev)' : '<S-Tab>'
|
||||||
]], false)
|
]],
|
||||||
|
false
|
||||||
|
)
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
|||||||
@ -1,12 +1,20 @@
|
|||||||
local wk = require("which-key")
|
return {
|
||||||
wk.register({
|
"folke/which-key.nvim",
|
||||||
a = { name = "actions" },
|
key = {
|
||||||
c = { name = "terminal" },
|
"<leader>",
|
||||||
d = { name = "debug" },
|
},
|
||||||
f = { name = "files" },
|
config = function()
|
||||||
g = { name = "lsp" },
|
local wk = require("which-key")
|
||||||
n = { name = "testing" },
|
wk.register({
|
||||||
r = { name = "refactoring" },
|
a = { name = "actions" },
|
||||||
t = { name = "telescope" },
|
c = { name = "terminal" },
|
||||||
v = { name = "vcs" },
|
d = { name = "debug" },
|
||||||
}, { prefix = "<leader>" })
|
f = { name = "files" },
|
||||||
|
g = { name = "lsp" },
|
||||||
|
n = { name = "testing" },
|
||||||
|
r = { name = "refactoring" },
|
||||||
|
t = { name = "telescope" },
|
||||||
|
v = { name = "vcs" },
|
||||||
|
}, { prefix = "<leader>" })
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
|||||||
6
.config/nvim/lua/plugins/xresources.lua
Normal file
6
.config/nvim/lua/plugins/xresources.lua
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
return {
|
||||||
|
"nekonako/xresources-nvim",
|
||||||
|
config = function()
|
||||||
|
require("xresources")
|
||||||
|
end,
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user