Simplify neovim, fix dracula pro and cleanup init.lua to not be so messy

This commit is contained in:
Tony Blyler 2024-09-30 17:54:42 -04:00
parent fb7f5f7d67
commit 0b2cc51d6f
No known key found for this signature in database
24 changed files with 381 additions and 577 deletions

View file

@ -1,12 +0,0 @@
let g:netrw_dirhistmax =10
let g:netrw_dirhistcnt =2
let g:netrw_dirhist_2='/home/tony.blyler/repos/table-data-indexing-job/docker'
let g:netrw_dirhist_1='/home/tony.blyler/.zshrc.d'
let g:netrw_dirhist_0='/home/tony.blyler/go/bin'
let g:netrw_dirhist_9='/home/tony.blyler/repos/user-v2-service'
let g:netrw_dirhist_8='/home/tony.blyler/.config/i3'
let g:netrw_dirhist_7='/home/tony.blyler/.config/sway'
let g:netrw_dirhist_6='/home/tony.blyler/.zshrc.d'
let g:netrw_dirhist_5='/dev/shm'
let g:netrw_dirhist_4='/home/tony.blyler/repos/cbi-site/src'
let g:netrw_dirhist_3='/home/tony.blyler/.config/alacritty'

View file

@ -1 +1,381 @@
require('core.init')
-- Clone 'mini.nvim' manually in a way that it gets managed by 'mini.deps'
local path_package = vim.fn.stdpath('data') .. '/site/'
local mini_path = path_package .. 'pack/deps/start/mini.nvim'
if not vim.loop.fs_stat(mini_path) then
vim.cmd('echo "Installing `mini.nvim`" | redraw')
local clone_cmd = {
'git', 'clone', '--filter=blob:none',
'https://github.com/echasnovski/mini.nvim', mini_path
}
vim.fn.system(clone_cmd)
vim.cmd('packadd mini.nvim | helptags ALL')
vim.cmd('echo "Installed `mini.nvim`" | redraw')
end
-- Set up 'mini.deps' (customize to your liking)
require('mini.deps').setup({ path = { package = path_package } })
-- Use 'mini.deps'. `now()` and `later()` are helpers for a safe two-stage
-- startup and are optional.
local add, now, later = MiniDeps.add, MiniDeps.now, MiniDeps.later
-- vim options
now(function()
local opts = {
termguicolors = true, -- enable 24 bit colors
-- tabs look like 4 spaces {
expandtab = true,
tabstop = 4,
shiftwidth = 4,
softtabstop = 4,
-- }
cursorline = true, -- show active line
number = true, -- show line numbers
mouse = 'c', -- disable mouse
laststatus = 2, -- always show the status line
autoindent = true, -- turn on autoindent
smarttab = true, -- turn on smart tabs
incsearch = true, -- turn on incremental search
ruler = true, -- show ruler on page
lazyredraw = true, -- make large file bearable
regexpengine = 1, -- make searching large files bearable
background = 'dark' -- use dark theme
}
for opt, val in pairs(opts) do
vim.o[opt] = val
end
end)
-- color themes
now(function()
-- gruvbox {
add({
source = 'ellisonleao/gruvbox.nvim',
})
require('gruvbox').setup({
contrast = 'hard'
})
-- } gruvbox
-- dracula {
add({
source = 'maxmx03/dracula.nvim',
checkout = '2f396b6ba988ad4b3961c2e40d1b9ae436b8c26c',
depends = {
'ssh://git@git.0xdad.com/tblyler/dracula-pro.nvim.git'
}
})
local dracula = require('dracula')
local draculapro = require('draculapro')
draculapro.setup({
theme = 'morbius'
})
dracula.setup({
dracula_pro = draculapro,
colors = draculapro.colors
})
-- } dracula
vim.cmd.colorscheme('gruvbox')
end)
-- mini.nvim plugins {
-- safely execute immediately
now(function()
local animate = require('mini.animate')
local timing = animate.gen_timing.linear({ duration = duration, unit = 'total' })
animate.setup({
cursor = {
timing = timing
},
scroll = {
timing = timing
},
resize = {
timing = timing
},
open = {
timing = timing
},
close = {
timing = timing
}
})
end)
now(function()
require('mini.notify').setup()
vim.notify = require('mini.notify').make_notify()
end)
now(function()
local setups = {
bufremove = {},
comment = {}, -- maybe later?
completion = {},
cursorword = {},
icons = {}, -- vet me
jump = {},
jump2d = {},
pairs = {},
pick = {}, -- vet and maybe later?
tabline = {},
statusline = {},
surround = {}, -- maybe later?
trailspace = {},
}
for plugin, setup in pairs(setups) do
require('mini.' .. plugin).setup(setup)
end
local function jumpbefore()
MiniJump2d.start({
allowed_lines = {
cursor_after = false
}
})
end
local function jumpafter()
MiniJump2d.start({
allowed_lines = {
cursor_before = false
}
})
end
vim.keymap.set('n', '<leader><leader>k', jumpbefore, { noremap = true, silent = true })
vim.keymap.set('n', '<leader><leader>j', jumpafter, { noremap = true, silent = true })
vim.api.nvim_create_user_command(
'Bd',
function(opts)
MiniBufremove.delete()
end,
{}
)
vim.api.nvim_create_user_command(
'FixWhitespace',
function(opts)
MiniTrailspace.trim()
end,
{}
)
end)
later(function()
local setups = {
}
for plugin, setup in pairs(setups) do
require('mini.' .. plugin).setup(setup)
end
end)
-- } mini.nvim plugins
-- non mini.nvim plugins {
-- Git {
now(function()
add({
source = 'lewis6991/gitsigns.nvim',
})
require('gitsigns').setup({
current_line_blame = true,
current_line_blame_opts = {
virt_text = true,
delay = 0,
}
})
add({
source = "tpope/vim-fugitive",
})
end)
-- } Git
-- fzf {
later(function()
add({
source = 'ibhagwan/fzf-lua'
})
require("fzf-lua").setup({})
vim.keymap.set("n", "<c-P>", require('fzf-lua').files, { desc = "Fzf Files" })
end)
-- }
-- which key {
later(function()
add({
source = 'folke/which-key.nvim'
})
end)
-- }
-- legacy stuff {
now(function()
add({
source = 'tpope/vim-surround'
})
end)
-- } surround
-- LSP {
later(function()
add({
source = 'neovim/nvim-lspconfig',
})
add({
source = 'williamboman/mason.nvim',
})
add({
source = 'williamboman/mason-lspconfig.nvim'
})
local on_attach = function(client, buffnr)
local lsp_key = function(lhs, rhs, desc)
vim.keymap.set('n', lhs, rhs, { silent = true, buffer = buffnr, desc = desc })
end
lsp_key("<leader>lr", vim.lsp.buf.rename, "Rename symbol")
lsp_key("<leader>la", vim.lsp.buf.code_action, "Code action")
lsp_key("<leader>ld", vim.lsp.buf.type_definition, "Type definition")
lsp_key("gd", vim.lsp.buf.definition, "Goto Definition")
lsp_key("gr", vim.lsp.buf.references, "Goto References")
lsp_key("gI", vim.lsp.buf.implementation, "Goto Implementation")
lsp_key("gD", vim.lsp.buf.declaration, "Goto Declaration")
end
require("mason").setup()
require("mason-lspconfig").setup({
handlers = {
function (server_name)
require('lspconfig')[server_name].setup({
on_attach = on_attach
})
end
}
})
-- make sure LSPs are autostarted if already installed at neovim start
for _, server_name in pairs(require('mason-lspconfig').get_installed_servers()) do
require('lspconfig')[server_name].setup({
on_attach = on_attach
})
end
add({
source = 'folke/trouble.nvim'
})
require('trouble').setup()
vim.keymap.set('n', '<leader>xx', '<cmd>Trouble diagnostics toggle<cr>', { noremap = true, silent = true })
vim.keymap.set('n', '<leader>xd', '<cmd>Trouble diagnostics toggle filter.buf=0<cr>', { noremap = true, silent = true })
end)
-- } LSP
-- treesitter {
later(function()
add({
source = 'nvim-treesitter/nvim-treesitter',
-- Use 'master' while monitoring updates in 'main'
checkout = 'master',
monitor = 'main',
-- Perform action after every checkout
hooks = { post_checkout = function() vim.cmd('TSUpdate') end },
})
-- Possible to immediately execute code which depends on the added plugin
require('nvim-treesitter.configs').setup({
ensure_installed = {
'bash',
'c',
'c_sharp',
'comment',
'cpp',
'cpp',
'css',
'diff',
'dockerfile',
'earthfile',
'fish',
'git_config',
'git_rebase',
'gitattributes',
'gitcommit',
'gitignore',
'go',
'gomod',
'gosum',
'gpg',
'html',
'http',
'ini',
'java',
'javascript',
'jq',
'jsdoc',
'json',
'kotlin',
'lua',
'luadoc',
'make',
'markdown',
'markdown_inline',
'nginx',
'php',
'proto',
'python',
'regex',
'robots',
'rust',
'scss',
'sql',
'ssh_config',
'terraform',
'tmux',
'toml',
'tsv',
'tsx',
'typescript',
'vimdoc',
'xml',
'yaml',
},
sync_install = false,
auto_install = true,
highlight = { enable = true },
indent = { enable = true },
incremental_selection = { enable = true },
})
-- show indentations
add({
source = 'lukas-reineke/indent-blankline.nvim'
})
require("ibl").setup({
indent = {
char = "",
highlight = { "Label" },
},
scope = {
highlight = { "Function" },
}
})
end)
-- } treesitter
-- } non mini.nvim plugins

