update
This commit is contained in:
parent
fef41dd0d9
commit
b05952056e
1 changed files with 17 additions and 6 deletions
23
init.lua
23
init.lua
|
|
@ -12,7 +12,7 @@ end
|
||||||
vim.opt.rtp:prepend(lazypath)
|
vim.opt.rtp:prepend(lazypath)
|
||||||
|
|
||||||
require("lazy").setup({
|
require("lazy").setup({
|
||||||
{ "NeogitOrg/neogit", dependencies = "nvim-lua/plenary.nvim" },
|
{ "NeogitOrg/neogit", dependencies = "nvim-lua/plenary.nvim" },
|
||||||
"lewis6991/fileline.nvim",
|
"lewis6991/fileline.nvim",
|
||||||
"mfussenegger/nvim-dap",
|
"mfussenegger/nvim-dap",
|
||||||
{
|
{
|
||||||
|
|
@ -107,8 +107,14 @@ require("lazy").setup({
|
||||||
-- to make sure all required plugins and colorschemes are loaded before setup
|
-- to make sure all required plugins and colorschemes are loaded before setup
|
||||||
-- event = "UiEnter",
|
-- event = "UiEnter",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"nvim-lualine/lualine.nvim",
|
||||||
|
requires = { "nvim-tree/nvim-web-devicons", opt = true },
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
require("lualine").setup()
|
||||||
|
|
||||||
-- Terminal tabs
|
-- Terminal tabs
|
||||||
local conditions = require("heirline.conditions")
|
local conditions = require("heirline.conditions")
|
||||||
local utils = require("heirline.utils")
|
local utils = require("heirline.utils")
|
||||||
|
|
@ -196,7 +202,11 @@ local BufferLine = {
|
||||||
end,
|
end,
|
||||||
utils.make_buflist(TablineBufferBlock),
|
utils.make_buflist(TablineBufferBlock),
|
||||||
}
|
}
|
||||||
require("heirline").setup({ winbar = { BufferLine, TerminalLine } })
|
require("heirline").setup({
|
||||||
|
winbar = { TerminalLine },
|
||||||
|
statusline = { TerminalLine },
|
||||||
|
tabline = { BufferLine },
|
||||||
|
})
|
||||||
|
|
||||||
require("overseer").setup()
|
require("overseer").setup()
|
||||||
|
|
||||||
|
|
@ -219,6 +229,7 @@ vim.g.transparent_enabled = true
|
||||||
vim.o.hidden = true
|
vim.o.hidden = true
|
||||||
vim.wo.number = true
|
vim.wo.number = true
|
||||||
vim.o.wrap = false
|
vim.o.wrap = false
|
||||||
|
vim.o.showtabline = 2
|
||||||
vim.g.mapleader = ","
|
vim.g.mapleader = ","
|
||||||
vim.wo.signcolumn = "yes" -- prevents jitter
|
vim.wo.signcolumn = "yes" -- prevents jitter
|
||||||
vim.opt.updatetime = 100
|
vim.opt.updatetime = 100
|
||||||
|
|
@ -253,7 +264,6 @@ local function on_attach(client, buffer)
|
||||||
wk.register({
|
wk.register({
|
||||||
w = {
|
w = {
|
||||||
name = "Word",
|
name = "Word",
|
||||||
h = { vim.lsp.buf.hover, "LSP Hover" },
|
|
||||||
r = { vim.lsp.buf.rename, "Rename" },
|
r = { vim.lsp.buf.rename, "Rename" },
|
||||||
},
|
},
|
||||||
}, { prefix = "<leader>" })
|
}, { prefix = "<leader>" })
|
||||||
|
|
@ -267,6 +277,7 @@ local function on_attach(client, buffer)
|
||||||
vim.keymap.set("n", "gW", vim.lsp.buf.workspace_symbol, keymap_opts)
|
vim.keymap.set("n", "gW", vim.lsp.buf.workspace_symbol, keymap_opts)
|
||||||
vim.keymap.set("n", "gd", vim.lsp.buf.definition, keymap_opts)
|
vim.keymap.set("n", "gd", vim.lsp.buf.definition, keymap_opts)
|
||||||
vim.keymap.set("n", "ga", vim.lsp.buf.code_action, keymap_opts)
|
vim.keymap.set("n", "ga", vim.lsp.buf.code_action, keymap_opts)
|
||||||
|
vim.keymap.set("n", "gh", vim.lsp.buf.hover, keymap_opts)
|
||||||
vim.keymap.set("n", "g[", vim.diagnostic.goto_prev, keymap_opts)
|
vim.keymap.set("n", "g[", vim.diagnostic.goto_prev, keymap_opts)
|
||||||
vim.keymap.set("n", "g]", vim.diagnostic.goto_next, keymap_opts)
|
vim.keymap.set("n", "g]", vim.diagnostic.goto_next, keymap_opts)
|
||||||
end
|
end
|
||||||
|
|
@ -357,9 +368,9 @@ vim.api.nvim_create_autocmd("BufEnter", {
|
||||||
callback = function()
|
callback = function()
|
||||||
local layout = vim.api.nvim_call_function("winlayout", {})
|
local layout = vim.api.nvim_call_function("winlayout", {})
|
||||||
if
|
if
|
||||||
layout[1] == "leaf"
|
layout[1] == "leaf"
|
||||||
and vim.api.nvim_buf_get_option(vim.api.nvim_win_get_buf(layout[2]), "filetype") == "NvimTree"
|
and vim.api.nvim_buf_get_option(vim.api.nvim_win_get_buf(layout[2]), "filetype") == "NvimTree"
|
||||||
and layout[3] == nil
|
and layout[3] == nil
|
||||||
then
|
then
|
||||||
vim.cmd("confirm quit")
|
vim.cmd("confirm quit")
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue