Use lazy.nvim
This commit is contained in:
25
init.lua
25
init.lua
@@ -1,2 +1,23 @@
|
|||||||
require("core.init")
|
-- Import core configuration
|
||||||
require("plugins.init")
|
require("core")
|
||||||
|
require("core.neovide")
|
||||||
|
|
||||||
|
-- Bootstrap lazy.nvim
|
||||||
|
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||||
|
if not vim.loop.fs_stat(lazypath) then
|
||||||
|
vim.fn.system({
|
||||||
|
"git",
|
||||||
|
"clone",
|
||||||
|
"--filter=blob:none",
|
||||||
|
"https://github.com/folke/lazy.nvim.git",
|
||||||
|
"--branch=stable",
|
||||||
|
lazypath
|
||||||
|
})
|
||||||
|
end
|
||||||
|
vim.opt.rtp:prepend(lazypath)
|
||||||
|
|
||||||
|
-- Import plugins
|
||||||
|
require("lazy").setup("plugins")
|
||||||
|
|
||||||
|
-- Set colorscheme
|
||||||
|
vim.cmd [[colorscheme tokyonight]]
|
||||||
|
|||||||
30
lazy-lock.json
Normal file
30
lazy-lock.json
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
{
|
||||||
|
"Comment.nvim": { "branch": "master", "commit": "38d3b7eb553872d8866f14a0dd4fe84126068fce" },
|
||||||
|
"alpha-nvim": { "branch": "main", "commit": "87c204040e3f5d4c1c95067b35905d8f8a2f2545" },
|
||||||
|
"barbar.nvim": { "branch": "master", "commit": "488bbaa3b5455f4b776a61f2b8d10f8f798604c0" },
|
||||||
|
"bigfile.nvim": { "branch": "main", "commit": "c1bad34ce742b4f360b67ca23c873fef998240fc" },
|
||||||
|
"diffview.nvim": { "branch": "main", "commit": "8c1702470fd5186cb401b21f9bf8bdfad6d5cc87" },
|
||||||
|
"filetype.nvim": { "branch": "main", "commit": "b522628a45a17d58fc0073ffd64f9dc9530a8027" },
|
||||||
|
"git-blame.nvim": { "branch": "master", "commit": "06c20ea71a4519fc60caba9ac688f2f6404f03d5" },
|
||||||
|
"gitsigns.nvim": { "branch": "main", "commit": "e5edefd9976039f5352e0c900f35206770b33a2d" },
|
||||||
|
"glow.nvim": { "branch": "main", "commit": "a3f24fdaa71d2c25a2b88026032b34f5b6a6e215" },
|
||||||
|
"guess-indent.nvim": { "branch": "main", "commit": "b8ae749fce17aa4c267eec80a6984130b94f80b2" },
|
||||||
|
"indent-blankline.nvim": { "branch": "master", "commit": "018bd04d80c9a73d399c1061fa0c3b14a7614399" },
|
||||||
|
"lazy.nvim": { "branch": "main", "commit": "bb5cc9ef3bbb17541929b745f74551c900188099" },
|
||||||
|
"lualine.nvim": { "branch": "master", "commit": "84ffb80e452d95e2c46fa29a98ea11a240f7843e" },
|
||||||
|
"neo-tree.nvim": { "branch": "v2.x", "commit": "8d485aab32da9b8841d4af977f992b82b14af469" },
|
||||||
|
"nui.nvim": { "branch": "main", "commit": "ecd9def93891b9260b15b5fcef542eaabf4145c9" },
|
||||||
|
"nvim-colorizer.lua": { "branch": "master", "commit": "dde3084106a70b9a79d48f426f6d6fec6fd203f7" },
|
||||||
|
"nvim-treesitter": { "branch": "master", "commit": "1ca9b938c1c3d8b2c64a168f6a5419b8f3870410" },
|
||||||
|
"nvim-ts-autotag": { "branch": "main", "commit": "40615e96075c743ef47aaf9de966dc348bec6459" },
|
||||||
|
"nvim-ts-context-commentstring": { "branch": "main", "commit": "0bf8fbc2ca8f8cdb6efbd0a9e32740d7a991e4c3" },
|
||||||
|
"nvim-web-devicons": { "branch": "master", "commit": "4ec26d67d419c12a4abaea02f1b6c57b40c08d7e" },
|
||||||
|
"plenary.nvim": { "branch": "master", "commit": "9ac3e9541bbabd9d73663d757e4fe48a675bb054" },
|
||||||
|
"smart-splits.nvim": { "branch": "master", "commit": "e1cd1ab8aac5ad36617aa887912d0d3ba7405799" },
|
||||||
|
"telescope-fzf-native.nvim": { "branch": "main", "commit": "580b6c48651cabb63455e97d7e131ed557b8c7e2" },
|
||||||
|
"telescope.nvim": { "branch": "master", "commit": "713d26b98583b160b50fb827adb751f768238ed3" },
|
||||||
|
"todo-comments.nvim": { "branch": "main", "commit": "8febc60a76feefd8203077ef78b6a262ea1a41f9" },
|
||||||
|
"toggleterm.nvim": { "branch": "main", "commit": "026dff5e2b504941cf172691561a67ea362596aa" },
|
||||||
|
"tokyonight.nvim": { "branch": "main", "commit": "c5df636ce62a8aab7565f35da143cfd672526302" },
|
||||||
|
"vim-matchup": { "branch": "master", "commit": "1e276be9306490e439784cf5e8abe1f93b4a41b6" }
|
||||||
|
}
|
||||||
@@ -13,7 +13,6 @@ opt.swapfile = false
|
|||||||
opt.termguicolors = true
|
opt.termguicolors = true
|
||||||
opt.number = true
|
opt.number = true
|
||||||
opt.mouse = "a"
|
opt.mouse = "a"
|
||||||
opt.cursorline = true
|
|
||||||
opt.hidden = true
|
opt.hidden = true
|
||||||
|
|
||||||
-- Indentation
|
-- Indentation
|
||||||
@@ -21,6 +20,3 @@ opt.expandtab = true
|
|||||||
opt.smartindent = true
|
opt.smartindent = true
|
||||||
opt.shiftwidth = 4
|
opt.shiftwidth = 4
|
||||||
opt.tabstop = 4
|
opt.tabstop = 4
|
||||||
|
|
||||||
-- Neovide GUI
|
|
||||||
require("core.neovide")
|
|
||||||
|
|||||||
11
lua/plugins/barbar.lua
Normal file
11
lua/plugins/barbar.lua
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
return {
|
||||||
|
"romgrk/barbar.nvim",
|
||||||
|
dependencies = "nvim-tree/nvim-web-devicons",
|
||||||
|
init = function() vim.g.barbar_auto_setup = false end,
|
||||||
|
opts = {
|
||||||
|
auto_hide = true,
|
||||||
|
sidebar_filetypes = {
|
||||||
|
["neo-tree"] = { event = "BufWipeout" }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
local nvim_tree_events = require("nvim-tree.events")
|
|
||||||
local bufferline_api = require("bufferline.api")
|
|
||||||
|
|
||||||
local function get_tree_size()
|
|
||||||
return require "nvim-tree.view".View.width
|
|
||||||
end
|
|
||||||
|
|
||||||
nvim_tree_events.subscribe("TreeOpen", function()
|
|
||||||
bufferline_api.set_offset(get_tree_size())
|
|
||||||
end)
|
|
||||||
|
|
||||||
nvim_tree_events.subscribe("Resize", function()
|
|
||||||
bufferline_api.set_offset(get_tree_size())
|
|
||||||
end)
|
|
||||||
|
|
||||||
nvim_tree_events.subscribe("TreeClose", function()
|
|
||||||
bufferline_api.set_offset(0)
|
|
||||||
end)
|
|
||||||
43
lua/plugins/blankline.lua
Normal file
43
lua/plugins/blankline.lua
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
return {
|
||||||
|
"lukas-reineke/indent-blankline.nvim",
|
||||||
|
event = "BufEnter",
|
||||||
|
opts = {
|
||||||
|
char = "▏",
|
||||||
|
context_char = "▏",
|
||||||
|
filetype_exclude = {
|
||||||
|
"help",
|
||||||
|
"terminal",
|
||||||
|
"alpha",
|
||||||
|
"lazy",
|
||||||
|
"neo-tree",
|
||||||
|
"Trouble"
|
||||||
|
},
|
||||||
|
buftype_exclude = { "nofile", "terminal" },
|
||||||
|
context_patterns = {
|
||||||
|
"class",
|
||||||
|
"return",
|
||||||
|
"function",
|
||||||
|
"method",
|
||||||
|
"^if",
|
||||||
|
"^while",
|
||||||
|
"jsx_element",
|
||||||
|
"^for",
|
||||||
|
"^object",
|
||||||
|
"^table",
|
||||||
|
"block",
|
||||||
|
"arguments",
|
||||||
|
"if_statement",
|
||||||
|
"else_clause",
|
||||||
|
"jsx_element",
|
||||||
|
"jsx_self_closing_element",
|
||||||
|
"try_statement",
|
||||||
|
"catch_clause",
|
||||||
|
"import_statement",
|
||||||
|
"operation_type"
|
||||||
|
},
|
||||||
|
show_trailing_blankline_indent = false,
|
||||||
|
show_first_indent_level = false,
|
||||||
|
use_treesitter = true,
|
||||||
|
show_current_context = true
|
||||||
|
}
|
||||||
|
}
|
||||||
19
lua/plugins/colorizer.lua
Normal file
19
lua/plugins/colorizer.lua
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
return {
|
||||||
|
"NvChad/nvim-colorizer.lua",
|
||||||
|
event = "BufEnter",
|
||||||
|
opts = {
|
||||||
|
filetypes = {
|
||||||
|
"*";
|
||||||
|
"!markdown";
|
||||||
|
},
|
||||||
|
user_default_options = {
|
||||||
|
RRGGBBAA = true,
|
||||||
|
AARRGGBB = true,
|
||||||
|
rgb_fn = true,
|
||||||
|
hsl_fn = true,
|
||||||
|
css = true,
|
||||||
|
css_fn = true,
|
||||||
|
sass = { enable = true }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
require("indent_blankline").setup {
|
|
||||||
indentLine_enabled = 1,
|
|
||||||
char = "▏",
|
|
||||||
filetype_exclude = {"help", "terminal", "alpha"},
|
|
||||||
buftype_exclude = {"terminal"},
|
|
||||||
show_trailing_blankline_indent = false,
|
|
||||||
show_first_indent_level = false
|
|
||||||
}
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
local cmp = require("cmp")
|
|
||||||
|
|
||||||
cmp.setup {
|
|
||||||
snippet = {
|
|
||||||
expand = function(args)
|
|
||||||
require("luasnip").lsp_expand(args.body)
|
|
||||||
end
|
|
||||||
},
|
|
||||||
|
|
||||||
mapping = cmp.mapping.preset.insert({
|
|
||||||
["<C-b>"] = cmp.mapping.scroll_docs(-4),
|
|
||||||
["<C-f>"] = cmp.mapping.scroll_docs(4),
|
|
||||||
["<C-Space>"] = cmp.mapping.complete(),
|
|
||||||
["<C-e>"] = cmp.mapping.abort(),
|
|
||||||
["<CR>"] = cmp.mapping.confirm({ select = true }),
|
|
||||||
["<Tab>"] = cmp.mapping.select_next_item(),
|
|
||||||
["<S-Tab>"] = cmp.mapping.select_prev_item()
|
|
||||||
}),
|
|
||||||
|
|
||||||
sources = cmp.config.sources({
|
|
||||||
{ name = "nvim-lsp" },
|
|
||||||
{ name = "luasnip" }
|
|
||||||
}, {
|
|
||||||
{ name = "buffer" }
|
|
||||||
})
|
|
||||||
}
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
require("colorizer").setup {
|
|
||||||
user_default_options = {
|
|
||||||
RRGGBBAA = true,
|
|
||||||
AARRGGBB = true,
|
|
||||||
rgb_fn = true,
|
|
||||||
hsl_fn = true,
|
|
||||||
css = true,
|
|
||||||
css_fn = true,
|
|
||||||
sass = { enable = true }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
require("illuminate").configure {
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
require("lualine").setup {
|
|
||||||
options = {
|
|
||||||
theme = "tokyonight"
|
|
||||||
},
|
|
||||||
|
|
||||||
extensions = {
|
|
||||||
"fzf",
|
|
||||||
"nvim-dap-ui",
|
|
||||||
"nvim-tree",
|
|
||||||
"quickfix",
|
|
||||||
"symbols-outline",
|
|
||||||
"toggleterm"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
local mason = require("mason-lspconfig")
|
|
||||||
local lsp = require("lspconfig")
|
|
||||||
|
|
||||||
mason.setup{}
|
|
||||||
|
|
||||||
mason.setup_handlers {
|
|
||||||
function (server_name)
|
|
||||||
lsp[server_name].setup{}
|
|
||||||
end
|
|
||||||
}
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
require("nvim-tree").setup {
|
|
||||||
view = {
|
|
||||||
hide_root_folder = true
|
|
||||||
},
|
|
||||||
|
|
||||||
renderer = {
|
|
||||||
group_empty = true,
|
|
||||||
highlight_git = true,
|
|
||||||
|
|
||||||
indent_markers = {
|
|
||||||
enable = true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
update_focused_file = {
|
|
||||||
enable = true,
|
|
||||||
update_root = true
|
|
||||||
},
|
|
||||||
|
|
||||||
diagnostics = {
|
|
||||||
enable = true,
|
|
||||||
show_on_dirs = true
|
|
||||||
},
|
|
||||||
|
|
||||||
filters = {
|
|
||||||
custom = { ".git" }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
local telescope = require("telescope")
|
|
||||||
|
|
||||||
telescope.setup {
|
|
||||||
file_ignore_patterns = { "node_modules" }
|
|
||||||
}
|
|
||||||
|
|
||||||
telescope.load_extension("fzf")
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
require("toggleterm").setup {
|
|
||||||
size = function(term)
|
|
||||||
if term.direction == "horizontal" then
|
|
||||||
return 25
|
|
||||||
elseif term.direction == "vertical" then
|
|
||||||
return vim.o.columns * 0.4
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
|
|
||||||
open_mapping = [[<c-t>]],
|
|
||||||
direction = "float",
|
|
||||||
float_opts = {
|
|
||||||
border = "curved"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
require("tokyonight").setup {
|
|
||||||
style = "night",
|
|
||||||
styles = {
|
|
||||||
comments = { italic = true },
|
|
||||||
keywords = { italic = true, bold = true },
|
|
||||||
functions = { italic = true, bold = true },
|
|
||||||
variables = { italic = true, bold = true }
|
|
||||||
},
|
|
||||||
lualine_bold = true
|
|
||||||
}
|
|
||||||
|
|
||||||
vim.cmd [[colorscheme tokyonight]]
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
require("nvim-treesitter.configs").setup {
|
|
||||||
ensure_installed = { "vim", "lua", "typescript" },
|
|
||||||
auto_install = false,
|
|
||||||
|
|
||||||
highlight = {
|
|
||||||
enable = true,
|
|
||||||
additional_vim_regex_highlighting = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,82 +0,0 @@
|
|||||||
local wk = require("which-key")
|
|
||||||
|
|
||||||
wk.setup {
|
|
||||||
ignore_missing = true,
|
|
||||||
key_labels = {
|
|
||||||
["<space>"] = "SPC"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
wk.register({
|
|
||||||
["<leader>"] = {
|
|
||||||
f = {
|
|
||||||
name = "Find",
|
|
||||||
f = { "<cmd>Telescope fd<CR>", "find file" },
|
|
||||||
w = { "<cmd>Telescope live_grep<CR>", "live grep" },
|
|
||||||
s = { "<cmd>Telescope spell_suggest<CR>", "spell suggest" },
|
|
||||||
b = { "<cmd>Telescope buffers<CR>", "all buffers" },
|
|
||||||
t = { "<cmd>TodoTelescope<CR>", "todos" },
|
|
||||||
["."] = { "<cmd>Telescope keymaps<CR>", "keymaps" }
|
|
||||||
},
|
|
||||||
|
|
||||||
l = {
|
|
||||||
name = "LSP",
|
|
||||||
r = { "<cmd>lua require('cosmic-ui').rename()<CR>", "rename" },
|
|
||||||
d = { "<cmd>Telescope diagnostics<CR>", "diagnostics" },
|
|
||||||
f = { "<cmd>lua vim.lsp.buf.format { async = true }<CR>", "format" },
|
|
||||||
a = { "<cmd>CodeActionMenu<CR>", "code action" }
|
|
||||||
},
|
|
||||||
|
|
||||||
b = {
|
|
||||||
name = "Buffer",
|
|
||||||
p = { "<cmd>BufferPick<CR>", "pick buffer" },
|
|
||||||
q = { "<cmd>BufferMovePrevious<CR>", "move buffer left" },
|
|
||||||
w = { "<cmd>BufferMoveNext<CR>", "move buffer right" },
|
|
||||||
x = { "<cmd>BufferCloseAllButCurrent<CR>", "close all but current" }
|
|
||||||
},
|
|
||||||
|
|
||||||
g = {
|
|
||||||
name = "Git",
|
|
||||||
b = { "<cmd>Gitsigns blame_line<CR>", "blame line" },
|
|
||||||
d = { "<cmd>Gitsigns diffthis<CR>", "diff" },
|
|
||||||
s = { "<cmd>Telescope git_status<CR>", "git status" },
|
|
||||||
c = { "<cmd>Telescope git_commits<CR>", "commits" }
|
|
||||||
},
|
|
||||||
|
|
||||||
x = { "<cmd>BufferClose<CR>", "close buffer" },
|
|
||||||
r = { "<cmd>NvimTreeRefresh<CR>", "refresh tree" },
|
|
||||||
c = { "<cmd>Telescope colorscheme<CR>", "colorscheme" },
|
|
||||||
s = { "<cmd>SymbolsOutline<CR>", "symbols outline" },
|
|
||||||
h = { "<cmd>noh<CR>", "no highlight" },
|
|
||||||
|
|
||||||
t = {
|
|
||||||
name = "Terminal",
|
|
||||||
t = { "<cmd>ToggleTerm direction=horizontal<CR>", "open terminal" }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
t = {
|
|
||||||
name = "Trouble",
|
|
||||||
t = { "<cmd>TroubleToggle<CR>", "toggle trouble" }
|
|
||||||
},
|
|
||||||
|
|
||||||
g = {
|
|
||||||
d = { "<cmd>lua vim.lsp.buf.definition()<CR>", "definition" },
|
|
||||||
D = { "<cmd>lua vim.lsp.buf.declaration()<CR>", "declaration" },
|
|
||||||
i = { "<cmd>lua vim.lsp.buf.implementation()<CR>", "implementation" },
|
|
||||||
t = { "<cmd>lua vim.lsp.buf.type_definition()<CR>", "type definition" }
|
|
||||||
},
|
|
||||||
|
|
||||||
K = { "<cmd>lua vim.lsp.buf.hover()<CR>", "hover" },
|
|
||||||
["<C-k>"] = { "<cmd>lua vim.lsp.buf.signature_help()<CR>", "signature help" },
|
|
||||||
|
|
||||||
-- Nvim Tree
|
|
||||||
["<C-n>"] = { "<cmd>NvimTreeToggle .<CR>", "toggle nvimtree" },
|
|
||||||
|
|
||||||
-- Switching Buffers
|
|
||||||
["<TAB>"] = { "<cmd>BufferNext<CR>", "next buffer" },
|
|
||||||
["<S-TAB>"] = { "<cmd>BufferPrevious<CR>", "previous buffer" },
|
|
||||||
|
|
||||||
-- Find in file
|
|
||||||
["<C-f>"] = { "<cmd>Telescope current_buffer_fuzzy_find<CR>", "find in file" }
|
|
||||||
})
|
|
||||||
@@ -1,2 +1,55 @@
|
|||||||
require("plugins.setup")
|
return {
|
||||||
require("plugins.barbar_nvimtree")
|
"nvim-lua/plenary.nvim",
|
||||||
|
"nathom/filetype.nvim",
|
||||||
|
"LunarVim/bigfile.nvim",
|
||||||
|
"f-person/git-blame.nvim",
|
||||||
|
|
||||||
|
{
|
||||||
|
"numToStr/Comment.nvim",
|
||||||
|
event = "BufEnter",
|
||||||
|
config = true
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"goolord/alpha-nvim",
|
||||||
|
dependencies = "nvim-tree/nvim-web-devicons",
|
||||||
|
config = function()
|
||||||
|
require("alpha").setup(require("alpha.themes.dashboard").config)
|
||||||
|
end
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"andymass/vim-matchup",
|
||||||
|
dependencies = "nvim-treesitter/nvim-treesitter",
|
||||||
|
event = "BufEnter"
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"ellisonleao/glow.nvim",
|
||||||
|
cmd = "Glow",
|
||||||
|
config = true
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"folke/todo-comments.nvim",
|
||||||
|
dependencies = "nvim-lua/plenary.nvim",
|
||||||
|
config = true
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"nmac427/guess-indent.nvim",
|
||||||
|
config = true
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"lewis6991/gitsigns.nvim",
|
||||||
|
config = true
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"sindrets/diffview.nvim",
|
||||||
|
dependencies = "nvim-lua/plenary.nvim",
|
||||||
|
cmd = "DiffviewOpen",
|
||||||
|
config = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
19
lua/plugins/lualine.lua
Normal file
19
lua/plugins/lualine.lua
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
return {
|
||||||
|
"nvim-lualine/lualine.nvim",
|
||||||
|
event = "BufEnter",
|
||||||
|
opts = {
|
||||||
|
options = {
|
||||||
|
theme = "tokyonight"
|
||||||
|
},
|
||||||
|
|
||||||
|
extensions = {
|
||||||
|
"fzf",
|
||||||
|
"lazy",
|
||||||
|
"neo-tree",
|
||||||
|
"nvim-dap-ui",
|
||||||
|
"symbols-outline",
|
||||||
|
"toggleterm",
|
||||||
|
"trouble"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
33
lua/plugins/neotree.lua
Normal file
33
lua/plugins/neotree.lua
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
return {
|
||||||
|
"nvim-neo-tree/neo-tree.nvim",
|
||||||
|
dependencies = {
|
||||||
|
"nvim-lua/plenary.nvim",
|
||||||
|
"nvim-tree/nvim-web-devicons",
|
||||||
|
"MunifTanjim/nui.nvim"
|
||||||
|
},
|
||||||
|
cmd = "Neotree",
|
||||||
|
init = function() vim.g.neo_tree_remove_legacy_commands = true end,
|
||||||
|
opts = {
|
||||||
|
close_if_last_window = true,
|
||||||
|
|
||||||
|
source_selector = {
|
||||||
|
winbar = true,
|
||||||
|
content_layout = "center",
|
||||||
|
sources = {
|
||||||
|
{ source = "filesystem" },
|
||||||
|
{ source = "buffers" },
|
||||||
|
{ source = "git_status" },
|
||||||
|
{ source = "diagnostics" }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
group_empty_dirs = true,
|
||||||
|
window = { width = 30 },
|
||||||
|
|
||||||
|
filesystem = {
|
||||||
|
follow_current_file = true,
|
||||||
|
hijack_netrw_behavior = "open_current",
|
||||||
|
use_libuv_file_watcher = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,242 +0,0 @@
|
|||||||
-- Install packer for the first time
|
|
||||||
local ensure_packer = function()
|
|
||||||
local fn = vim.fn
|
|
||||||
local install_path = fn.stdpath("data") .. "/site/pack/packer/start/packer.nvim"
|
|
||||||
if fn.empty(fn.glob(install_path)) > 0 then
|
|
||||||
fn.system({ "git", "clone", "--depth", "1", "https://github.com/wbthomason/packer.nvim", install_path })
|
|
||||||
vim.cmd [[packadd packer.nvim]]
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
return false
|
|
||||||
end
|
|
||||||
|
|
||||||
local packer_bootstrap = ensure_packer()
|
|
||||||
|
|
||||||
-- Safely load packer
|
|
||||||
local ok, packer = pcall(require, "packer")
|
|
||||||
if not ok then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Setup the plugins
|
|
||||||
return packer.startup(function(use)
|
|
||||||
use "wbthomason/packer.nvim"
|
|
||||||
use "nvim-lua/plenary.nvim"
|
|
||||||
use "nathom/filetype.nvim"
|
|
||||||
|
|
||||||
use {
|
|
||||||
"folke/tokyonight.nvim",
|
|
||||||
config = function()
|
|
||||||
require("plugins.config.tokyonight")
|
|
||||||
end
|
|
||||||
}
|
|
||||||
|
|
||||||
use "kyazdani42/nvim-web-devicons"
|
|
||||||
|
|
||||||
use {
|
|
||||||
"kyazdani42/nvim-tree.lua",
|
|
||||||
requires = "kyazdani42/nvim-web-devicons",
|
|
||||||
config = function()
|
|
||||||
require("plugins.config.nvimtree")
|
|
||||||
end
|
|
||||||
}
|
|
||||||
|
|
||||||
use {
|
|
||||||
"romgrk/barbar.nvim",
|
|
||||||
requires = "kyazdani42/nvim-web-devicons"
|
|
||||||
}
|
|
||||||
|
|
||||||
use {
|
|
||||||
"nvim-treesitter/nvim-treesitter",
|
|
||||||
run = ":TSUpdate",
|
|
||||||
config = function()
|
|
||||||
require("plugins.config.treesitter")
|
|
||||||
end
|
|
||||||
}
|
|
||||||
|
|
||||||
use {
|
|
||||||
"nvim-lualine/lualine.nvim",
|
|
||||||
requires = { "kyazdani42/nvim-web-devicons", opt = true },
|
|
||||||
config = function()
|
|
||||||
require("plugins.config.lualine")
|
|
||||||
end
|
|
||||||
}
|
|
||||||
|
|
||||||
use {
|
|
||||||
"NvChad/nvim-colorizer.lua",
|
|
||||||
config = function()
|
|
||||||
require("colorizer").setup()
|
|
||||||
end
|
|
||||||
}
|
|
||||||
|
|
||||||
use {
|
|
||||||
"lewis6991/gitsigns.nvim",
|
|
||||||
config = function()
|
|
||||||
require("gitsigns").setup()
|
|
||||||
end
|
|
||||||
}
|
|
||||||
|
|
||||||
use {
|
|
||||||
"lukas-reineke/indent-blankline.nvim",
|
|
||||||
config = function()
|
|
||||||
require("plugins.config.blankline")
|
|
||||||
end
|
|
||||||
}
|
|
||||||
|
|
||||||
use {
|
|
||||||
"numToStr/Comment.nvim",
|
|
||||||
config = function()
|
|
||||||
require("Comment").setup()
|
|
||||||
end
|
|
||||||
}
|
|
||||||
|
|
||||||
use {
|
|
||||||
"akinsho/toggleterm.nvim",
|
|
||||||
tag = "*",
|
|
||||||
config = function()
|
|
||||||
require("plugins.config.toggleterm")
|
|
||||||
end
|
|
||||||
}
|
|
||||||
|
|
||||||
use {
|
|
||||||
"goolord/alpha-nvim",
|
|
||||||
requires = "kyazdani42/nvim-web-devicons",
|
|
||||||
config = function()
|
|
||||||
require("alpha").setup(require("alpha.themes.dashboard").config)
|
|
||||||
end
|
|
||||||
}
|
|
||||||
|
|
||||||
-- Teleport
|
|
||||||
|
|
||||||
use {
|
|
||||||
"nvim-telescope/telescope-fzf-native.nvim",
|
|
||||||
run = "make"
|
|
||||||
}
|
|
||||||
|
|
||||||
use {
|
|
||||||
"nvim-telescope/telescope.nvim",
|
|
||||||
tag = "0.1.1",
|
|
||||||
requires = "nvim-lua/plenary.nvim",
|
|
||||||
config = function()
|
|
||||||
require("plugins.config.telescope")
|
|
||||||
end
|
|
||||||
}
|
|
||||||
|
|
||||||
-- LSP
|
|
||||||
use {
|
|
||||||
"williamboman/mason.nvim",
|
|
||||||
requires = "neovim/nvim-lspconfig",
|
|
||||||
config = function()
|
|
||||||
require("mason").setup()
|
|
||||||
end
|
|
||||||
}
|
|
||||||
|
|
||||||
use {
|
|
||||||
"williamboman/mason-lspconfig.nvim",
|
|
||||||
requires = {
|
|
||||||
"neovim/nvim-lspconfig",
|
|
||||||
"williamboman/mason.nvim"
|
|
||||||
},
|
|
||||||
config = function()
|
|
||||||
require("plugins.config.mason")
|
|
||||||
end
|
|
||||||
}
|
|
||||||
|
|
||||||
use {
|
|
||||||
"hrsh7th/nvim-cmp",
|
|
||||||
requires = {
|
|
||||||
"hrsh7th/cmp-nvim-lsp",
|
|
||||||
"hrsh7th/cmp-buffer",
|
|
||||||
"hrsh7th/cmp-path",
|
|
||||||
"hrsh7th/cmp-cmdline",
|
|
||||||
"L3MON4D3/LuaSnip",
|
|
||||||
"saadparwaiz1/cmp_luasnip"
|
|
||||||
},
|
|
||||||
config = function()
|
|
||||||
require("plugins.config.cmp")
|
|
||||||
end
|
|
||||||
}
|
|
||||||
|
|
||||||
use {
|
|
||||||
"rafamadriz/friendly-snippets",
|
|
||||||
requires = "L3MON4D3/LuaSnip"
|
|
||||||
}
|
|
||||||
|
|
||||||
use {
|
|
||||||
"ray-x/lsp_signature.nvim",
|
|
||||||
after = "nvim-lspconfig",
|
|
||||||
config = function()
|
|
||||||
require("lsp_signature").setup()
|
|
||||||
end
|
|
||||||
}
|
|
||||||
|
|
||||||
use {
|
|
||||||
"windwp/nvim-autopairs",
|
|
||||||
config = function()
|
|
||||||
require("nvim-autopairs").setup()
|
|
||||||
end
|
|
||||||
}
|
|
||||||
|
|
||||||
use {
|
|
||||||
"folke/trouble.nvim",
|
|
||||||
requires = "kyazdani42/nvim-web-devicons",
|
|
||||||
config = function()
|
|
||||||
require("trouble").setup()
|
|
||||||
end
|
|
||||||
}
|
|
||||||
|
|
||||||
use {
|
|
||||||
"folke/todo-comments.nvim",
|
|
||||||
requires = "nvim-lua/plenary.nvim",
|
|
||||||
config = function()
|
|
||||||
require("todo-comments").setup()
|
|
||||||
end
|
|
||||||
}
|
|
||||||
|
|
||||||
use {
|
|
||||||
"simrat39/symbols-outline.nvim",
|
|
||||||
config = function()
|
|
||||||
require("symbols-outline").setup()
|
|
||||||
end
|
|
||||||
}
|
|
||||||
|
|
||||||
use {
|
|
||||||
"folke/which-key.nvim",
|
|
||||||
config = function()
|
|
||||||
require("plugins.config.whichkey")
|
|
||||||
end
|
|
||||||
}
|
|
||||||
|
|
||||||
use {
|
|
||||||
"RRethy/vim-illuminate",
|
|
||||||
requires = "neovim/nvim-lspconfig"
|
|
||||||
}
|
|
||||||
|
|
||||||
use {
|
|
||||||
"weilbith/nvim-code-action-menu",
|
|
||||||
requires = "neovim/nvim-lspconfig",
|
|
||||||
cmd = "CodeActionMenu"
|
|
||||||
}
|
|
||||||
|
|
||||||
use {
|
|
||||||
"ellisonleao/glow.nvim",
|
|
||||||
config = function()
|
|
||||||
require("glow").setup()
|
|
||||||
end
|
|
||||||
}
|
|
||||||
|
|
||||||
use {
|
|
||||||
"CosmicNvim/cosmic-ui",
|
|
||||||
requires = {
|
|
||||||
"MunifTanjim/nui.nvim",
|
|
||||||
"nvim-lua/plenary.nvim"
|
|
||||||
},
|
|
||||||
config = function()
|
|
||||||
require("cosmic-ui").setup()
|
|
||||||
end
|
|
||||||
}
|
|
||||||
|
|
||||||
if packer_bootstrap then
|
|
||||||
require("packer").sync()
|
|
||||||
end
|
|
||||||
end)
|
|
||||||
7
lua/plugins/smartsplits.lua
Normal file
7
lua/plugins/smartsplits.lua
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
return {
|
||||||
|
"mrjones2014/smart-splits.nvim",
|
||||||
|
build = "./kitty/install-kittens.bash",
|
||||||
|
opt = {
|
||||||
|
ignored_buftypes = { "NeoTree" }
|
||||||
|
}
|
||||||
|
}
|
||||||
20
lua/plugins/telescope.lua
Normal file
20
lua/plugins/telescope.lua
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
return {
|
||||||
|
"nvim-telescope/telescope.nvim",
|
||||||
|
dependencies = {
|
||||||
|
"nvim-telescope/telescope-fzf-native.nvim",
|
||||||
|
enabled = vim.fn.executable "make" == 1,
|
||||||
|
build = "make"
|
||||||
|
},
|
||||||
|
cmd = "Telescope",
|
||||||
|
opts = {
|
||||||
|
defaults = {
|
||||||
|
layout_strategy = "vertical"
|
||||||
|
},
|
||||||
|
|
||||||
|
file_ignore_patterns = { "node_modules" }
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
local telescope = require("telescope")
|
||||||
|
telescope.load_extension("fzf")
|
||||||
|
end
|
||||||
|
}
|
||||||
20
lua/plugins/toggleterm.lua
Normal file
20
lua/plugins/toggleterm.lua
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
return {
|
||||||
|
"akinsho/toggleterm.nvim",
|
||||||
|
version = "*",
|
||||||
|
keys = { "<C-t>" },
|
||||||
|
opts = {
|
||||||
|
size = function(term)
|
||||||
|
if term.direction == "horizontal" then
|
||||||
|
return 25
|
||||||
|
elseif term.direction == "vertical" then
|
||||||
|
return vim.o.columns * 0.4
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
|
||||||
|
open_mapping = [[<c-t>]],
|
||||||
|
direction = "float",
|
||||||
|
float_opts = {
|
||||||
|
border = "curved"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
13
lua/plugins/tokyonight.lua
Normal file
13
lua/plugins/tokyonight.lua
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
return {
|
||||||
|
"folke/tokyonight.nvim",
|
||||||
|
opts = {
|
||||||
|
style = "night",
|
||||||
|
styles = {
|
||||||
|
comments = { italic = true },
|
||||||
|
keywords = { italic = true, bold = true },
|
||||||
|
functions = { italic = true, bold = true },
|
||||||
|
variables = { bold = true }
|
||||||
|
},
|
||||||
|
lualine_bold = true
|
||||||
|
}
|
||||||
|
}
|
||||||
15
lua/plugins/treesitter.lua
Normal file
15
lua/plugins/treesitter.lua
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
return {
|
||||||
|
"nvim-treesitter/nvim-treesitter",
|
||||||
|
dependencies = { "windwp/nvim-ts-autotag", "JoosepAlviste/nvim-ts-context-commentstring" },
|
||||||
|
build = ":TSUpdate",
|
||||||
|
config = function()
|
||||||
|
require("nvim-treesitter.configs").setup {
|
||||||
|
highlight = { enable = true },
|
||||||
|
incremental_selection = { enable = true },
|
||||||
|
indent = { enable = true },
|
||||||
|
autotag = { enable = true },
|
||||||
|
context_commentstring = { enable = true, enable_autocmd = false },
|
||||||
|
matchup = { enable = true }
|
||||||
|
}
|
||||||
|
end
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user