View file

@ -1,30 +0,0 @@
{
"bufferline.nvim": { "branch": "main", "commit": "243893ba9d5d1049dd451a25cab32ec7f8f67bcf" },
"dracula-pro.nvim": { "branch": "main", "commit": "83d6571c6cb4fd4164888777c254d3e26dc8f18e" },
"dracula.nvim": { "branch": "master", "commit": "2f396b6ba988ad4b3961c2e40d1b9ae436b8c26c" },
"fidget.nvim": { "branch": "main", "commit": "0ba1e16d07627532b6cae915cc992ecac249fb97" },
"gitsigns.nvim": { "branch": "main", "commit": "5a9a6ac29a7805c4783cda21b80a1e361964b3f2" },
"gruvbox.nvim": { "branch": "main", "commit": "477c62493c82684ed510c4f70eaf83802e398898" },
"hop.nvim": { "branch": "master", "commit": "1a1eceafe54b5081eae4cb91c723abd1d450f34b" },
"indent-blankline.nvim": { "branch": "master", "commit": "046e2cf04e08ece927bacbfb87c5b35c0b636546" },
"lazy.nvim": { "branch": "main", "commit": "e42fccc3cda70266e0841c5126de2c23e8982800" },
"lualine.nvim": { "branch": "master", "commit": "2248ef254d0a1488a72041cfb45ca9caada6d994" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "09be3766669bfbabbe2863c624749d8da392c916" },
"mason.nvim": { "branch": "main", "commit": "cd7835b15f5a4204fc37e0aa739347472121a54c" },
"mini.nvim": { "branch": "main", "commit": "7af4878bd0b19fcef385e45715f418165eff1218" },
"neodev.nvim": { "branch": "main", "commit": "d617d9eb27e73e701e446874c6ea2cb528719260" },
"null-ls.nvim": { "branch": "main", "commit": "0010ea927ab7c09ef0ce9bf28c2b573fc302f5a7" },
"nvim-lsp-basics": { "branch": "main", "commit": "632714bd3ab355eb6e725b5a78cd8730f12d14d2" },
"nvim-lspconfig": { "branch": "master", "commit": "6428fcab6f3c09e934bc016c329806314384a41e" },
"nvim-treesitter": { "branch": "master", "commit": "4199be485cd85662d8ff1dc8c4cc78d819fad6cd" },
"nvim-web-devicons": { "branch": "master", "commit": "5de460ca7595806044eced31e3c36c159a493857" },
"plenary.nvim": { "branch": "master", "commit": "50012918b2fc8357b87cff2a7f7f0446e47da174" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "6c921ca12321edaa773e324ef64ea301a1d0da62" },
"telescope.nvim": { "branch": "0.1.x", "commit": "7011eaae0ac1afe036e30c95cf80200b8dc3f21a" },
"trouble.nvim": { "branch": "main", "commit": "f1168feada93c0154ede4d1fe9183bf69bac54ea" },
"vim-fugitive": { "branch": "master", "commit": "cbe9dfa162c178946afa689dd3f42d4ea8bf89c1" },
"vim-illuminate": { "branch": "master", "commit": "3bd2ab64b5d63b29e05691e624927e5ebbf0fb86" },
"vim-sleuth": { "branch": "master", "commit": "1cc4557420f215d02c4d2645a748a816c220e99b" },
"vim-surround": { "branch": "master", "commit": "3d188ed2113431cf8dac77be61b842acb64433d9" },
"which-key.nvim": { "branch": "main", "commit": "4433e5ec9a507e5097571ed55c02ea9658fb268a" }
}

