nvim: the epic config restructure
This commit is contained in:
@ -1,4 +1,3 @@
|
||||
require("plugins")
|
||||
require("options")
|
||||
require("mappings")
|
||||
require("colors")
|
||||
require("config.options")
|
||||
require("config.mappings")
|
||||
require("config.plugins")
|
||||
|
||||
@ -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
|
||||
require("nvim-autopairs").setup({})
|
||||
-- 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 = "" } }))
|
||||
return {
|
||||
"windwp/nvim-autopairs",
|
||||
config = function()
|
||||
-- autopairs
|
||||
require("nvim-autopairs").setup({})
|
||||
-- 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 neogen = require("neogen")
|
||||
local cmp = require("cmp")
|
||||
local neogen = require("neogen")
|
||||
|
||||
cmp.setup({
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
vim.fn["vsnip#anonymous"](args.body)
|
||||
end,
|
||||
},
|
||||
mapping = {
|
||||
-- ['<C-n>'] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }),
|
||||
-- ['<C-p>'] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert }),
|
||||
["<C-n>"] = cmp.mapping.select_next_item(),
|
||||
["<C-p>"] = cmp.mapping.select_prev_item(),
|
||||
["<C-Space>"] = cmp.mapping.complete(),
|
||||
["<C-e>"] = cmp.mapping.close(),
|
||||
["<CR>"] = cmp.mapping.confirm({
|
||||
behavior = cmp.ConfirmBehavior.Replace,
|
||||
select = false,
|
||||
}),
|
||||
["<tab>"] = cmp.mapping(function(fallback)
|
||||
if neogen.jumpable() then
|
||||
neogen.jump_next()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, {
|
||||
"i",
|
||||
"s",
|
||||
}),
|
||||
["<S-tab>"] = cmp.mapping(function(fallback)
|
||||
if neogen.jumpable(true) then
|
||||
neogen.jump_prev()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, {
|
||||
"i",
|
||||
"s",
|
||||
}),
|
||||
},
|
||||
sources = {
|
||||
{ name = "nvim_lsp" },
|
||||
{ name = "nvim_lsp_signature_help" },
|
||||
{ name = "path" },
|
||||
{ name = "buffer", keyword_length = 5 },
|
||||
{ name = "vsnip" },
|
||||
{ name = "orgmode" },
|
||||
},
|
||||
})
|
||||
cmp.setup({
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
vim.fn["vsnip#anonymous"](args.body)
|
||||
end,
|
||||
},
|
||||
mapping = {
|
||||
-- ['<C-n>'] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }),
|
||||
-- ['<C-p>'] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert }),
|
||||
["<C-n>"] = cmp.mapping.select_next_item(),
|
||||
["<C-p>"] = cmp.mapping.select_prev_item(),
|
||||
["<C-Space>"] = cmp.mapping.complete(),
|
||||
["<C-e>"] = cmp.mapping.close(),
|
||||
["<CR>"] = cmp.mapping.confirm({
|
||||
behavior = cmp.ConfirmBehavior.Replace,
|
||||
select = false,
|
||||
}),
|
||||
["<tab>"] = cmp.mapping(function(fallback)
|
||||
if neogen.jumpable() then
|
||||
neogen.jump_next()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, {
|
||||
"i",
|
||||
"s",
|
||||
}),
|
||||
["<S-tab>"] = cmp.mapping(function(fallback)
|
||||
if neogen.jumpable(true) then
|
||||
neogen.jump_prev()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, {
|
||||
"i",
|
||||
"s",
|
||||
}),
|
||||
},
|
||||
sources = {
|
||||
{ name = "nvim_lsp" },
|
||||
{ name = "nvim_lsp_signature_help" },
|
||||
{ name = "path" },
|
||||
{ name = "buffer", keyword_length = 5 },
|
||||
{ name = "vsnip" },
|
||||
{ name = "orgmode" },
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
||||
@ -1,2 +1,11 @@
|
||||
require("dap-go").setup()
|
||||
require("dap-python").setup()
|
||||
return {
|
||||
"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({
|
||||
filetype = {
|
||||
lua = {
|
||||
require("formatter.filetypes.lua").stylua,
|
||||
},
|
||||
go = {
|
||||
require("formatter.filetypes.go").gofumpt,
|
||||
require("formatter.filetypes.go").goimports,
|
||||
},
|
||||
json = {
|
||||
require("formatter.filetypes.json").jq,
|
||||
},
|
||||
python = {
|
||||
require("formatter.filetypes.python").autopep8,
|
||||
},
|
||||
rust = {
|
||||
require("formatter.filetypes.rust").rustfmt,
|
||||
},
|
||||
toml = {
|
||||
require("formatter.filetypes.toml").taplo,
|
||||
},
|
||||
},
|
||||
})
|
||||
return {
|
||||
"mhartington/formatter.nvim",
|
||||
cmd = { "Format", "FormatWrite" },
|
||||
config = function()
|
||||
require("formatter").setup({
|
||||
filetype = {
|
||||
lua = {
|
||||
require("formatter.filetypes.lua").stylua,
|
||||
},
|
||||
go = {
|
||||
require("formatter.filetypes.go").gofumpt,
|
||||
require("formatter.filetypes.go").goimports,
|
||||
},
|
||||
json = {
|
||||
require("formatter.filetypes.json").jq,
|
||||
},
|
||||
python = {
|
||||
require("formatter.filetypes.python").autopep8,
|
||||
},
|
||||
rust = {
|
||||
require("formatter.filetypes.rust").rustfmt,
|
||||
},
|
||||
toml = {
|
||||
require("formatter.filetypes.toml").taplo,
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
||||
@ -1,6 +1,11 @@
|
||||
require("lint").linters_by_ft = {
|
||||
python = { "mypy" },
|
||||
rust = { "ruff" },
|
||||
}
|
||||
return {
|
||||
"mfussenegger/nvim-lint",
|
||||
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")
|
||||
|
||||
-- lsp.jedi_language_server.setup{}
|
||||
lsp.pyright.setup{}
|
||||
lsp.gopls.setup{}
|
||||
lsp.rust_analyzer.setup{}
|
||||
lsp.clangd.setup{}
|
||||
lsp.lua_ls.setup{}
|
||||
lsp.solargraph.setup{}
|
||||
return {
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
config = function()
|
||||
lsp = require("lspconfig")
|
||||
lsp.pyright.setup({})
|
||||
lsp.gopls.setup({})
|
||||
lsp.rust_analyzer.setup({})
|
||||
lsp.clangd.setup({})
|
||||
lsp.lua_ls.setup({})
|
||||
lsp.solargraph.setup({})
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
||||
@ -1,8 +1,12 @@
|
||||
-- lualine colorscheme
|
||||
require("lualine").setup({
|
||||
options = {
|
||||
theme = "auto",
|
||||
section_separators = { "", "" },
|
||||
component_separators = { "", "" },
|
||||
},
|
||||
})
|
||||
return {
|
||||
"hoob3rt/lualine.nvim",
|
||||
config = function()
|
||||
require("lualine").setup({
|
||||
options = {
|
||||
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({
|
||||
languages = {
|
||||
python = {
|
||||
template = {
|
||||
annotation_convention = "reST",
|
||||
return {
|
||||
"danymat/neogen",
|
||||
config = function()
|
||||
require("neogen").setup({
|
||||
languages = {
|
||||
python = {
|
||||
template = {
|
||||
annotation_convention = "reST",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
||||
@ -1,7 +1,15 @@
|
||||
local neogit = require("neogit")
|
||||
|
||||
neogit.setup({
|
||||
integrations = {
|
||||
diffview = true,
|
||||
return {
|
||||
"TimUntersberger/neogit",
|
||||
dependencies = {
|
||||
"sindrets/diffview.nvim",
|
||||
},
|
||||
})
|
||||
config = function()
|
||||
local neogit = require("neogit")
|
||||
|
||||
neogit.setup({
|
||||
integrations = {
|
||||
diffview = true,
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
||||
@ -1,7 +1,19 @@
|
||||
require("neotest").setup({
|
||||
adapters = {
|
||||
require("neotest-python")({
|
||||
runner = "pytest",
|
||||
}),
|
||||
return {
|
||||
"nvim-neotest/neotest",
|
||||
config = function()
|
||||
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({
|
||||
buffers = {
|
||||
right = {
|
||||
enabled = false,
|
||||
},
|
||||
},
|
||||
})
|
||||
return {
|
||||
"shortcuts/no-neck-pain.nvim",
|
||||
config = function()
|
||||
require("no-neck-pain").setup({
|
||||
buffers = {
|
||||
right = {
|
||||
enabled = false,
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
||||
@ -1,13 +1,22 @@
|
||||
-- nvim tree
|
||||
require("nvim-tree").setup({
|
||||
update_cwd = true,
|
||||
diagnostics = {
|
||||
enable = true,
|
||||
},
|
||||
})
|
||||
return {
|
||||
"kyazdani42/nvim-tree.lua",
|
||||
config = function()
|
||||
-- nvim tree
|
||||
require("nvim-tree").setup({
|
||||
update_cwd = true,
|
||||
diagnostics = {
|
||||
enable = true,
|
||||
},
|
||||
})
|
||||
|
||||
-- close tab/vim when nvim-tree is the last window in the tab
|
||||
vim.api.nvim_create_autocmd("BufEnter", {
|
||||
pattern = "*",
|
||||
command = "if winnr('$') == 1 && bufname() == 'NvimTree_' . tabpagenr() | quit | endif",
|
||||
})
|
||||
-- close tab/vim when nvim-tree is the last window in the tab
|
||||
vim.api.nvim_create_autocmd("BufEnter", {
|
||||
pattern = "*",
|
||||
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")
|
||||
require("telekasten").setup({ home = home })
|
||||
return {
|
||||
"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
|
||||
require("telescope").setup({
|
||||
defaults = {
|
||||
-- sorting
|
||||
file_sorter = require("telescope.sorters").get_fzy_sorter,
|
||||
generic_sorter = require("telescope.sorters").get_fzy_sorter,
|
||||
return {
|
||||
"nvim-telescope/telescope.nvim",
|
||||
config = function()
|
||||
require("telescope").setup({
|
||||
defaults = {
|
||||
-- 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
|
||||
require("toggleterm").setup({
|
||||
start_in_insert = false,
|
||||
})
|
||||
require("term-edit").setup({
|
||||
prompt_end = "%$ ",
|
||||
})
|
||||
return {
|
||||
"akinsho/toggleterm.nvim",
|
||||
cmd = { "ToggleTerm" },
|
||||
config = function()
|
||||
vim.o.hidden = true
|
||||
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({
|
||||
highlight = {
|
||||
enable = true,
|
||||
},
|
||||
})
|
||||
return {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
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
|
||||
vim.api.nvim_exec([[
|
||||
return {
|
||||
"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>'
|
||||
smap <expr> <Tab> vsnip#jumpable(1) ? '<Plug>(vsnip-jump-next)' : '<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>'
|
||||
]], false)
|
||||
]],
|
||||
false
|
||||
)
|
||||
end,
|
||||
}
|
||||
|
||||
@ -1,12 +1,20 @@
|
||||
local wk = require("which-key")
|
||||
wk.register({
|
||||
a = { name = "actions" },
|
||||
c = { name = "terminal" },
|
||||
d = { name = "debug" },
|
||||
f = { name = "files" },
|
||||
g = { name = "lsp" },
|
||||
n = { name = "testing" },
|
||||
r = { name = "refactoring" },
|
||||
t = { name = "telescope" },
|
||||
v = { name = "vcs" },
|
||||
}, { prefix = "<leader>" })
|
||||
return {
|
||||
"folke/which-key.nvim",
|
||||
key = {
|
||||
"<leader>",
|
||||
},
|
||||
config = function()
|
||||
local wk = require("which-key")
|
||||
wk.register({
|
||||
a = { name = "actions" },
|
||||
c = { name = "terminal" },
|
||||
d = { name = "debug" },
|
||||
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