Adding a lot of plugin
This commit is contained in:
2
init.lua
2
init.lua
@@ -55,7 +55,7 @@ vim.keymap.set("n", "<S-Tab>", ":tabnext<cr>")
|
|||||||
-- Cheatsheet
|
-- Cheatsheet
|
||||||
vim.keymap.set("n", "<C-s>", ":terminal ~/.config/nvim/nvim_help.sh<cr>i")
|
vim.keymap.set("n", "<C-s>", ":terminal ~/.config/nvim/nvim_help.sh<cr>i")
|
||||||
-- No highlight
|
-- No highlight
|
||||||
vim.keymap.set("n", "<leader>nl", ":nohl<cr>")
|
vim.keymap.set("n", "<leader>nh", ":nohl<cr>")
|
||||||
|
|
||||||
--- Automaticly close brackets
|
--- Automaticly close brackets
|
||||||
--vim.keymap.set ("i", "'", "''<Left>")
|
--vim.keymap.set ("i", "'", "''<Left>")
|
||||||
|
|||||||
29
lua/lazy/plugins/bufferline.lua
Normal file
29
lua/lazy/plugins/bufferline.lua
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
function conf()
|
||||||
|
--- Ensure plugin is avaiable
|
||||||
|
local bufferline = require("bufferline");
|
||||||
|
|
||||||
|
--- Bufferline options
|
||||||
|
opts = {
|
||||||
|
options = {
|
||||||
|
-- mode = "tabs",
|
||||||
|
separator_style = "slant",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
--- Load bufferline
|
||||||
|
bufferline.setup(opts)
|
||||||
|
|
||||||
|
--- Override keymaps
|
||||||
|
local km = vim.keymap.set
|
||||||
|
km("n", "<Tab>", ":BufferLineCycleNext<cr>")
|
||||||
|
km("n", "<S-Tab>", ":BufferLineCyclePrev<cr>")
|
||||||
|
km("n", "<C-n>", ":BufferLineMoveNext<cr>")
|
||||||
|
km("n", "<C-p>", ":BufferLineMovePrev<cr>")
|
||||||
|
end
|
||||||
|
|
||||||
|
return {
|
||||||
|
"akinsho/bufferline.nvim",
|
||||||
|
version = "*",
|
||||||
|
dependencies = "nvim-tree/nvim-web-devicons",
|
||||||
|
config = conf
|
||||||
|
}
|
||||||
11
lua/lazy/plugins/gitsigns.lua
Normal file
11
lua/lazy/plugins/gitsigns.lua
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
function conf()
|
||||||
|
--- Ensure plugin is avaiable
|
||||||
|
local gitsigns = require('gitsigns')
|
||||||
|
|
||||||
|
gitsigns.setup()
|
||||||
|
end
|
||||||
|
|
||||||
|
return {
|
||||||
|
"lewis6991/gitsigns.nvim",
|
||||||
|
config = conf
|
||||||
|
}
|
||||||
11
lua/lazy/plugins/indent-blankline.lua
Normal file
11
lua/lazy/plugins/indent-blankline.lua
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
function conf()
|
||||||
|
--- Ensure plugin is avaiable
|
||||||
|
local ibl = require("ibl")
|
||||||
|
ibl.setup()
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
return {
|
||||||
|
"lukas-reineke/indent-blankline.nvim",
|
||||||
|
config = conf,
|
||||||
|
}
|
||||||
33
lua/lazy/plugins/lualine.lua
Normal file
33
lua/lazy/plugins/lualine.lua
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
function conf()
|
||||||
|
--- Ensure plugins are avaiable
|
||||||
|
local lualine = require("lualine")
|
||||||
|
local lazy_status = require("lazy.status")
|
||||||
|
|
||||||
|
opts = {
|
||||||
|
options = {
|
||||||
|
theme = "onedark",
|
||||||
|
},
|
||||||
|
sections = {
|
||||||
|
lualine_x = {
|
||||||
|
{
|
||||||
|
lazy_status.updates,
|
||||||
|
cond = lazy_status.has_updates,
|
||||||
|
color = { fg = "#ff9e64" },
|
||||||
|
},
|
||||||
|
{ "encoding" },
|
||||||
|
{ "fileformat" },
|
||||||
|
{ "filetype" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
lualine.setup(opts)
|
||||||
|
end
|
||||||
|
|
||||||
|
return {
|
||||||
|
'nvim-lualine/lualine.nvim',
|
||||||
|
dependencies = {
|
||||||
|
'nvim-tree/nvim-web-devicons', opt = true
|
||||||
|
},
|
||||||
|
config = conf
|
||||||
|
}
|
||||||
11
lua/lazy/plugins/nvim-autopairs.lua
Normal file
11
lua/lazy/plugins/nvim-autopairs.lua
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
function conf()
|
||||||
|
--- Ensure plugin is avaiable
|
||||||
|
local nvimautopairs = require("nvim-autopairs")
|
||||||
|
nvimautopairs.setup()
|
||||||
|
end
|
||||||
|
|
||||||
|
return {
|
||||||
|
'windwp/nvim-autopairs',
|
||||||
|
event = "InsertEnter",
|
||||||
|
config = conf
|
||||||
|
}
|
||||||
61
lua/lazy/plugins/nvim-tree.lua
Normal file
61
lua/lazy/plugins/nvim-tree.lua
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
function conf()
|
||||||
|
--- Ensure nvim-tree is avaiable
|
||||||
|
local nvimtree = require("nvim-tree")
|
||||||
|
|
||||||
|
--- Unload netrw
|
||||||
|
vim.g.loaded_netrw = 1
|
||||||
|
vim.g.loaded_netrwPlugin = 1
|
||||||
|
|
||||||
|
--- Nvimtree options
|
||||||
|
local opts = {
|
||||||
|
sort = {
|
||||||
|
-- sorter = "case_sensitive",
|
||||||
|
},
|
||||||
|
view = {
|
||||||
|
width = 30,
|
||||||
|
},
|
||||||
|
renderer = {
|
||||||
|
group_empty = true,
|
||||||
|
indent_markers = {
|
||||||
|
enable = true,
|
||||||
|
},
|
||||||
|
icons = {
|
||||||
|
glyphs = {
|
||||||
|
folder = {
|
||||||
|
arrow_closed = "", -- arrow when folder is closed
|
||||||
|
arrow_open = "", -- arrow when folder is open
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
filters = {
|
||||||
|
dotfiles = false,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
nvimtree.setup(opts)
|
||||||
|
|
||||||
|
--- Override keymap
|
||||||
|
local wk = require("which-key")
|
||||||
|
wk.register({
|
||||||
|
e = {
|
||||||
|
name = "NvimTree", -- optional group name
|
||||||
|
},
|
||||||
|
}, { prefix = "<leader>" })
|
||||||
|
local km = vim.keymap.set
|
||||||
|
km('n', '<C-e>', ':NvimTreeFocus<cr>')
|
||||||
|
km('n', '<leader>ee', ':NvimTreeToggle<cr>')
|
||||||
|
km('n', '<leader>ef', ':NvimTreeFindFileToggle<cr>')
|
||||||
|
km('n', '<leader>ec', ':NvimTreeCollapse<cr>')
|
||||||
|
km('n', '<leader>er', ':NvimTreeRefresh<cr>')
|
||||||
|
end
|
||||||
|
|
||||||
|
return {
|
||||||
|
"nvim-tree/nvim-tree.lua",
|
||||||
|
version = "*",
|
||||||
|
lazy = false,
|
||||||
|
dependencies = {
|
||||||
|
"nvim-tree/nvim-web-devicons",
|
||||||
|
},
|
||||||
|
config = conf
|
||||||
|
}
|
||||||
55
lua/lazy/plugins/nvim-treesitter.lua
Normal file
55
lua/lazy/plugins/nvim-treesitter.lua
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
function conf()
|
||||||
|
--- Ensure plugin is avaiable
|
||||||
|
local treesitter = require("nvim-treesitter.configs")
|
||||||
|
|
||||||
|
--- nvim-treesitter options
|
||||||
|
opts = {
|
||||||
|
highlight = {
|
||||||
|
enable = true,
|
||||||
|
},
|
||||||
|
-- enable indentation
|
||||||
|
autotag = {
|
||||||
|
enable = true,
|
||||||
|
},
|
||||||
|
ensure_installed = {
|
||||||
|
"json",
|
||||||
|
"javascript",
|
||||||
|
"typescript",
|
||||||
|
"tsx",
|
||||||
|
"yaml",
|
||||||
|
"html",
|
||||||
|
"css",
|
||||||
|
"prisma",
|
||||||
|
"markdown",
|
||||||
|
"markdown_inline",
|
||||||
|
"svelte",
|
||||||
|
"graphql",
|
||||||
|
"bash",
|
||||||
|
"lua",
|
||||||
|
"vim",
|
||||||
|
"dockerfile",
|
||||||
|
"gitignore",
|
||||||
|
"query",
|
||||||
|
"rst",
|
||||||
|
"php",
|
||||||
|
},
|
||||||
|
incremental_selection = {
|
||||||
|
enable = true,
|
||||||
|
keymaps = {
|
||||||
|
init_selection = "<leader>ss",
|
||||||
|
node_incremental = false,
|
||||||
|
scope_incremental = false,
|
||||||
|
node_decremental = false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
--- Load plugin
|
||||||
|
treesitter.setup(opts)
|
||||||
|
end
|
||||||
|
|
||||||
|
return {
|
||||||
|
"nvim-treesitter/nvim-treesitter",
|
||||||
|
event = { "BufReadPre", "BufNewFile" },
|
||||||
|
config = conf
|
||||||
|
}
|
||||||
33
lua/lazy/plugins/rainbow-delimiters.lua
Normal file
33
lua/lazy/plugins/rainbow-delimiters.lua
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
function conf()
|
||||||
|
local rainbow_delimiters = require 'rainbow-delimiters'
|
||||||
|
|
||||||
|
vim.g.rainbow_delimiters = {
|
||||||
|
strategy = {
|
||||||
|
[''] = rainbow_delimiters.strategy['global'],
|
||||||
|
vim = rainbow_delimiters.strategy['local'],
|
||||||
|
},
|
||||||
|
query = {
|
||||||
|
[''] = 'rainbow-delimiters',
|
||||||
|
lua = 'rainbow-blocks',
|
||||||
|
},
|
||||||
|
priority = {
|
||||||
|
[''] = 110,
|
||||||
|
lua = 210,
|
||||||
|
},
|
||||||
|
highlight = {
|
||||||
|
'RainbowDelimiterYellow',
|
||||||
|
'RainbowDelimiterBlue',
|
||||||
|
'RainbowDelimiterOrange',
|
||||||
|
'RainbowDelimiterGreen',
|
||||||
|
'RainbowDelimiterViolet',
|
||||||
|
'RainbowDelimiterCyan',
|
||||||
|
'RainbowDelimiterRed',
|
||||||
|
},
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
return {
|
||||||
|
"hiphish/rainbow-delimiters.nvim",
|
||||||
|
event = { "BufReadPre", "BufNewFile" },
|
||||||
|
config = conf
|
||||||
|
}
|
||||||
21
lua/lazy/plugins/which-key.lua
Normal file
21
lua/lazy/plugins/which-key.lua
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
function conf ()
|
||||||
|
--- Global options
|
||||||
|
vim.o.timeout = true
|
||||||
|
vim.o.timeoutlen = 300
|
||||||
|
|
||||||
|
--- Override keymap
|
||||||
|
local km = vim.keymap.set
|
||||||
|
km('n', '<C-s>', ':WhichKey<cr>', { desc = "Which-key" })
|
||||||
|
local wk = require("which-key")
|
||||||
|
wk.register({
|
||||||
|
n = {
|
||||||
|
name = "nohl",
|
||||||
|
},
|
||||||
|
}, { prefix = "<leader>" })
|
||||||
|
end
|
||||||
|
|
||||||
|
return {
|
||||||
|
"folke/which-key.nvim",
|
||||||
|
event = "VeryLazy",
|
||||||
|
config = conf,
|
||||||
|
}
|
||||||
@@ -69,7 +69,7 @@ _shortcut "Shift" "tn" "New Table"
|
|||||||
_shortcut "Leader" "tc" "Close tab"
|
_shortcut "Leader" "tc" "Close tab"
|
||||||
|
|
||||||
_title "\e[48;5;170m" "No Highlight"
|
_title "\e[48;5;170m" "No Highlight"
|
||||||
_shortcut "Leader" "hl" "Remove search highlight"
|
_shortcut "Leader" "nh" "Remove search highlight"
|
||||||
|
|
||||||
_title "\e[48;5;092m" "Normal mode"
|
_title "\e[48;5;092m" "Normal mode"
|
||||||
_shortcut "" "w" "Move by word"
|
_shortcut "" "w" "Move by word"
|
||||||
|
|||||||
Reference in New Issue
Block a user