Autocommit 2023-07-25 11:07:37

This commit is contained in:
2023-12-25 11:07:37 +01:00
parent 309da905e9
commit ee6b24ebb6
13 changed files with 70 additions and 46 deletions

View File

@@ -2,14 +2,16 @@
"Comment.nvim": { "branch": "master", "commit": "0236521ea582747b58869cb72f70ccfa967d2e89" }, "Comment.nvim": { "branch": "master", "commit": "0236521ea582747b58869cb72f70ccfa967d2e89" },
"bufferline.nvim": { "branch": "main", "commit": "6c456b888823d9e4832aa91c482bccd19445c009" }, "bufferline.nvim": { "branch": "main", "commit": "6c456b888823d9e4832aa91c482bccd19445c009" },
"gitsigns.nvim": { "branch": "main", "commit": "d195f0c35ced5174d3ecce1c4c8ebb3b5bc23fa9" }, "gitsigns.nvim": { "branch": "main", "commit": "d195f0c35ced5174d3ecce1c4c8ebb3b5bc23fa9" },
"indent-blankline.nvim": { "branch": "master", "commit": "f3eb33c04c3c5028b4efa7dbf8f68abdb6ab50ed" }, "indent-blankline.nvim": { "branch": "master", "commit": "258b5d899da7c681ce0e0225de32c593f3914c27" },
"lazy.nvim": { "branch": "main", "commit": "96584866b9c5e998cbae300594d0ccfd0c464627" }, "lazy.nvim": { "branch": "main", "commit": "96584866b9c5e998cbae300594d0ccfd0c464627" },
"lualine.nvim": { "branch": "master", "commit": "2248ef254d0a1488a72041cfb45ca9caada6d994" }, "lualine.nvim": { "branch": "master", "commit": "2248ef254d0a1488a72041cfb45ca9caada6d994" },
"nvim-autopairs": { "branch": "master", "commit": "9fd41181693dd4106b3e414a822bb6569924de81" }, "nvim-autopairs": { "branch": "master", "commit": "9fd41181693dd4106b3e414a822bb6569924de81" },
"nvim-tree.lua": { "branch": "master", "commit": "50f30bcd8c62ac4a83d133d738f268279f2c2ce2" }, "nvim-tree.lua": { "branch": "master", "commit": "50f30bcd8c62ac4a83d133d738f268279f2c2ce2" },
"nvim-treesitter": { "branch": "master", "commit": "732c8cb0b43b7336525c3cecb2e28db153994e62" }, "nvim-treesitter": { "branch": "master", "commit": "c153019e11052f38cdf2bdd338750cd103877eba" },
"nvim-web-devicons": { "branch": "master", "commit": "a1425903ab52a0a0460622519e827f224e5b4fee" }, "nvim-web-devicons": { "branch": "master", "commit": "a1425903ab52a0a0460622519e827f224e5b4fee" },
"onedark.nvim": { "branch": "master", "commit": "c5476a091b0f1b4e853db91c91ff941f848a1cdd" }, "onedark.nvim": { "branch": "master", "commit": "c5476a091b0f1b4e853db91c91ff941f848a1cdd" },
"plenary.nvim": { "branch": "master", "commit": "55d9fe89e33efd26f532ef20223e5f9430c8b0c0" },
"rainbow-delimiters.nvim": { "branch": "master", "commit": "a27051f08f6c03928ee9e94339f53da3107857db" }, "rainbow-delimiters.nvim": { "branch": "master", "commit": "a27051f08f6c03928ee9e94339f53da3107857db" },
"telescope.nvim": { "branch": "master", "commit": "d90956833d7c27e73c621a61f20b29fdb7122709" },
"which-key.nvim": { "branch": "main", "commit": "4433e5ec9a507e5097571ed55c02ea9658fb268a" } "which-key.nvim": { "branch": "main", "commit": "4433e5ec9a507e5097571ed55c02ea9658fb268a" }
} }

View File

@@ -1,8 +1,8 @@
function conf() local function config()
--- Ensure plugin is avaiable --- Ensure plugin is avaiable
local bufferline = require("bufferline"); local bufferline = require("bufferline");
--- Bufferline options --- Plugin options
opts = { opts = {
options = { options = {
-- mode = "tabs", -- mode = "tabs",
@@ -10,20 +10,21 @@ function conf()
}, },
} }
--- Load bufferline --- Load plugin
bufferline.setup(opts) bufferline.setup(opts)
--- Override keymaps --- Override keymaps
local km = vim.keymap.set local km = vim.keymap.set
km("n", "<Tab>", ":BufferLineCycleNext<cr>") km("n", "<Tab>", ":BufferLineCycleNext<cr>")
km("n", "<S-Tab>", ":BufferLineCyclePrev<cr>") km("n", "<S-Tab>", ":BufferLineCyclePrev<cr>")
km("n", "<C-n>", ":BufferLineMoveNext<cr>") km("n", "<leader>bn", ":BufferLineMoveNext<cr>")
km("n", "<C-p>", ":BufferLineMovePrev<cr>") km("n", "<leader>bp", ":BufferLineMovePrev<cr>")
km("n", "<leader>bc", ":BufferLinePickClose<cr>")
end end
return { return {
"akinsho/bufferline.nvim", "akinsho/bufferline.nvim",
version = "*", version = "*",
dependencies = "nvim-tree/nvim-web-devicons", dependencies = "nvim-tree/nvim-web-devicons",
config = conf config = config
} }

View File

@@ -1,12 +1,13 @@
function conf() local function config()
--- Ensure plugin is avaiable --- Ensure plugin is avaiable
local comment = require('Comment') local comment = require('Comment')
--- Load plugin
comment.setup() comment.setup()
end end
return { return {
"numToStr/Comment.nvim", "numToStr/Comment.nvim",
event = { "BufReadPre", "BufNewFile" }, event = { "BufReadPre", "BufNewFile" },
config = conf config = config
} }

View File

@@ -1,11 +1,12 @@
function conf() local function config()
--- Ensure plugin is avaiable --- Ensure plugin is avaiable
local gitsigns = require('gitsigns') local gitsigns = require('gitsigns')
--- Load plugin
gitsigns.setup() gitsigns.setup()
end end
return { return {
"lewis6991/gitsigns.nvim", "lewis6991/gitsigns.nvim",
config = conf config = config
} }

View File

@@ -1,11 +1,12 @@
function conf() local function config()
--- Ensure plugin is avaiable --- Ensure plugin is avaiable
local ibl = require("ibl") local ibl = require("ibl")
--- Load plugin
ibl.setup() ibl.setup()
end end
return { return {
"lukas-reineke/indent-blankline.nvim", "lukas-reineke/indent-blankline.nvim",
config = conf, config = config,
} }

View File

@@ -1,8 +1,9 @@
function conf() local function config()
--- Ensure plugins are avaiable --- Ensure plugins are avaiable
local lualine = require("lualine") local lualine = require("lualine")
local lazy_status = require("lazy.status") local lazy_status = require("lazy.status")
--- Plugin options
opts = { opts = {
options = { options = {
theme = "onedark", theme = "onedark",
@@ -21,6 +22,7 @@ function conf()
}, },
} }
--- Load plugin
lualine.setup(opts) lualine.setup(opts)
end end
@@ -29,5 +31,5 @@ return {
dependencies = { dependencies = {
'nvim-tree/nvim-web-devicons', opt = true 'nvim-tree/nvim-web-devicons', opt = true
}, },
config = conf config = config
} }

View File

@@ -1,11 +1,13 @@
function conf() local function config()
--- Ensure plugin is avaiable --- Ensure plugin is avaiable
local nvimautopairs = require("nvim-autopairs") local nvimautopairs = require("nvim-autopairs")
--- Load plugin
nvimautopairs.setup() nvimautopairs.setup()
end end
return { return {
'windwp/nvim-autopairs', 'windwp/nvim-autopairs',
event = "InsertEnter", event = "InsertEnter",
config = conf config = config
} }

View File

@@ -1,12 +1,12 @@
function conf() local function config()
--- Ensure nvim-tree is avaiable --- Ensure plugin is avaiable
local nvimtree = require("nvim-tree") local nvimtree = require("nvim-tree")
--- Unload netrw --- Unload netrw
vim.g.loaded_netrw = 1 vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1 vim.g.loaded_netrwPlugin = 1
--- Nvimtree options --- Plugin options
local opts = { local opts = {
sort = { sort = {
-- sorter = "case_sensitive", -- sorter = "case_sensitive",
@@ -33,15 +33,10 @@ function conf()
}, },
} }
--- Load plugin
nvimtree.setup(opts) nvimtree.setup(opts)
--- Override keymap --- Override keymap
local wk = require("which-key")
wk.register({
e = {
name = "NvimTree", -- optional group name
},
}, { prefix = "<leader>" })
local km = vim.keymap.set local km = vim.keymap.set
km('n', '<C-e>', ':NvimTreeFocus<cr>') km('n', '<C-e>', ':NvimTreeFocus<cr>')
km('n', '<leader>ee', ':NvimTreeToggle<cr>') km('n', '<leader>ee', ':NvimTreeToggle<cr>')
@@ -57,5 +52,5 @@ return {
dependencies = { dependencies = {
"nvim-tree/nvim-web-devicons", "nvim-tree/nvim-web-devicons",
}, },
config = conf config = config
} }

View File

@@ -1,13 +1,12 @@
function conf() local function config()
--- Ensure plugin is avaiable --- Ensure plugin is avaiable
local treesitter = require("nvim-treesitter.configs") local treesitter = require("nvim-treesitter.configs")
--- nvim-treesitter options --- Plugin options
opts = { opts = {
highlight = { highlight = {
enable = true, enable = true,
}, },
-- enable indentation
autotag = { autotag = {
enable = true, enable = true,
}, },
@@ -51,5 +50,5 @@ end
return { return {
"nvim-treesitter/nvim-treesitter", "nvim-treesitter/nvim-treesitter",
event = { "BufReadPre", "BufNewFile" }, event = { "BufReadPre", "BufNewFile" },
config = conf config = config
} }

View File

@@ -1,10 +1,9 @@
function conf() local function config()
require('onedark').load() require('onedark').load()
end end
return { return {
"navarasu/onedark.nvim", "navarasu/onedark.nvim",
lazy=false,
priority = 1000, priority = 1000,
config = conf config = config
} }

View File

@@ -1,4 +1,4 @@
function conf() local function config()
local rainbow_delimiters = require 'rainbow-delimiters' local rainbow_delimiters = require 'rainbow-delimiters'
vim.g.rainbow_delimiters = { vim.g.rainbow_delimiters = {
@@ -29,5 +29,5 @@ end
return { return {
"hiphish/rainbow-delimiters.nvim", "hiphish/rainbow-delimiters.nvim",
event = { "BufReadPre", "BufNewFile" }, event = { "BufReadPre", "BufNewFile" },
config = conf config = config
} }

11
lua/plugins/telescope.lua Normal file
View 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
}

View File

@@ -1,21 +1,31 @@
function conf () local function config()
--- Ensure plugin is avaiable
local wk = require("which-key")
--- Global options --- Global options
vim.o.timeout = true vim.o.timeout = true
vim.o.timeoutlen = 300 vim.o.timeoutlen = 300
--- Add description to leader group
wk.register({
n = {
name = "NoHighLight",
},
e = {
name = "NvimTree",
},
f = {
name = "Telescope"
},
}, { prefix = "<leader>" })
--- Override keymap --- Override keymap
local km = vim.keymap.set local km = vim.keymap.set
km('n', '<C-s>', ':WhichKey<cr>', { desc = "Which-key" }) km('n', '<C-s>', ':WhichKey<cr>', { desc = "Which-key" })
local wk = require("which-key")
wk.register({
n = {
name = "nohl",
},
}, { prefix = "<leader>" })
end end
return { return {
"folke/which-key.nvim", "folke/which-key.nvim",
event = "VeryLazy", event = "VeryLazy",
config = conf, config = config
} }