V2 (#1)
Co-authored-by: Devin Haska <wonderfulfrog@users.noreply.github.com>
This commit is contained in:
parent
8591814ca5
commit
10e4a3af37
26 changed files with 564 additions and 430 deletions
|
@ -1,43 +0,0 @@
|
|||
return {
|
||||
'goolord/alpha-nvim',
|
||||
dependencies = { 'nvim-tree/nvim-web-devicons' },
|
||||
config = function()
|
||||
local alpha = require("alpha")
|
||||
local dashboard = require("alpha.themes.dashboard")
|
||||
|
||||
-- https://github.com/MaximilianLloyd/ascii.nvim
|
||||
dashboard.section.header.val = {
|
||||
" ",
|
||||
" ░░░ ▄▄▄▄▄▄███▄▄▄▄▄ ",
|
||||
" ▄███████▀▀▀▀▀▀█▓▓▓▓▓▓██▄▄▄▄ ",
|
||||
" ▐████▄▄ ■▓▓▓▓▀▀▀▀▀▀▀▀▀█████■ ██▄ ",
|
||||
" ▀█████████▄▄▄▄▄███████████▀▀ ▄▄ ████░▄▄▄ ",
|
||||
" ▐██▄ ▄▄▄▄▄▄▀▀▀▀▀▀▀▀▓▓▓▀░░░▄▄▄ ▄▄ ▐███▏▐██▓▄████ ",
|
||||
" ▄█▓░███▓ ▄▓▓▓▄▄████████████▄█████▄ ▄█████████▐███ ████▏██▀████▀ ",
|
||||
" ▐███▄███░▀████████▀▀ ▀▓█████▓▀██▓████▀▀ ███████ ▄█████ ■ ██▀ ",
|
||||
" ▀████▓██ ▐██████ ▐████ ▐████▀ ▒████████▄ ▄███████ ",
|
||||
" ▀███ ▀▀█████▄ ▄████ ▄████▏ ▄█████▀█████████▀ ███ ",
|
||||
" ▀████▄ ▄████▐██▄███████▄▄▄███▓██▏ ▀██████▀ ▐██ ",
|
||||
" ▀████████▀ ▀████▀▀████████▀▐██▏ ▀██▀▀ ▐██▏ ",
|
||||
" ▓▓█ ▀████ ▀ ■███▄▄ ███ ██▏ ",
|
||||
" ▀▀▀ ▀▀ ▀█████▄▓▀ ██▏ ",
|
||||
" ░░ ▄████████████▄▄▄▄▄▄▄ ▀▀▀████▄▄ ▒▒▒ ██▏ ▄▄ ",
|
||||
" ▀▀████▀▀▀▀▀▀████████████▄▄▓▓▓███▄ ░░░░ ▐█▏ ■▀▀ ",
|
||||
" ▀▀▀▀▀▀█████▓▓▓▓█▄▄ ▐█ ",
|
||||
" ▄█████████▄▄ ",
|
||||
" ▄▄▄▄████████▀▀▀▀▀▀▀███▏ ",
|
||||
" ▄▄█████▀▀▀▀ ▀■ ",
|
||||
" ▄███▀▀▀▀ ",
|
||||
" ■▀▀ ",
|
||||
" ",
|
||||
}
|
||||
|
||||
dashboard.section.buttons.val = {
|
||||
dashboard.button("e", " > New File", "<cmd>ene<CR>"),
|
||||
dashboard.button("SPC ee", " > File explorer", "<cmd>Neotree<CR>"),
|
||||
dashboard.button("q", " > Quit", "<cmd>qa<CR>"),
|
||||
}
|
||||
|
||||
alpha.setup(dashboard.opts)
|
||||
end
|
||||
};
|
100
lua/plugins/coding.lua
Normal file
100
lua/plugins/coding.lua
Normal file
|
@ -0,0 +1,100 @@
|
|||
return {
|
||||
{
|
||||
"hrsh7th/nvim-cmp",
|
||||
dependencies = {
|
||||
"hrsh7th/cmp-nvim-lsp",
|
||||
"hrsh7th/cmp-buffer",
|
||||
},
|
||||
config = function()
|
||||
local cmp = require("cmp")
|
||||
|
||||
cmp.setup({
|
||||
-- Highlights the first result always
|
||||
completion = {
|
||||
completeopt = "menu,menuone,noinsert",
|
||||
},
|
||||
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
["<C-b>"] = cmp.mapping.scroll_docs(-4),
|
||||
["<C-f>"] = cmp.mapping.scroll_docs(4),
|
||||
["<C-o>"] = cmp.mapping.complete(),
|
||||
["<C-e>"] = cmp.mapping.abort(),
|
||||
["<Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i" }),
|
||||
["<S-Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_prev_item()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i" }),
|
||||
["<CR>"] = cmp.mapping.confirm({ select = true }),
|
||||
}),
|
||||
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
require('luasnip').lsp_expand(args.body)
|
||||
end
|
||||
},
|
||||
|
||||
sources = cmp.config.sources({
|
||||
{ name = "nvim_lsp" },
|
||||
{ name = "luasnip" },
|
||||
}, {
|
||||
{ name = "buffer" },
|
||||
}),
|
||||
})
|
||||
end,
|
||||
},
|
||||
{
|
||||
"L3MON4D3/LuaSnip",
|
||||
dependencies = { "rafamadriz/friendly-snippets" },
|
||||
},
|
||||
{
|
||||
"echasnovski/mini.pairs",
|
||||
version = false,
|
||||
opts = {
|
||||
mappings = {
|
||||
["`"] = { action = "closeopen", pair = "``", neigh_pattern = "[^\\`].", register = { cr = false } },
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"echasnovski/mini.surround",
|
||||
version = false,
|
||||
opts = {
|
||||
mappings = {
|
||||
add = "gsa", -- Add surrounding in Normal and Visual modes
|
||||
delete = "gsd", -- Delete surrounding
|
||||
find = "gsf", -- Find surrounding (to the right)
|
||||
find_left = "gsF", -- Find surrounding (to the left)
|
||||
highlight = "gsh", -- Highlight surrounding
|
||||
replace = "gsr", -- Replace surrounding
|
||||
update_n_lines = "gsn", -- Update `n_lines`
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"JoosepAlviste/nvim-ts-context-commentstring",
|
||||
opts = {
|
||||
enable_autocmd = false,
|
||||
},
|
||||
},
|
||||
{
|
||||
"echasnovski/mini.comment",
|
||||
version = false,
|
||||
opts = {
|
||||
options = {
|
||||
custom_commentstring = function()
|
||||
return require("ts_context_commentstring.internal").calculate_commentstring()
|
||||
or vim.bo.commentstring
|
||||
end,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
|
@ -2,7 +2,8 @@ return {
|
|||
"folke/tokyonight.nvim",
|
||||
lazy = true,
|
||||
opts = {
|
||||
style = "storm",
|
||||
transparent = true,
|
||||
dim_inactive = true,
|
||||
}
|
||||
},
|
||||
}
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
return {
|
||||
"tpope/vim-commentary"
|
||||
}
|
|
@ -1,59 +0,0 @@
|
|||
return {
|
||||
{
|
||||
"hrsh7th/nvim-cmp",
|
||||
config = function()
|
||||
local cmp = require("cmp")
|
||||
|
||||
cmp.setup({
|
||||
-- Highlights the first result always
|
||||
completion = {
|
||||
completeopt = "menu,menuone,noinsert"
|
||||
},
|
||||
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
["<C-b>"] = cmp.mapping.scroll_docs(-4),
|
||||
["<C-f>"] = cmp.mapping.scroll_docs(4),
|
||||
["<C-o>"] = cmp.mapping.complete(),
|
||||
["<C-e>"] = cmp.mapping.abort(),
|
||||
["<Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i" }),
|
||||
["<S-Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_prev_item()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i" }),
|
||||
["<CR>"] = cmp.mapping.confirm({
|
||||
behaviour = cmp.ConfirmBehavior.Insert,
|
||||
select = true
|
||||
})
|
||||
}),
|
||||
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
require('luasnip').lsp_expand(args.body)
|
||||
end
|
||||
},
|
||||
|
||||
sources = cmp.config.sources({
|
||||
{ name = "nvim_lsp" },
|
||||
{ name = "luasnip" }
|
||||
}, {
|
||||
{ name = "buffer" }
|
||||
})
|
||||
})
|
||||
end
|
||||
},
|
||||
{
|
||||
"hrsh7th/cmp-nvim-lsp"
|
||||
},
|
||||
{
|
||||
"L3MON4D3/LuaSnip"
|
||||
}
|
||||
}
|
171
lua/plugins/editor.lua
Normal file
171
lua/plugins/editor.lua
Normal file
|
@ -0,0 +1,171 @@
|
|||
return {
|
||||
{
|
||||
"nvim-neo-tree/neo-tree.nvim",
|
||||
event = "VeryLazy",
|
||||
branch = "v3.x",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
"MunifTanjim/nui.nvim",
|
||||
},
|
||||
config = function()
|
||||
vim.keymap.set("n", "<Leader>ee", ":Neotree toggle<CR>", { desc = "Toggle Neotree" })
|
||||
vim.keymap.set("n", "<Leader>er", ":Neotree reveal<CR>", { desc = "Reveal file" })
|
||||
|
||||
local nt = require("neo-tree")
|
||||
|
||||
nt.setup({
|
||||
open_files_do_not_replace_types = { "terminal", "trouble", "qf" },
|
||||
filesystem = {
|
||||
filtered_items = {
|
||||
show_hidden_count = false,
|
||||
hide_dotfiles = false,
|
||||
hide_gitignored = true,
|
||||
always_show = {
|
||||
".env",
|
||||
".env.local",
|
||||
},
|
||||
never_show = {
|
||||
".git",
|
||||
"thumbs.db",
|
||||
".DS_Store",
|
||||
},
|
||||
},
|
||||
},
|
||||
window = {
|
||||
mappings = {
|
||||
["m"] = {
|
||||
"move",
|
||||
config = {
|
||||
show_path = "relative",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
event_handlers = {
|
||||
{
|
||||
event = "neo_tree_popup_input_ready",
|
||||
handler = function()
|
||||
-- Switch to normal inside popups by default.
|
||||
vim.cmd.stopinsert()
|
||||
end,
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
{
|
||||
"folke/which-key.nvim",
|
||||
event = "VeryLazy",
|
||||
init = function()
|
||||
vim.o.timeout = true
|
||||
vim.o.timeoutlen = 300
|
||||
end,
|
||||
opts = {},
|
||||
},
|
||||
{
|
||||
"folke/trouble.nvim",
|
||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||
config = function()
|
||||
vim.keymap.set("n", "<Leader>tt", ":TroubleToggle<CR>", { desc = "Toggle Trouble" })
|
||||
end,
|
||||
},
|
||||
{
|
||||
"folke/todo-comments.nvim",
|
||||
dependencies = { "nvim-lua/plenary.nvim" },
|
||||
opts = {},
|
||||
},
|
||||
{
|
||||
"nvim-pack/nvim-spectre",
|
||||
dependencies = { "nvim-lua/plenary.nvim" },
|
||||
opts = { open_cmd = "noswapfile vnew" },
|
||||
keys = {
|
||||
{
|
||||
"<leader>sr",
|
||||
function()
|
||||
require("spectre").open()
|
||||
end,
|
||||
desc = "Replace in Files (Spectre)",
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"nvim-telescope/telescope.nvim",
|
||||
tag = "0.1.5",
|
||||
dependencies = { "nvim-lua/plenary.nvim" },
|
||||
config = function()
|
||||
local builtin = require("telescope.builtin")
|
||||
|
||||
vim.keymap.set("n", "<Leader>ff", builtin.git_files, { desc = "Search git_files" })
|
||||
vim.keymap.set("n", "<Leader>fg", builtin.live_grep, { desc = "Grep git_files" })
|
||||
vim.keymap.set("n", "<Leader>fh", builtin.help_tags, { desc = "View help tags" })
|
||||
vim.keymap.set("n", "<Leader>fb", builtin.buffers, { desc = "Search buffers" })
|
||||
vim.keymap.set("n", "<Leader>sk", builtin.keymaps, { desc = "View keymaps" })
|
||||
vim.keymap.set("n", "<Leader>sR", builtin.resume, { desc = "Resume" })
|
||||
vim.keymap.set("n", "<Leader>st", "<cmd>TodoTelescope<cr>", { desc = "Search TODOs" })
|
||||
end,
|
||||
},
|
||||
{
|
||||
"nvim-telescope/telescope-ui-select.nvim",
|
||||
config = function()
|
||||
require("telescope").setup({
|
||||
defaults = {
|
||||
initial_mode = "normal",
|
||||
},
|
||||
extensions = {
|
||||
["ui-select"] = {
|
||||
require("telescope.themes").get_dropdown({}),
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
require("telescope").load_extension("ui-select")
|
||||
end,
|
||||
},
|
||||
{
|
||||
"folke/flash.nvim",
|
||||
event = "VeryLazy",
|
||||
---@type Flash.Config
|
||||
opts = {},
|
||||
-- stylua: ignore
|
||||
keys = {
|
||||
{ "s", mode = { "n", "x", "o" }, function() require("flash").jump() end, desc = "Flash" },
|
||||
{ "S", mode = { "n", "x", "o" }, function() require("flash").treesitter() end, desc = "Flash Treesitter" },
|
||||
{ "r", mode = "o", function() require("flash").remote() end, desc = "Remote Flash" },
|
||||
{ "R", mode = { "o", "x" }, function() require("flash").treesitter_search() end, desc = "Treesitter Search" },
|
||||
{ "<c-s>", mode = { "c" }, function() require("flash").toggle() end, desc = "Toggle Flash Search" },
|
||||
},
|
||||
},
|
||||
{
|
||||
"kdheepak/lazygit.nvim",
|
||||
event = "VeryLazy",
|
||||
cmd = {
|
||||
"LazyGit",
|
||||
"LazyGitConfig",
|
||||
"LazyGitCurrentFile",
|
||||
"LazyGitFilter",
|
||||
"LazyGitFilterCurrentFile",
|
||||
},
|
||||
-- optional for floating window border decoration
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
},
|
||||
keys = {
|
||||
{ "<leader>gg", "<cmd>LazyGit<cr>", desc = "LazyGit" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"lewis6991/gitsigns.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = {
|
||||
signs = {
|
||||
add = { text = "▎" },
|
||||
change = { text = "▎" },
|
||||
delete = { text = "" },
|
||||
topdelete = { text = "" },
|
||||
changedelete = { text = "▎" },
|
||||
untracked = { text = "▎" },
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
20
lua/plugins/formatting.lua
Normal file
20
lua/plugins/formatting.lua
Normal file
|
@ -0,0 +1,20 @@
|
|||
return {
|
||||
"stevearc/conform.nvim",
|
||||
opts = {
|
||||
formatters_by_ft = {
|
||||
css = { "prettierd" },
|
||||
scss = { "prettierd" },
|
||||
html = { "djlint" },
|
||||
lua = { "stylelua" },
|
||||
javascript = { "eslint_d", "prettierd" },
|
||||
javascriptreact = { "eslint_d", "prettierd" },
|
||||
json = { "prettierd" },
|
||||
jsonc = { "prettierd" },
|
||||
typescript = { "eslint_d", "prettierd" },
|
||||
typescriptreact = { "eslint_d", "prettierd" },
|
||||
},
|
||||
format_on_save = {
|
||||
lsp_fallback = true,
|
||||
},
|
||||
},
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
return {
|
||||
"tpope/vim-fugitive",
|
||||
config = function()
|
||||
vim.keymap.set("n", "<Leader>gs", vim.cmd.Git, { desc = "View `git status`" })
|
||||
vim.keymap.set("n", "gh", "<cmd>diffget //2<CR>", { desc = "Pick gitdiff on left" })
|
||||
vim.keymap.set("n", "gl", "<cmd>diffget //3<CR>", { desc = "Pick gitdiff on right" })
|
||||
vim.keymap.set("n", "<Leader>gp", ":Git push<CR>", { desc = "Run `git push`" })
|
||||
vim.keymap.set("n", "<Leader>gc", ":Git checkout ", { desc = "Git checkout" })
|
||||
end
|
||||
}
|
|
@ -1,28 +0,0 @@
|
|||
return {
|
||||
"m4xshen/hardtime.nvim",
|
||||
dependencies = { "MunifTanjim/nui.nvim", "nvim-lua/plenary.nvim" },
|
||||
opts = {
|
||||
disable_mouse = true,
|
||||
disabled_keys = {
|
||||
-- Drill Sergeant Demchuk!
|
||||
["<Up>"] = { "", "i" },
|
||||
["<Down>"] = { "", "i" },
|
||||
["<Left>"] = { "", "i" },
|
||||
["<Right>"] = { "", "i" },
|
||||
},
|
||||
disabled_filetypes = {
|
||||
"checkhealth",
|
||||
"fugitive",
|
||||
"help",
|
||||
"lazy",
|
||||
"mason",
|
||||
"markdown",
|
||||
"neo-tree",
|
||||
"neo-tree-popup",
|
||||
"netrw",
|
||||
"noice",
|
||||
"notify",
|
||||
"qf",
|
||||
},
|
||||
},
|
||||
}
|
|
@ -1,32 +0,0 @@
|
|||
return {
|
||||
"mfussenegger/nvim-lint",
|
||||
event = {
|
||||
"BufReadPre",
|
||||
"BufNewFile",
|
||||
},
|
||||
config = function()
|
||||
local lint = require("lint")
|
||||
|
||||
local djlint = lint.linters.djlint
|
||||
djlint.args = {
|
||||
"--reformat",
|
||||
}
|
||||
|
||||
lint.linters_by_ft = {
|
||||
html = { "djlint" },
|
||||
javascript = { "eslint_d" },
|
||||
typescript = { "eslint_d" },
|
||||
javascriptreact = { "eslint_d" },
|
||||
typescriptreact = { "eslint_d" },
|
||||
}
|
||||
|
||||
local lint_augroup = vim.api.nvim_create_augroup("lint", { clear = true })
|
||||
|
||||
vim.api.nvim_create_autocmd({ "BufEnter", "BufWritePost", "InsertLeave" }, {
|
||||
group = lint_augroup,
|
||||
callback = function()
|
||||
lint.try_lint()
|
||||
end,
|
||||
})
|
||||
end,
|
||||
}
|
26
lua/plugins/linting.lua
Normal file
26
lua/plugins/linting.lua
Normal file
|
@ -0,0 +1,26 @@
|
|||
return {
|
||||
"mfussenegger/nvim-lint",
|
||||
opts = {
|
||||
events = { "BufWritePost", "BufReadPost", "InsertLeave" },
|
||||
linters_by_ft = {
|
||||
html = { "djlint" },
|
||||
javascript = { "eslint_d" },
|
||||
typescript = { "eslint_d" },
|
||||
javascriptreact = { "eslint_d" },
|
||||
typescriptreact = { "eslint_d" },
|
||||
},
|
||||
},
|
||||
config = function(_, opts)
|
||||
local lint = require("lint")
|
||||
lint.linters_by_ft = opts.linters_by_ft
|
||||
|
||||
local lint_augroup = vim.api.nvim_create_augroup("lint", { clear = true })
|
||||
|
||||
vim.api.nvim_create_autocmd(opts.events, {
|
||||
group = lint_augroup,
|
||||
callback = function()
|
||||
lint.try_lint()
|
||||
end,
|
||||
})
|
||||
end,
|
||||
}
|
|
@ -1,76 +0,0 @@
|
|||
return {
|
||||
{
|
||||
"williamboman/mason.nvim",
|
||||
config = function()
|
||||
require("mason").setup()
|
||||
end
|
||||
},
|
||||
{
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
config = function()
|
||||
require("mason-lspconfig").setup({
|
||||
ensure_installed = { "lua_ls", "tsserver", "html" }
|
||||
})
|
||||
end
|
||||
},
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
config = function()
|
||||
local lspconfig = require("lspconfig")
|
||||
local capabilities = require("cmp_nvim_lsp").default_capabilities()
|
||||
|
||||
lspconfig.lua_ls.setup({
|
||||
capabilities = capabilities
|
||||
})
|
||||
|
||||
lspconfig.tsserver.setup({
|
||||
capabilities = capabilities,
|
||||
})
|
||||
|
||||
vim.keymap.set('n', 'gd', vim.lsp.buf.definition, { desc = "Go to definition" })
|
||||
vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, { desc = "Go to implementation" })
|
||||
vim.keymap.set('n', 'K', vim.lsp.buf.hover, { desc = "Show signature" })
|
||||
vim.keymap.set('n', '<Leader>f', vim.lsp.buf.format, { desc = "Format buffer" })
|
||||
vim.keymap.set('n', '<Leader>ca', vim.lsp.buf.code_action, { desc = "View code actions" })
|
||||
end
|
||||
},
|
||||
{
|
||||
"WhoIsSethDaniel/mason-tool-installer.nvim",
|
||||
config = function()
|
||||
local mason_tool_installer = require("mason-tool-installer")
|
||||
|
||||
mason_tool_installer.setup({
|
||||
ensure_installed = {
|
||||
"djlint",
|
||||
"prettierd",
|
||||
"eslint_d",
|
||||
},
|
||||
automatic_installation = true
|
||||
})
|
||||
end
|
||||
},
|
||||
{
|
||||
"stevearc/conform.nvim",
|
||||
opts = {
|
||||
formatters_by_ft = {
|
||||
lua = { "stylua" },
|
||||
javascript = { "eslint_d" },
|
||||
javascriptreact = { "eslint_d" },
|
||||
json = { "prettierd" },
|
||||
jsonc = { "prettierd" },
|
||||
yaml = { "prettierd" },
|
||||
typescript = { "eslint_d" },
|
||||
typescriptreact = { "eslint_d" },
|
||||
html = { "djlint" },
|
||||
ejs = { "prettierd" },
|
||||
css = { "prettierd" },
|
||||
scss = { "prettierd" },
|
||||
graphql = { "prettierd" },
|
||||
["_"] = { "trim_whitespace" },
|
||||
},
|
||||
format_on_save = {
|
||||
lsp_fallback = true,
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
60
lua/plugins/lsp.lua
Normal file
60
lua/plugins/lsp.lua
Normal file
|
@ -0,0 +1,60 @@
|
|||
return {
|
||||
{
|
||||
"williamboman/mason.nvim",
|
||||
opts = {},
|
||||
},
|
||||
{
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
"lua_ls",
|
||||
"tsserver",
|
||||
"html",
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"WhoIsSethDaniel/mason-tool-installer.nvim",
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
"djlint",
|
||||
"eslint",
|
||||
"eslint_d",
|
||||
"prettierd",
|
||||
"stylua",
|
||||
},
|
||||
automatic_installation = true,
|
||||
}
|
||||
},
|
||||
-- lspconfig should be the last step.
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
event = "VeryLazy",
|
||||
dependencies = {
|
||||
"mason.nvim",
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
},
|
||||
opts = {
|
||||
servers = {
|
||||
tsserver = {},
|
||||
lua_ls = {},
|
||||
}
|
||||
},
|
||||
config = function(_, opts)
|
||||
local lspconfig = require("lspconfig")
|
||||
|
||||
local servers = opts.servers
|
||||
|
||||
for server, server_opts in pairs(servers) do
|
||||
lspconfig[server].setup(server_opts)
|
||||
end
|
||||
|
||||
vim.keymap.set("n", "gd", vim.lsp.buf.definition, { desc = "Go to definition" })
|
||||
vim.keymap.set("n", "gi", vim.lsp.buf.implementation, { desc = "Go to implementation" })
|
||||
vim.keymap.set("n", "K", vim.lsp.buf.hover, { desc = "Show signature" })
|
||||
vim.keymap.set("n", "<Leader>f", vim.lsp.buf.format, { desc = "Format buffer" })
|
||||
vim.keymap.set("n", "<Leader>ca", vim.lsp.buf.code_action, { desc = "View code actions" })
|
||||
vim.keymap.set("n", "<leader>cr", vim.lsp.buf.rename, { desc = "Rename" })
|
||||
end,
|
||||
},
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
return {
|
||||
'nvim-lualine/lualine.nvim',
|
||||
dependencies = { 'nvim-tree/nvim-web-devicons' },
|
||||
config = function()
|
||||
require('lualine').setup({
|
||||
options = {
|
||||
icons_enabled = true,
|
||||
theme = 'tokyonight'
|
||||
}
|
||||
})
|
||||
end
|
||||
}
|
|
@ -1,52 +0,0 @@
|
|||
return {
|
||||
"nvim-neo-tree/neo-tree.nvim",
|
||||
branch = "v3.x",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
"MunifTanjim/nui.nvim",
|
||||
},
|
||||
config = function()
|
||||
vim.keymap.set("n", "<Leader>nn", ":Neotree toggle<CR>", { desc = "Toggle Neotree" })
|
||||
|
||||
local nt = require("neo-tree")
|
||||
|
||||
nt.setup({
|
||||
open_files_do_not_replace_types = { "terminal", "trouble", "qf" },
|
||||
filesystem = {
|
||||
filtered_items = {
|
||||
show_hidden_count = false,
|
||||
hide_dotfiles = false,
|
||||
hide_gitignored = true,
|
||||
always_show = {
|
||||
".env",
|
||||
},
|
||||
never_show = {
|
||||
".git",
|
||||
"thumbs.db",
|
||||
".DS_Store",
|
||||
},
|
||||
},
|
||||
},
|
||||
window = {
|
||||
mappings = {
|
||||
["m"] = {
|
||||
"move",
|
||||
config = {
|
||||
show_path = "relative",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
event_handlers = {
|
||||
{
|
||||
event = "neo_tree_popup_input_ready",
|
||||
handler = function()
|
||||
-- Switch to normal inside popups by default.
|
||||
vim.cmd.stopinsert()
|
||||
end,
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
return {
|
||||
"tpope/vim-surround"
|
||||
}
|
|
@ -1,36 +0,0 @@
|
|||
return {
|
||||
{
|
||||
'nvim-telescope/telescope.nvim',
|
||||
tag = '0.1.5',
|
||||
dependencies = { 'nvim-lua/plenary.nvim' },
|
||||
config = function()
|
||||
local builtin = require('telescope.builtin')
|
||||
|
||||
vim.keymap.set('n', '<Leader>pp', builtin.git_files, { desc = "Search git_files" })
|
||||
vim.keymap.set('n', '<Leader>pf', builtin.find_files, { desc = "Search all files " })
|
||||
vim.keymap.set('n', '<Leader>fh', builtin.help_tags, { desc = "View help tags" })
|
||||
vim.keymap.set('n', '<Leader>gc', builtin.git_branches, { desc = "Checkout git branches" })
|
||||
vim.keymap.set('n', '<Leader>ps', function()
|
||||
builtin.grep_string({ search = vim.fn.input("Grep > ") })
|
||||
end, { desc = "Grep entire project for string" })
|
||||
vim.keymap.set('n', '<Leader>b', builtin.buffers, { desc = "Search buffers" })
|
||||
end
|
||||
},
|
||||
{
|
||||
"nvim-telescope/telescope-ui-select.nvim",
|
||||
config = function()
|
||||
require("telescope").setup {
|
||||
defaults = {
|
||||
initial_mode = "normal"
|
||||
},
|
||||
extensions = {
|
||||
["ui-select"] = {
|
||||
require("telescope.themes").get_dropdown {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
require("telescope").load_extension("ui-select")
|
||||
end
|
||||
}
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
return {
|
||||
"folke/todo-comments.nvim",
|
||||
dependencies = { "nvim-lua/plenary.nvim" },
|
||||
opts = {},
|
||||
}
|
|
@ -1,26 +1,41 @@
|
|||
return {
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
version = false,
|
||||
build = ":TSUpdate",
|
||||
config = function()
|
||||
local config = require("nvim-treesitter.configs")
|
||||
config.setup({
|
||||
ensure_installed = { "lua", "javascript", "typescript", "tsx", "htmldjango", "html", "jsonc", "json", "jsdoc", "markdown", "markdown_inline", "vim", "vimdoc" },
|
||||
sync_install = false,
|
||||
highlight = { enable = true },
|
||||
indent = { enable = true }
|
||||
})
|
||||
end
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
"lua",
|
||||
"javascript",
|
||||
"typescript",
|
||||
"tsx",
|
||||
"htmldjango",
|
||||
"html",
|
||||
"jsonc",
|
||||
"json",
|
||||
"jsdoc",
|
||||
"markdown",
|
||||
"markdown_inline",
|
||||
"vim",
|
||||
"vimdoc",
|
||||
},
|
||||
highlight = { enable = true },
|
||||
indent = { enable = true },
|
||||
},
|
||||
config = function(_, opts)
|
||||
require("nvim-treesitter.configs").setup(opts)
|
||||
end,
|
||||
},
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter-context",
|
||||
opts = {
|
||||
max_lines = 2,
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
'windwp/nvim-autopairs',
|
||||
event = "InsertEnter",
|
||||
opts = {}
|
||||
}
|
||||
-- TODO: Figure out why this plugin is not working.
|
||||
"windwp/nvim-autopairs",
|
||||
event = "VeryLazy",
|
||||
opts = {},
|
||||
},
|
||||
}
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
return {
|
||||
"folke/trouble.nvim",
|
||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||
config = function()
|
||||
vim.keymap.set("n", "<Leader>tt", ":TroubleToggle<CR>", { desc = "Toggle Trouble" })
|
||||
end
|
||||
}
|
|
@ -1,4 +1,48 @@
|
|||
return {
|
||||
{
|
||||
"nvim-lualine/lualine.nvim",
|
||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||
opts = {
|
||||
options = {
|
||||
icons_enabled = true,
|
||||
theme = "tokyonight",
|
||||
disabled_filetypes = {
|
||||
statusline = {
|
||||
"alpha",
|
||||
"neo-tree",
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
"famiu/bufdelete.nvim",
|
||||
keys = {
|
||||
{ "<leader>bd", "<cmd>Bdelete<cr>", desc = "Close Buffer" },
|
||||
},
|
||||
},
|
||||
{
|
||||
"akinsho/bufferline.nvim",
|
||||
event = "VeryLazy",
|
||||
keys = {
|
||||
{ "<leader>bp", "<cmd>BufferLineTogglePin<cr>", desc = "Toggle Pin" },
|
||||
{ "[b", "<cmd>BufferLineCyclePrev<cr>", desc = "Prev Buffer" },
|
||||
{ "]b", "<cmd>BufferLineCycleNext<cr>", desc = "Next Buffer" },
|
||||
},
|
||||
opts = {
|
||||
options = {
|
||||
diagnostics = "nvim_lsp",
|
||||
offsets = {
|
||||
{
|
||||
filetype = "neo-tree",
|
||||
text = "Neo-tree",
|
||||
highlight = "Directory",
|
||||
text_align = "left",
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"lukas-reineke/indent-blankline.nvim",
|
||||
opts = {
|
||||
|
@ -52,4 +96,71 @@ return {
|
|||
})
|
||||
end,
|
||||
},
|
||||
{
|
||||
"stevearc/dressing.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = {}
|
||||
},
|
||||
{
|
||||
"rcarriga/nvim-notify",
|
||||
opts = {
|
||||
timeout = 2000,
|
||||
stages = "static",
|
||||
}
|
||||
},
|
||||
{
|
||||
"MunifTanjim/nui.nvim"
|
||||
},
|
||||
{
|
||||
"folke/noice.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = {},
|
||||
dependencies = {
|
||||
"MunifTanjim/nui.nvim",
|
||||
"rcarriga/nvim-notify",
|
||||
}
|
||||
},
|
||||
{
|
||||
"goolord/alpha-nvim",
|
||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||
config = function()
|
||||
local alpha = require("alpha")
|
||||
local dashboard = require("alpha.themes.dashboard")
|
||||
|
||||
-- https://github.com/MaximilianLloyd/ascii.nvim
|
||||
dashboard.section.header.val = {
|
||||
" ",
|
||||
" ░░░ ▄▄▄▄▄▄███▄▄▄▄▄ ",
|
||||
" ▄███████▀▀▀▀▀▀█▓▓▓▓▓▓██▄▄▄▄ ",
|
||||
" ▐████▄▄ ■▓▓▓▓▀▀▀▀▀▀▀▀▀█████■ ██▄ ",
|
||||
" ▀█████████▄▄▄▄▄███████████▀▀ ▄▄ ████░▄▄▄ ",
|
||||
" ▐██▄ ▄▄▄▄▄▄▀▀▀▀▀▀▀▀▓▓▓▀░░░▄▄▄ ▄▄ ▐███▏▐██▓▄████ ",
|
||||
" ▄█▓░███▓ ▄▓▓▓▄▄████████████▄█████▄ ▄█████████▐███ ████▏██▀████▀ ",
|
||||
" ▐███▄███░▀████████▀▀ ▀▓█████▓▀██▓████▀▀ ███████ ▄█████ ■ ██▀ ",
|
||||
" ▀████▓██ ▐██████ ▐████ ▐████▀ ▒████████▄ ▄███████ ",
|
||||
" ▀███ ▀▀█████▄ ▄████ ▄████▏ ▄█████▀█████████▀ ███ ",
|
||||
" ▀████▄ ▄████▐██▄███████▄▄▄███▓██▏ ▀██████▀ ▐██ ",
|
||||
" ▀████████▀ ▀████▀▀████████▀▐██▏ ▀██▀▀ ▐██▏ ",
|
||||
" ▓▓█ ▀████ ▀ ■███▄▄ ███ ██▏ ",
|
||||
" ▀▀▀ ▀▀ ▀█████▄▓▀ ██▏ ",
|
||||
" ░░ ▄████████████▄▄▄▄▄▄▄ ▀▀▀████▄▄ ▒▒▒ ██▏ ▄▄ ",
|
||||
" ▀▀████▀▀▀▀▀▀████████████▄▄▓▓▓███▄ ░░░░ ▐█▏ ■▀▀ ",
|
||||
" ▀▀▀▀▀▀█████▓▓▓▓█▄▄ ▐█ ",
|
||||
" ▄█████████▄▄ ",
|
||||
" ▄▄▄▄████████▀▀▀▀▀▀▀███▏ ",
|
||||
" ▄▄█████▀▀▀▀ ▀■ ",
|
||||
" ▄███▀▀▀▀ ",
|
||||
" ■▀▀ ",
|
||||
" ",
|
||||
}
|
||||
|
||||
dashboard.section.buttons.val = {
|
||||
dashboard.button("e", " > New File", "<cmd>ene<CR>"),
|
||||
dashboard.button("SPC ee", " > File explorer", "<cmd>Neotree<CR>"),
|
||||
dashboard.button("q", " > Quit", "<cmd>qa<CR>"),
|
||||
}
|
||||
|
||||
alpha.setup(dashboard.opts)
|
||||
end,
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
return {
|
||||
"folke/which-key.nvim",
|
||||
event = "VeryLazy",
|
||||
init = function()
|
||||
vim.o.timeout = true
|
||||
vim.o.timeoutlen = 300
|
||||
end,
|
||||
opts = {}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue