feat: add bufferline
This commit is contained in:
parent
08d972a587
commit
8f4406002f
4
nvim/README.md
Normal file
4
nvim/README.md
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
| Key | Action |
|
||||||
|
| ------------- | ------------------------- |
|
||||||
|
| `<leader>pm` | open package manager |
|
||||||
|
|
|
@ -1,9 +1,16 @@
|
||||||
-- Setup global config
|
-- Setup global config
|
||||||
require("global")
|
require("global")
|
||||||
|
|
||||||
-- Load lazy.nvim package manager
|
-- Setup Neovide config
|
||||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
-- Only run this if inside Neovide
|
||||||
if not vim.loop.fs_stat(lazypath) then
|
if vim.g.neovide then
|
||||||
|
require("neovide")
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Bootstrap package manager
|
||||||
|
do
|
||||||
|
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||||
|
if not vim.loop.fs_stat(lazypath) then
|
||||||
vim.fn.system({
|
vim.fn.system({
|
||||||
"git",
|
"git",
|
||||||
"clone",
|
"clone",
|
||||||
|
@ -12,12 +19,16 @@ if not vim.loop.fs_stat(lazypath) then
|
||||||
"--branch=stable", -- latest stable release
|
"--branch=stable", -- latest stable release
|
||||||
lazypath,
|
lazypath,
|
||||||
})
|
})
|
||||||
|
end
|
||||||
|
vim.opt.rtp:prepend(lazypath)
|
||||||
end
|
end
|
||||||
vim.opt.rtp:prepend(lazypath)
|
|
||||||
|
|
||||||
-- Set up plugins
|
-- Load lazy
|
||||||
plugins = require("plugins")
|
local lazy_ok, lazy = pcall(require, "lazy")
|
||||||
lazy = require("lazy")
|
if lazy_ok then
|
||||||
|
lazy.setup(require("plugins"))
|
||||||
lazy.setup(plugins)
|
vim.keymap.set('n', '<leader>pm', lazy.home, { desc = "Package manager: open" })
|
||||||
|
else
|
||||||
|
print("(init) Couldn't load Lazy")
|
||||||
|
end
|
||||||
|
|
||||||
|
|
|
@ -1,26 +1,27 @@
|
||||||
{
|
{
|
||||||
"LuaSnip": { "branch": "master", "commit": "0b4950a237ce441a6a3a947d501622453f6860ea" },
|
"LuaSnip": { "branch": "master", "commit": "0b4950a237ce441a6a3a947d501622453f6860ea" },
|
||||||
|
"bufferline.nvim": { "branch": "main", "commit": "d24378edc14a675c820a303b4512af3bbc5761e9" },
|
||||||
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
||||||
"cmp-cmdline": { "branch": "main", "commit": "8ee981b4a91f536f52add291594e89fb6645e451" },
|
"cmp-cmdline": { "branch": "main", "commit": "8ee981b4a91f536f52add291594e89fb6645e451" },
|
||||||
"cmp-nvim-lsp": { "branch": "main", "commit": "44b16d11215dce86f253ce0c30949813c0a90765" },
|
"cmp-nvim-lsp": { "branch": "main", "commit": "44b16d11215dce86f253ce0c30949813c0a90765" },
|
||||||
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
||||||
"cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" },
|
"cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" },
|
||||||
"diffview.nvim": { "branch": "main", "commit": "e91110d2a7f8e2f667666aba6ea089ff823f8748" },
|
"diffview.nvim": { "branch": "main", "commit": "e91110d2a7f8e2f667666aba6ea089ff823f8748" },
|
||||||
"gitsigns.nvim": { "branch": "main", "commit": "11b80e7eea249affc8776483272bcfc627b5552a" },
|
"gitsigns.nvim": { "branch": "main", "commit": "5d73da785a3c05fd63ac31769079db05169a6ec7" },
|
||||||
"haskell-tools.nvim": { "branch": "1.x.x", "commit": "43ec3b2f068c8163476dbb0c35bcb8ad7d588fa4" },
|
"haskell-tools.nvim": { "branch": "1.x.x", "commit": "43ec3b2f068c8163476dbb0c35bcb8ad7d588fa4" },
|
||||||
"kanagawa.nvim": { "branch": "master", "commit": "1749cea392acb7d1548a946fcee1e6f1304cd3cb" },
|
"kanagawa.nvim": { "branch": "master", "commit": "1749cea392acb7d1548a946fcee1e6f1304cd3cb" },
|
||||||
"lazy.nvim": { "branch": "main", "commit": "3ad55ae678876516156cca2f361c51f7952a924b" },
|
"lazy.nvim": { "branch": "main", "commit": "3ad55ae678876516156cca2f361c51f7952a924b" },
|
||||||
"lualine.nvim": { "branch": "master", "commit": "05d78e9fd0cdfb4545974a5aa14b1be95a86e9c9" },
|
"lualine.nvim": { "branch": "master", "commit": "05d78e9fd0cdfb4545974a5aa14b1be95a86e9c9" },
|
||||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "e86a4c84ff35240639643ffed56ee1c4d55f538e" },
|
"mason-lspconfig.nvim": { "branch": "main", "commit": "e86a4c84ff35240639643ffed56ee1c4d55f538e" },
|
||||||
"mason-nvim-dap.nvim": { "branch": "main", "commit": "e4d56b400e9757b1dc77d620fd3069396e92d5fc" },
|
"mason-nvim-dap.nvim": { "branch": "main", "commit": "e4d56b400e9757b1dc77d620fd3069396e92d5fc" },
|
||||||
"mason.nvim": { "branch": "main", "commit": "5e58cdbcde0469d487873e531c71ef97df821adb" },
|
"mason.nvim": { "branch": "main", "commit": "fe9e34a9ab4d64321cdc3ecab4ea1809239bb73f" },
|
||||||
"neo-tree.nvim": { "branch": "v3.x", "commit": "981a43adcca25e7ccc3c589902d49f25e4d48ebc" },
|
"neo-tree.nvim": { "branch": "v3.x", "commit": "981a43adcca25e7ccc3c589902d49f25e4d48ebc" },
|
||||||
"nui.nvim": { "branch": "main", "commit": "9e3916e784660f55f47daa6f26053ad044db5d6a" },
|
"nui.nvim": { "branch": "main", "commit": "9e3916e784660f55f47daa6f26053ad044db5d6a" },
|
||||||
"nvim-cmp": { "branch": "main", "commit": "c4e491a87eeacf0408902c32f031d802c7eafce8" },
|
"nvim-cmp": { "branch": "main", "commit": "c4e491a87eeacf0408902c32f031d802c7eafce8" },
|
||||||
"nvim-dap": { "branch": "master", "commit": "d17d1bba23ec72a157bd183c57840c39e323f515" },
|
"nvim-dap": { "branch": "master", "commit": "2f28ea843bcdb378b171a66ddcd568516e431d55" },
|
||||||
"nvim-dap-ui": { "branch": "master", "commit": "85b16ac2309d85c88577cd8ee1733ce52be8227e" },
|
"nvim-dap-ui": { "branch": "master", "commit": "85b16ac2309d85c88577cd8ee1733ce52be8227e" },
|
||||||
"nvim-lspconfig": { "branch": "master", "commit": "6f426c34c8e21af2f934e56be9d1198a507ecc9f" },
|
"nvim-lspconfig": { "branch": "master", "commit": "b6091272422bb0fbd729f7f5d17a56d37499c54f" },
|
||||||
"nvim-treesitter": { "branch": "master", "commit": "74a7da4e4be5ee71e9efb6d7bdffa16ad620cc57" },
|
"nvim-treesitter": { "branch": "master", "commit": "ee107fc759647293a84ad42b867f518331364fbe" },
|
||||||
"nvim-web-devicons": { "branch": "master", "commit": "efbfed0567ef4bfac3ce630524a0f6c8451c5534" },
|
"nvim-web-devicons": { "branch": "master", "commit": "efbfed0567ef4bfac3ce630524a0f6c8451c5534" },
|
||||||
"plenary.nvim": { "branch": "master", "commit": "267282a9ce242bbb0c5dc31445b6d353bed978bb" },
|
"plenary.nvim": { "branch": "master", "commit": "267282a9ce242bbb0c5dc31445b6d353bed978bb" },
|
||||||
"presence.nvim": { "branch": "main", "commit": "87c857a56b7703f976d3a5ef15967d80508df6e6" },
|
"presence.nvim": { "branch": "main", "commit": "87c857a56b7703f976d3a5ef15967d80508df6e6" },
|
||||||
|
|
|
@ -12,7 +12,7 @@ return function()
|
||||||
standalone = true,
|
standalone = true,
|
||||||
-- capabilities = capabilities,
|
-- capabilities = capabilities,
|
||||||
on_attach = function(client, bufnr)
|
on_attach = function(client, bufnr)
|
||||||
local buf_opts = { noremap = true, silent = true, buffer = buf_number }
|
local buf_opts = { noremap = true, silent = true, buffer = bufnr }
|
||||||
vim.keymap.set('n', "<C-b>", rt.hover_actions.hover_actions, buf_opts)
|
vim.keymap.set('n', "<C-b>", rt.hover_actions.hover_actions, buf_opts)
|
||||||
vim.keymap.set('n', "<Leader>a", rt.code_action_group.code_action_group, buf_opts)
|
vim.keymap.set('n', "<Leader>a", rt.code_action_group.code_action_group, buf_opts)
|
||||||
vim.keymap.set('n', 'K', vim.lsp.buf.hover, buf_opts)
|
vim.keymap.set('n', 'K', vim.lsp.buf.hover, buf_opts)
|
||||||
|
|
|
@ -13,21 +13,19 @@ opt.expandtab = true
|
||||||
|
|
||||||
-- Line numbers
|
-- Line numbers
|
||||||
opt.number = true
|
opt.number = true
|
||||||
|
opt.relativenumber = true
|
||||||
|
|
||||||
-- Clipboard
|
-- Clipboard
|
||||||
opt.clipboard = "unnamedplus"
|
opt.clipboard = "unnamedplus"
|
||||||
|
|
||||||
-- Helper punctuation
|
-- Helper punctuation
|
||||||
vim.opt.list = true
|
opt.list = true
|
||||||
vim.opt.listchars = {
|
opt.listchars = {
|
||||||
trail = '·',
|
trail = '·',
|
||||||
nbsp = '␣',
|
nbsp = '␣',
|
||||||
tab = '→→',
|
tab = '→→',
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Neovide
|
|
||||||
g.neovide_scale_factor = 0.75
|
|
||||||
|
|
||||||
-- Trailing whitespace
|
-- Trailing whitespace
|
||||||
-- vim.fn.matchadd("errorMsg", [[\s\+$]])
|
-- vim.fn.matchadd("errorMsg", [[\s\+$]])
|
||||||
vim.api.nvim_create_autocmd("BufWritePre", { command = [[%s/\s\+$//e]] })
|
vim.api.nvim_create_autocmd("BufWritePre", { command = [[%s/\s\+$//e]] })
|
||||||
|
|
2
nvim/lua/neovide.lua
Normal file
2
nvim/lua/neovide.lua
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
vim.g.neovide_scale_factor = 0.75
|
||||||
|
|
|
@ -49,6 +49,19 @@ return {
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
-- Bufferline
|
||||||
|
{
|
||||||
|
'akinsho/bufferline.nvim',
|
||||||
|
version = "*",
|
||||||
|
dependencies = {
|
||||||
|
'nvim-tree/nvim-web-devicons'
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
local config = require("bufferline")
|
||||||
|
config.setup({})
|
||||||
|
end
|
||||||
|
},
|
||||||
|
|
||||||
-- Git diffviewer
|
-- Git diffviewer
|
||||||
{
|
{
|
||||||
"sindrets/diffview.nvim",
|
"sindrets/diffview.nvim",
|
||||||
|
@ -92,7 +105,9 @@ return {
|
||||||
-- nvim
|
-- nvim
|
||||||
"vim", "vimdoc", "lua",
|
"vim", "vimdoc", "lua",
|
||||||
-- misc
|
-- misc
|
||||||
"comment", "gitignore", "diff", "dockerfile", "json", "yaml", "toml", "regex",
|
"comment", "dockerfile", "json", "yaml", "toml", "regex",
|
||||||
|
-- git
|
||||||
|
"gitcommit", "gitignore", "diff",
|
||||||
-- shell
|
-- shell
|
||||||
"bash", -- "fish", "nu",
|
"bash", -- "fish", "nu",
|
||||||
-- markdown
|
-- markdown
|
||||||
|
|
Loading…
Reference in a new issue