View file

@ -1,2 +0,0 @@
local colorscheme = require("helpers.colorscheme")
vim.cmd.colorscheme(colorscheme)

View file

@ -1,3 +0,0 @@
require("core.options")
require("core.lazy")
require("core.colorscheme")

View file

@ -1,32 +0,0 @@
-- Install lazy.nvim if not already installed
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)
-- Use a protected call so we don't error out on first use
local ok, lazy = pcall(require, "lazy")
if not ok then
return
end
local keys = require("helpers.keys")
-- We have to set the leader key here for lazy.nvim to work
keys.set_leader("\\")
-- Load plugins from specifications
-- (The leader key must be set before this)
lazy.setup("plugins")
-- Might as well set up an easy-access keybinding
keys.map("n", "<leader>L", lazy.show, "Show Lazy")

View file

@ -1,23 +0,0 @@
local opts = {
termguicolors = true, -- enable 24 bit colors
-- tabs look like 4 spaces {
expandtab = true,
tabstop = 4,
shiftwidth = 4,
softtabstop = 4,
-- }
number = true, -- show line numbers
mouse = 'c', -- disable mouse
laststatus = 2, -- always show the status line
autoindent = true, -- turn on autoindent
smarttab = true, -- turn on smart tabs
incsearch = true, -- turn on incremental search
ruler = true, -- show ruler on page
lazyredraw = true, -- make large file bearable
regexpengine = 1, -- make searching large files bearable
background = 'dark' -- use dark theme
}
for opt, val in pairs(opts) do
vim.o[opt] = val
end

