Initial commit
This commit is contained in:
8
lua/plugins/config/blankline.lua
Normal file
8
lua/plugins/config/blankline.lua
Normal file
@@ -0,0 +1,8 @@
|
||||
require("indent_blankline").setup {
|
||||
indentLine_enabled = 1,
|
||||
char = "▏",
|
||||
filetype_exclude = {"help", "terminal", "dashboard", "nvimtree"},
|
||||
buftype_exclude = {"terminal"},
|
||||
show_trailing_blankline_indent = false,
|
||||
show_first_indent_level = false
|
||||
}
|
||||
4
lua/plugins/config/bufdel.lua
Normal file
4
lua/plugins/config/bufdel.lua
Normal file
@@ -0,0 +1,4 @@
|
||||
require("bufdel").setup {
|
||||
next = "alternate",
|
||||
quit = false
|
||||
}
|
||||
7
lua/plugins/config/bufferline.lua
Normal file
7
lua/plugins/config/bufferline.lua
Normal file
@@ -0,0 +1,7 @@
|
||||
require("bufferline").setup {
|
||||
options = {
|
||||
offsets = {{ filetype = "NvimTree", text = "", padding = 1 }},
|
||||
tab_size = 20,
|
||||
separator_style = "thin"
|
||||
}
|
||||
}
|
||||
12
lua/plugins/config/colorizer.lua
Normal file
12
lua/plugins/config/colorizer.lua
Normal file
@@ -0,0 +1,12 @@
|
||||
require("colorizer").setup(
|
||||
{ "*" },
|
||||
{
|
||||
RGB = true,
|
||||
RRGGBB = true,
|
||||
names = true,
|
||||
RRGGBBAA = true,
|
||||
rgb_fn = true,
|
||||
hsl_fn = true,
|
||||
css = true,
|
||||
css_fn = true
|
||||
})
|
||||
10
lua/plugins/config/lualine.lua
Normal file
10
lua/plugins/config/lualine.lua
Normal file
@@ -0,0 +1,10 @@
|
||||
require("lualine").setup {
|
||||
options = {
|
||||
theme = "tokyonight"
|
||||
},
|
||||
extensions = {
|
||||
"nvim-tree",
|
||||
"toggleterm",
|
||||
"quickfix"
|
||||
}
|
||||
}
|
||||
19
lua/plugins/config/nvimtree.lua
Normal file
19
lua/plugins/config/nvimtree.lua
Normal file
@@ -0,0 +1,19 @@
|
||||
local g = vim.g
|
||||
|
||||
g.nvim_tree_indent_markers = 1
|
||||
g.nvim_tree_highlight_opened_files = 1
|
||||
g.nvim_tree_highlight_opened_files = 1
|
||||
g.nvim_tree_group_empty = 1
|
||||
g.nvim_tree_root_folder_modifier = table.concat { ":t:gs?$?/..", string.rep(" ", 1000), "?:gs?^??" }
|
||||
|
||||
require("nvim-tree").setup {
|
||||
disable_netrw = true,
|
||||
ignore_ft_on_setup = { "dashboard" },
|
||||
hijack_cursor = true,
|
||||
git = {
|
||||
ignore = false
|
||||
},
|
||||
view = {
|
||||
hide_root_folder = true
|
||||
}
|
||||
}
|
||||
7
lua/plugins/config/telescope.lua
Normal file
7
lua/plugins/config/telescope.lua
Normal file
@@ -0,0 +1,7 @@
|
||||
local telescope = require("telescope")
|
||||
|
||||
telescope.setup {
|
||||
file_ignore_patterns = { "node_modules" }
|
||||
}
|
||||
|
||||
telescope.load_extension("fzf")
|
||||
7
lua/plugins/config/toggleterm.lua
Normal file
7
lua/plugins/config/toggleterm.lua
Normal file
@@ -0,0 +1,7 @@
|
||||
require("toggleterm").setup {
|
||||
open_mapping = [[<C-t>]],
|
||||
direction = "float",
|
||||
float_opts = {
|
||||
border = "curved"
|
||||
}
|
||||
}
|
||||
2
lua/plugins/config/tokyonight.lua
Normal file
2
lua/plugins/config/tokyonight.lua
Normal file
@@ -0,0 +1,2 @@
|
||||
vim.g.tokyonight_style = "night"
|
||||
vim.cmd[[colorscheme tokyonight]]
|
||||
19
lua/plugins/config/treesitter.lua
Normal file
19
lua/plugins/config/treesitter.lua
Normal file
@@ -0,0 +1,19 @@
|
||||
require("nvim-treesitter.configs").setup {
|
||||
ensure_installed = {
|
||||
"lua",
|
||||
"typescript",
|
||||
"tsx",
|
||||
"json",
|
||||
"javascript"
|
||||
},
|
||||
highlight = {
|
||||
enable = true,
|
||||
use_languagetree = true
|
||||
},
|
||||
matchup = {
|
||||
enable = true
|
||||
},
|
||||
context_commentstring = {
|
||||
enable = true
|
||||
}
|
||||
}
|
||||
8
lua/plugins/init.lua
Normal file
8
lua/plugins/init.lua
Normal file
@@ -0,0 +1,8 @@
|
||||
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
|
||||
packer_bootstrap = fn.system({ "git", "clone", "--depth", "1", "https://github.com/wbthomason/packer.nvim", install_path })
|
||||
print("Installing packer: close and reopen Neovim...")
|
||||
end
|
||||
|
||||
require("plugins.setup")
|
||||
31
lua/plugins/mappings.lua
Normal file
31
lua/plugins/mappings.lua
Normal file
@@ -0,0 +1,31 @@
|
||||
local M = {}
|
||||
|
||||
M.bufdel = {
|
||||
closeBuffer = "<leader>x"
|
||||
}
|
||||
|
||||
M.bufferline = {
|
||||
nextBuffer = "<TAB>",
|
||||
prevBuffer = "<S-Tab"
|
||||
}
|
||||
|
||||
M.gitsigns = {
|
||||
blameLine = "<leader>gb",
|
||||
diffThis = "<leader>gd"
|
||||
}
|
||||
|
||||
M.nvimtree = {
|
||||
toggle = "<C-n>",
|
||||
focus = "<leader>e"
|
||||
}
|
||||
|
||||
M.telescope = {
|
||||
buffers = "<leader>fb",
|
||||
diagnostics = "<leader>fd",
|
||||
liveGrep = "<leader>fw",
|
||||
files = "<leader>ff",
|
||||
gitCommits = "<leader>fgc",
|
||||
gitStatus = "<leader>fgs"
|
||||
}
|
||||
|
||||
return M
|
||||
147
lua/plugins/setup.lua
Normal file
147
lua/plugins/setup.lua
Normal file
@@ -0,0 +1,147 @@
|
||||
require("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",
|
||||
config = function()
|
||||
require("nvim-web-devicons").setup()
|
||||
end
|
||||
}
|
||||
|
||||
use {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
run = ":TSUpdate",
|
||||
config = function()
|
||||
require("plugins.config.treesitter")
|
||||
end
|
||||
}
|
||||
|
||||
use {
|
||||
"andymass/vim-matchup",
|
||||
after = "nvim-treesitter"
|
||||
}
|
||||
|
||||
use {
|
||||
"norcalli/nvim-colorizer.lua",
|
||||
config = function()
|
||||
require("plugins.config.colorizer")
|
||||
end
|
||||
}
|
||||
|
||||
use {
|
||||
"ojroques/nvim-bufdel",
|
||||
config = function()
|
||||
require("plugins.config.bufdel")
|
||||
end,
|
||||
setup = function()
|
||||
require("core.mappings").bufdel()
|
||||
end
|
||||
}
|
||||
|
||||
use {
|
||||
"akinsho/bufferline.nvim",
|
||||
requires = {
|
||||
"kyazdani42/nvim-web-devicons",
|
||||
"ojroques/nvim-bufdel"
|
||||
},
|
||||
config = function()
|
||||
require("plugins.config.bufferline")
|
||||
end,
|
||||
setup = function()
|
||||
require("core.mappings").bufferline()
|
||||
end
|
||||
}
|
||||
|
||||
use {
|
||||
"nvim-lualine/lualine.nvim",
|
||||
requires = "kyazdani42/nvim-web-devicons",
|
||||
config = function()
|
||||
require("plugins.config.lualine")
|
||||
end
|
||||
}
|
||||
|
||||
use {
|
||||
"lewis6991/gitsigns.nvim",
|
||||
requires = "nvim-lua/plenary.nvim",
|
||||
config = function()
|
||||
require("gitsigns").setup()
|
||||
end,
|
||||
setup = function()
|
||||
require("core.mappings").gitsigns()
|
||||
end
|
||||
}
|
||||
|
||||
use {
|
||||
"lukas-reineke/indent-blankline.nvim",
|
||||
event = "BufRead",
|
||||
config = function()
|
||||
require("plugins.config.blankline")
|
||||
end
|
||||
}
|
||||
|
||||
use {
|
||||
"folke/todo-comments.nvim",
|
||||
requires = "nvim-lua/plenary.nvim",
|
||||
config = function()
|
||||
require("todo-comments").setup()
|
||||
end
|
||||
}
|
||||
|
||||
use {
|
||||
"kyazdani42/nvim-tree.lua",
|
||||
requires = "kyazdani42/nvim-web-devicons",
|
||||
config = function()
|
||||
require("plugins.config.nvimtree")
|
||||
end,
|
||||
setup = function()
|
||||
require("core.mappings").nvimtree()
|
||||
end
|
||||
}
|
||||
|
||||
use "JoosepAlviste/nvim-ts-context-commentstring"
|
||||
|
||||
use {
|
||||
"numToStr/Comment.nvim",
|
||||
requires = "JoosepAlviste/nvim-ts-context-commentstring",
|
||||
config = function()
|
||||
require("Comment").setup()
|
||||
end
|
||||
}
|
||||
|
||||
use {
|
||||
"nvim-telescope/telescope.nvim",
|
||||
requires = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
{
|
||||
"nvim-telescope/telescope-fzf-native.nvim",
|
||||
run = "make"
|
||||
}
|
||||
},
|
||||
config = function()
|
||||
require("plugins.config.telescope")
|
||||
end,
|
||||
setup = function()
|
||||
require("core.mappings").telescope()
|
||||
end
|
||||
}
|
||||
|
||||
use {
|
||||
"akinsho/toggleterm.nvim",
|
||||
config = function()
|
||||
require("plugins.config.toggleterm")
|
||||
end
|
||||
}
|
||||
|
||||
if packer_bootstrap then
|
||||
require("packer").sync()
|
||||
end
|
||||
end)
|
||||
Reference in New Issue
Block a user