Autocommit 2023-07-25 11:07:37
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
function conf()
|
||||
local function config()
|
||||
--- Ensure plugin is avaiable
|
||||
local bufferline = require("bufferline");
|
||||
|
||||
--- Bufferline options
|
||||
--- Plugin options
|
||||
opts = {
|
||||
options = {
|
||||
-- mode = "tabs",
|
||||
@@ -10,20 +10,21 @@ function conf()
|
||||
},
|
||||
}
|
||||
|
||||
--- Load bufferline
|
||||
--- Load plugin
|
||||
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>")
|
||||
km("n", "<leader>bn", ":BufferLineMoveNext<cr>")
|
||||
km("n", "<leader>bp", ":BufferLineMovePrev<cr>")
|
||||
km("n", "<leader>bc", ":BufferLinePickClose<cr>")
|
||||
end
|
||||
|
||||
return {
|
||||
"akinsho/bufferline.nvim",
|
||||
version = "*",
|
||||
dependencies = "nvim-tree/nvim-web-devicons",
|
||||
config = conf
|
||||
config = config
|
||||
}
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
function conf()
|
||||
local function config()
|
||||
--- Ensure plugin is avaiable
|
||||
local comment = require('Comment')
|
||||
|
||||
--- Load plugin
|
||||
comment.setup()
|
||||
end
|
||||
|
||||
return {
|
||||
"numToStr/Comment.nvim",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
config = conf
|
||||
config = config
|
||||
}
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
function conf()
|
||||
local function config()
|
||||
--- Ensure plugin is avaiable
|
||||
local gitsigns = require('gitsigns')
|
||||
|
||||
--- Load plugin
|
||||
gitsigns.setup()
|
||||
end
|
||||
|
||||
return {
|
||||
"lewis6991/gitsigns.nvim",
|
||||
config = conf
|
||||
config = config
|
||||
}
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
function conf()
|
||||
local function config()
|
||||
--- Ensure plugin is avaiable
|
||||
local ibl = require("ibl")
|
||||
|
||||
--- Load plugin
|
||||
ibl.setup()
|
||||
end
|
||||
|
||||
|
||||
return {
|
||||
"lukas-reineke/indent-blankline.nvim",
|
||||
config = conf,
|
||||
config = config,
|
||||
}
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
function conf()
|
||||
local function config()
|
||||
--- Ensure plugins are avaiable
|
||||
local lualine = require("lualine")
|
||||
local lazy_status = require("lazy.status")
|
||||
|
||||
--- Plugin options
|
||||
opts = {
|
||||
options = {
|
||||
theme = "onedark",
|
||||
@@ -21,6 +22,7 @@ function conf()
|
||||
},
|
||||
}
|
||||
|
||||
--- Load plugin
|
||||
lualine.setup(opts)
|
||||
end
|
||||
|
||||
@@ -29,5 +31,5 @@ return {
|
||||
dependencies = {
|
||||
'nvim-tree/nvim-web-devicons', opt = true
|
||||
},
|
||||
config = conf
|
||||
config = config
|
||||
}
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
function conf()
|
||||
local function config()
|
||||
--- Ensure plugin is avaiable
|
||||
local nvimautopairs = require("nvim-autopairs")
|
||||
|
||||
--- Load plugin
|
||||
nvimautopairs.setup()
|
||||
end
|
||||
|
||||
return {
|
||||
'windwp/nvim-autopairs',
|
||||
event = "InsertEnter",
|
||||
config = conf
|
||||
config = config
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
function conf()
|
||||
--- Ensure nvim-tree is avaiable
|
||||
local function config()
|
||||
--- Ensure plugin is avaiable
|
||||
local nvimtree = require("nvim-tree")
|
||||
|
||||
--- Unload netrw
|
||||
vim.g.loaded_netrw = 1
|
||||
vim.g.loaded_netrwPlugin = 1
|
||||
|
||||
--- Nvimtree options
|
||||
--- Plugin options
|
||||
local opts = {
|
||||
sort = {
|
||||
-- sorter = "case_sensitive",
|
||||
@@ -33,15 +33,10 @@ function conf()
|
||||
},
|
||||
}
|
||||
|
||||
--- Load plugin
|
||||
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>')
|
||||
@@ -57,5 +52,5 @@ return {
|
||||
dependencies = {
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
},
|
||||
config = conf
|
||||
config = config
|
||||
}
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
function conf()
|
||||
local function config()
|
||||
--- Ensure plugin is avaiable
|
||||
local treesitter = require("nvim-treesitter.configs")
|
||||
|
||||
--- nvim-treesitter options
|
||||
--- Plugin options
|
||||
opts = {
|
||||
highlight = {
|
||||
enable = true,
|
||||
},
|
||||
-- enable indentation
|
||||
autotag = {
|
||||
enable = true,
|
||||
},
|
||||
@@ -51,5 +50,5 @@ end
|
||||
return {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
config = conf
|
||||
config = config
|
||||
}
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
function conf()
|
||||
local function config()
|
||||
require('onedark').load()
|
||||
end
|
||||
|
||||
return {
|
||||
"navarasu/onedark.nvim",
|
||||
lazy=false,
|
||||
priority = 1000,
|
||||
config = conf
|
||||
config = config
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
function conf()
|
||||
local function config()
|
||||
local rainbow_delimiters = require 'rainbow-delimiters'
|
||||
|
||||
vim.g.rainbow_delimiters = {
|
||||
@@ -29,5 +29,5 @@ end
|
||||
return {
|
||||
"hiphish/rainbow-delimiters.nvim",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
config = conf
|
||||
config = config
|
||||
}
|
||||
|
||||
11
lua/plugins/telescope.lua
Normal file
11
lua/plugins/telescope.lua
Normal file
@@ -0,0 +1,11 @@
|
||||
local function config()
|
||||
--- Override keymaps
|
||||
local km = vim.keymap.set
|
||||
km('n', '<leader>ff', builtin.find_files, {})
|
||||
end
|
||||
|
||||
return {
|
||||
'nvim-telescope/telescope.nvim', tag = '0.1.5',
|
||||
dependencies = { 'nvim-lua/plenary.nvim' },
|
||||
config = config
|
||||
}
|
||||
@@ -1,21 +1,31 @@
|
||||
function conf ()
|
||||
local function config()
|
||||
--- Ensure plugin is avaiable
|
||||
local wk = require("which-key")
|
||||
|
||||
--- Global options
|
||||
vim.o.timeout = true
|
||||
vim.o.timeoutlen = 300
|
||||
|
||||
--- Add description to leader group
|
||||
wk.register({
|
||||
n = {
|
||||
name = "NoHighLight",
|
||||
},
|
||||
e = {
|
||||
name = "NvimTree",
|
||||
},
|
||||
f = {
|
||||
name = "Telescope"
|
||||
},
|
||||
}, { prefix = "<leader>" })
|
||||
|
||||
--- 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,
|
||||
config = config
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user