View file

@ -1,29 +0,0 @@
{
"workspace.library": [
"/Users/tony.blyler/.local/share/nvim/lazy/neodev.nvim/types/stable",
"/opt/homebrew/Cellar/neovim/0.9.1/share/nvim/runtime/lua",
"/Users/tony.blyler/.local/share/nvim/lazy/bufferline.nvim/lua",
"/Users/tony.blyler/.local/share/nvim/lazy/fidget.nvim/lua",
"/Users/tony.blyler/.local/share/nvim/lazy/nvim-web-devicons/lua",
"/Users/tony.blyler/.local/share/nvim/lazy/lualine.nvim/lua",
"/Users/tony.blyler/.local/share/nvim/lazy/hop.nvim/lua",
"/Users/tony.blyler/.local/share/nvim/lazy/vim-illuminate/lua",
"/Users/tony.blyler/.local/share/nvim/lazy/lazy.nvim/lua",
"/Users/tony.blyler/.local/share/nvim/lazy/nvim-lspconfig/lua",
"/Users/tony.blyler/.local/share/nvim/lazy/gruvbox.nvim/lua",
"/Users/tony.blyler/.local/share/nvim/lazy/plenary.nvim/lua",
"/Users/tony.blyler/.local/share/nvim/lazy/cmp-nvim-lsp/lua",
"/Users/tony.blyler/.local/share/nvim/lazy/which-key.nvim/lua",
"/Users/tony.blyler/.local/share/nvim/lazy/trouble.nvim/lua",
"/Users/tony.blyler/.local/share/nvim/lazy/mason.nvim/lua",
"/Users/tony.blyler/.local/share/nvim/lazy/telescope-fzf-native.nvim/lua",
"/Users/tony.blyler/.local/share/nvim/lazy/nvim-treesitter/lua",
"/Users/tony.blyler/.local/share/nvim/lazy/telescope.nvim/lua",
"/Users/tony.blyler/.local/share/nvim/lazy/neodev.nvim/lua",
"/Users/tony.blyler/.local/share/nvim/lazy/mason-lspconfig.nvim/lua",
"/Users/tony.blyler/.local/share/nvim/lazy/mini.nvim/lua",
"/Users/tony.blyler/.local/share/nvim/lazy/gitsigns.nvim/lua",
"/Users/tony.blyler/.config/nvim/lua",
"${3rd}/luv/library"
]
}

View file

@ -1,23 +0,0 @@
-- Fetch and setup colorscheme if available, otherwise just return 'default'
-- This should prevent Neovim from complaining about missing colorschemes on first boot
local function get_if_available(name, opts)
local lua_ok, colorscheme = pcall(require, name)
if lua_ok then
colorscheme.setup(opts)
return name
end
local vim_ok, _ = pcall(vim.cmd.colorscheme, name)
if vim_ok then
return name
end
return "default"
end
local colorscheme = get_if_available('dracula')
if colorscheme == "default" then
colorscheme = get_if_available('gruvbox')
end
return colorscheme

View file

@ -1,21 +0,0 @@
local M = {}
M.map = function(mode, lhs, rhs, desc)
vim.keymap.set(mode, lhs, rhs, { silent = true, desc = desc })
end
M.lsp_map = function(lhs, rhs, bufnr, desc)
vim.keymap.set("n", lhs, rhs, { silent = true, buffer = bufnr, desc = desc })
end
M.dap_map = function(mode, lhs, rhs, desc)
M.map(mode, lhs, rhs, desc)
end
M.set_leader = function(key)
vim.g.mapleader = key
vim.g.maplocalleader = key
M.map({ "n", "v" }, key, "<nop>")
end
return M

View file

@ -1,9 +0,0 @@
-- See current buffers at the top of the editor
return {
{
"akinsho/bufferline.nvim",
version = "v3.*",
dependencies = "nvim-tree/nvim-web-devicons",
opts = {},
},
}

View file

@ -1,25 +0,0 @@
return {
{
"phaazon/hop.nvim",
config = function()
local hop = require("hop")
hop.setup()
local directions = require("hop.hint").HintDirection
local map = require("helpers.keys").map
map("", "<leader><leader>j", function()
hop.hint_lines({direction = directions.AFTER_CURSOR})
end)
map("", "<leader><leader>k", function()
hop.hint_lines({direction = directions.BEFORE_CURSOR})
end)
map("", "<leader><leader>l", function()
hop.hint_words({direction = directions.AFTER_CURSOR, current_line_only = true})
end)
map("", "<leader><leader>h", function()
hop.hint_words({direction = directions.BEFORE_CURSOR, current_line_only = true})
end)
end,
}
}

View file

@ -1,21 +0,0 @@
-- Git related plugins
return {
{
"lewis6991/gitsigns.nvim",
opts = {
current_line_blame = true,
current_line_blame_opts = {
virt_text = true,
delay = 0,
},
},
},
{
"tpope/vim-fugitive",
config = function ()
local map = require("helpers.keys").map
map("n", "<leader>ga", "<cmd>Git add %<cr>", "Stage the current file")
map("n", "<leader>gb", "<cmd>Git blame<cr>", "Show the blame")
end
}
}

View file

@ -1,13 +0,0 @@
return {
"lukas-reineke/indent-blankline.nvim",
main = "ibl",
opts = {
indent = {
char = "",
highlight = { "Label" },
},
scope = {
highlight = { "Function" },
}
},
}

View file

@ -1,147 +0,0 @@
-- LSP Configuration & Plugins
return {
{
"neovim/nvim-lspconfig",
dependencies = {
"williamboman/mason.nvim",
"williamboman/mason-lspconfig.nvim",
{
"j-hui/fidget.nvim",
tag = "legacy",
},
"folke/neodev.nvim",
"RRethy/vim-illuminate",
"nanotee/nvim-lsp-basics",
"jose-elias-alvarez/null-ls.nvim",
},
config = function()
-- Set up Mason before anything else
require("mason").setup()
require("mason-lspconfig").setup({
ensure_installed = {
"lua_ls",
},
automatic_installation = true,
})
-- Quick access via keymap
require("helpers.keys").map("n", "<leader>M", "<cmd>Mason<cr>", "Show Mason")
-- Neodev setup before LSP config
require("neodev").setup()
-- Turn on LSP status information
require("fidget").setup()
-- linter and formatter configurations
local null_ls = require("null-ls")
null_ls.setup({
sources = {
null_ls.builtins.formatting.prettier,
null_ls.builtins.formatting.gofumpt,
null_ls.builtins.formatting.goimports,
null_ls.builtins.formatting.isort,
null_ls.builtins.formatting.black.with({
extra_args = { "-l 120" }
}),
null_ls.builtins.diagnostics.flake8.with({
extra_args = { "--max-line-length=120" }
}),
null_ls.builtins.diagnostics.markdownlint,
null_ls.builtins.formatting.rubocop,
null_ls.builtins.formatting.rustfmt,
null_ls.builtins.diagnostics.shellcheck,
null_ls.builtins.formatting.stylua,
}
})
-- Set up cool signs for diagnostics
local signs = { Error = "", Warn = "", Hint = "", Info = "" }
for type, icon in pairs(signs) do
local hl = "DiagnosticSign" .. type
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = "" })
end
-- Diagnostic config
local config = {
virtual_text = false,
signs = {
active = signs,
},
update_in_insert = true,
underline = true,
severity_sort = true,
float = {
focusable = true,
style = "minimal",
border = "rounded",
source = "always",
header = "",
prefix = "",
},
}
vim.diagnostic.config(config)
-- This function gets run when an LSP connects to a particular buffer.
local on_attach = function(client, bufnr)
local basics = require("lsp_basics")
basics.make_lsp_commands(client, bufnr)
basics.make_lsp_mappings(client, bufnr)
local lsp_map = require("helpers.keys").lsp_map
lsp_map("<leader>lr", vim.lsp.buf.rename, bufnr, "Rename symbol")
lsp_map("<leader>la", vim.lsp.buf.code_action, bufnr, "Code action")
lsp_map("<leader>ld", vim.lsp.buf.type_definition, bufnr, "Type definition")
lsp_map("<leader>ls", require("telescope.builtin").lsp_document_symbols, bufnr, "Document symbols")
lsp_map("gd", vim.lsp.buf.definition, bufnr, "Goto Definition")
lsp_map("gr", require("telescope.builtin").lsp_references, bufnr, "Goto References")
lsp_map("gI", vim.lsp.buf.implementation, bufnr, "Goto Implementation")
lsp_map("K", vim.lsp.buf.hover, bufnr, "Hover Documentation")
lsp_map("gD", vim.lsp.buf.declaration, bufnr, "Goto Declaration")
-- Create a command `:Format` local to the LSP buffer
vim.api.nvim_buf_create_user_command(bufnr, "Format", function(_)
vim.lsp.buf.format()
end, { desc = "Format current buffer with LSP" })
lsp_map("<leader>ff", "<cmd>Format<cr>", bufnr, "Format")
-- Attach and configure vim-illuminate
require("illuminate").on_attach(client)
end
local lspconfig = require("lspconfig")
require("mason-lspconfig").setup_handlers({
function(server_name)
lspconfig[server_name].setup({
on_attach = on_attach,
})
end,
["lua_ls"] = function()
lspconfig.lua_ls.setup({
on_attach = on_attach,
-- capabilities = capabilities,
settings = {
Lua = {
completion = {
callSnippet = "Replace",
},
diagnostics = {
globals = { "vim" },
},
workspace = {
library = {
[vim.fn.expand("$VIMRUNTIME/lua")] = true,
[vim.fn.stdpath("config") .. "/lua"] = true,
},
},
},
},
})
end
})
end,
},
}

View file

@ -1,38 +0,0 @@
return {
{
"echasnovski/mini.nvim",
config = function()
local animate = require("mini.animate")
local timing = animate.gen_timing.linear({ duration = duration, unit = "total" })
animate.setup({
cursor = {
timing = timing
},
scroll = {
timing = timing
},
resize = {
timing = timing
},
open = {
timing = timing
},
close = {
timing = timing
},
})
require("mini.bufremove").setup()
require("mini.comment").setup()
require("mini.completion").setup()
require("mini.cursorword").setup()
require("mini.pairs").setup()
require("mini.tabline").setup()
require("mini.statusline").setup()
require("mini.surround").setup()
require("mini.trailspace").setup()
vim.api.nvim_command(":command Bd lua MiniBufremove.delete()")
vim.api.nvim_command(":command FixWhitespace lua MiniTrailspace.trim()")
end,
}
}

View file

@ -1,4 +0,0 @@
-- tpope sleuth!
return {
"tpope/vim-sleuth", -- Detect tabstop and shiftwidth automatically
}

View file

@ -1,16 +0,0 @@
-- Fancier statusline
return {
"nvim-lualine/lualine.nvim",
config = function()
local colorscheme = require("helpers.colorscheme")
local lualine_theme = colorscheme == "default" and "auto" or colorscheme
require("lualine").setup({
options = {
icons_enabled = true,
theme = lualine_theme,
component_separators = "|",
section_separators = "",
},
})
end,
}

View file

@ -1,4 +0,0 @@
-- tpope surround!
return {
"tpope/vim-surround", -- Surround stuff with the ys-, cs-, ds- commands
}

View file

@ -1,35 +0,0 @@
-- Telescope fuzzying finding all the things
return {
{
"nvim-telescope/telescope.nvim",
branch = "0.1.x",
dependencies = {
"nvim-lua/plenary.nvim",
-- Fuzzy Finder Algorithm which requires local dependencies to be built. Only load if `make` is available
{ "nvim-telescope/telescope-fzf-native.nvim", build = "make", cond = vim.fn.executable("make") == 1 },
},
config = function()
local telescope = require("telescope")
telescope.setup({
extensions = {
fzf = {
fuzzy = true,
override_generic_sorter = true,
override_file_sorter = true,
case_mode = "smart_case",
}
}
})
-- Enable telescope fzf native, if installed
pcall(telescope.load_extension, "fzf")
local telescope_builtin = require("telescope.builtin")
local keys = require("helpers.keys")
keys.map("", "<C-p>", telescope_builtin.find_files)
keys.map("", "<leader>ff", telescope_builtin.find_files)
keys.map("", "<leader>fg", telescope_builtin.live_grep)
keys.map("", "<leader>fb", telescope_builtin.buffers)
keys.map("", "<leader>fh", telescope_builtin.help_tags)
end,
}
}

View file

@ -1,33 +0,0 @@
return {
{
"ellisonleao/gruvbox.nvim",
priority = 1000,
opts = {
contrast = "hard"
},
},
{
'maxmx03/dracula.nvim',
config = function()
local dracula = require 'dracula'
local draculapro = require 'draculapro'
draculapro.setup({
theme = 'morbius'
})
dracula.setup {
dracula_pro = draculapro,
colors = draculapro.colors
}
vim.cmd.colorscheme 'dracula'
end,
dependencies = {
{
url = "git@git.0xdad.com:tblyler/dracula-pro.nvim.git",
},
},
},
}

View file

@ -1,27 +0,0 @@
-- Highlight, edit, and navigate code
return {
{
"nvim-treesitter/nvim-treesitter",
build = function()
pcall(require("nvim-treesitter.install").update({ with_sync = true }))
end,
config = function()
require("nvim-treesitter.configs").setup({
-- Add languages to be installed here that you want installed for treesitter
ensure_installed = { "go", "javascript", "lua", "python", "rust", "typescript", "vim" },
auto_install = true,
highlight = {
enable = true,
-- Setting this to true will run `:h syntax` and tree-sitter at the same time.
-- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
-- Using this option may slow down your editor, and you may see some duplicate highlights.
-- Instead of true it can also be a list of languages
additional_vim_regex_highlighting = false,
},
indent = { enable = true },
incremental_selection = { enable = true },
})
end,
},
}

View file

@ -1,14 +0,0 @@
return {
"folke/trouble.nvim",
dependencies = { "nvim-tree/nvim-web-devicons" },
config = function()
require("trouble").setup()
local keys = require("helpers.keys")
keys.map("", "<leader>xx", "<cmd>TroubleToggle<cr>")
keys.map("", "<leader>xw", "<cmd>TroubleToggle workspace_diagnostics<cr>")
keys.map("", "<leader>xd", "<cmd>TroubleToggle document_diagnostics<cr>")
keys.map("", "<leader>xq", "<cmd>TroubleToggle quickfix<cr>")
keys.map("", "<leader>xl", "<cmd>TroubleToggle loclist<cr>")
end
}

View file

@ -1,15 +0,0 @@
return {
{
"folke/which-key.nvim",
event = "VeryLazy",
init = function()
vim.o.timeout = true
vim.o.timeoutlen = 300
end,
opts = {
-- your configuration comes here
-- or leave it empty to use the default settings
-- refer to the configuration section below
}
}
}