update
This commit is contained in:
parent
76d9c95927
commit
a2bd139738
1 changed files with 12 additions and 11 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",
|
||||||
{
|
{
|
||||||
|
|
@ -95,6 +95,7 @@ require("lazy").setup({
|
||||||
"edluffy/hologram.nvim",
|
"edluffy/hologram.nvim",
|
||||||
"xiyaowong/transparent.nvim",
|
"xiyaowong/transparent.nvim",
|
||||||
"ellisonleao/gruvbox.nvim",
|
"ellisonleao/gruvbox.nvim",
|
||||||
|
"rebelot/kanagawa.nvim",
|
||||||
{
|
{
|
||||||
"williamboman/mason.nvim",
|
"williamboman/mason.nvim",
|
||||||
build = ":MasonUpdate", -- :MasonUpdate updates registry contents
|
build = ":MasonUpdate", -- :MasonUpdate updates registry contents
|
||||||
|
|
@ -121,9 +122,9 @@ require("lazy").setup({
|
||||||
-- refer to the configuration section below
|
-- refer to the configuration section below
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{ "ellisonleao/glow.nvim", config = true, cmd = "Glow" },
|
{ "ellisonleao/glow.nvim", config = true, cmd = "Glow" },
|
||||||
"nvim-pack/nvim-spectre",
|
"nvim-pack/nvim-spectre",
|
||||||
{ "rcarriga/nvim-dap-ui", requires = { "mfussenegger/nvim-dap" } },
|
{ "rcarriga/nvim-dap-ui", requires = { "mfussenegger/nvim-dap" } },
|
||||||
{
|
{
|
||||||
"nvim-neorg/neorg",
|
"nvim-neorg/neorg",
|
||||||
build = ":Neorg sync-parsers",
|
build = ":Neorg sync-parsers",
|
||||||
|
|
@ -197,7 +198,7 @@ local TablineFileFlags = {
|
||||||
{
|
{
|
||||||
condition = function(self)
|
condition = function(self)
|
||||||
return not vim.api.nvim_buf_get_option(self.bufnr, "modifiable")
|
return not vim.api.nvim_buf_get_option(self.bufnr, "modifiable")
|
||||||
or vim.api.nvim_buf_get_option(self.bufnr, "readonly")
|
or vim.api.nvim_buf_get_option(self.bufnr, "readonly")
|
||||||
end,
|
end,
|
||||||
provider = function(self)
|
provider = function(self)
|
||||||
if vim.api.nvim_buf_get_option(self.bufnr, "buftype") == "terminal" then
|
if vim.api.nvim_buf_get_option(self.bufnr, "buftype") == "terminal" then
|
||||||
|
|
@ -215,7 +216,7 @@ local FileIcon = {
|
||||||
local filename = self.filename
|
local filename = self.filename
|
||||||
local extension = vim.fn.fnamemodify(filename, ":e")
|
local extension = vim.fn.fnamemodify(filename, ":e")
|
||||||
self.icon, self.icon_color =
|
self.icon, self.icon_color =
|
||||||
require("nvim-web-devicons").get_icon_color(filename, extension, { default = true })
|
require("nvim-web-devicons").get_icon_color(filename, extension, { default = true })
|
||||||
end,
|
end,
|
||||||
provider = function(self)
|
provider = function(self)
|
||||||
return self.icon and (self.icon .. " ")
|
return self.icon and (self.icon .. " ")
|
||||||
|
|
@ -245,7 +246,7 @@ local TablineFileNameBlock = {
|
||||||
end,
|
end,
|
||||||
name = "termline_buffer_callback",
|
name = "termline_buffer_callback",
|
||||||
},
|
},
|
||||||
FileIcon, -- turns out the version defined in #crash-course-part-ii-filename-and-friends can be reutilized as is here!
|
FileIcon, -- turns out the version defined in #crash-course-part-ii-filename-and-friends can be reutilized as is here!
|
||||||
TablineFileName,
|
TablineFileName,
|
||||||
TablineFileFlags, -- turns out the version defined in #crash-course-part-ii-filename-and-friends can be reutilized as is here!
|
TablineFileFlags, -- turns out the version defined in #crash-course-part-ii-filename-and-friends can be reutilized as is here!
|
||||||
}
|
}
|
||||||
|
|
@ -290,14 +291,14 @@ end, { TerminalLineFileNameBlock })
|
||||||
local function get_terminal_bufs()
|
local function get_terminal_bufs()
|
||||||
return vim.tbl_filter(function(bufnr)
|
return vim.tbl_filter(function(bufnr)
|
||||||
return vim.api.nvim_buf_get_option(bufnr, "buftype") == "terminal"
|
return vim.api.nvim_buf_get_option(bufnr, "buftype") == "terminal"
|
||||||
and vim.api.nvim_buf_get_var(bufnr, "show_in_terminal_bar")
|
and vim.api.nvim_buf_get_var(bufnr, "show_in_terminal_bar")
|
||||||
end, vim.api.nvim_list_bufs())
|
end, vim.api.nvim_list_bufs())
|
||||||
end
|
end
|
||||||
|
|
||||||
local function get_non_terminal_bufs()
|
local function get_non_terminal_bufs()
|
||||||
return vim.tbl_filter(function(bufnr)
|
return vim.tbl_filter(function(bufnr)
|
||||||
return vim.api.nvim_buf_get_option(bufnr, "buftype") ~= "terminal"
|
return vim.api.nvim_buf_get_option(bufnr, "buftype") ~= "terminal"
|
||||||
and vim.api.nvim_buf_get_option(bufnr, "buflisted")
|
and vim.api.nvim_buf_get_option(bufnr, "buflisted")
|
||||||
end, vim.api.nvim_list_bufs())
|
end, vim.api.nvim_list_bufs())
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -347,7 +348,7 @@ vim.g.maplocalleader = " "
|
||||||
vim.wo.signcolumn = "yes" -- prevents jitter
|
vim.wo.signcolumn = "yes" -- prevents jitter
|
||||||
vim.opt.updatetime = 100
|
vim.opt.updatetime = 100
|
||||||
vim.o.background = "dark" -- or "light" for light mode
|
vim.o.background = "dark" -- or "light" for light mode
|
||||||
vim.cmd("colorscheme gruvbox")
|
vim.cmd("colorscheme kanagawa")
|
||||||
-- Set completeopt to have a better completion experience
|
-- Set completeopt to have a better completion experience
|
||||||
-- :help completeopt
|
-- :help completeopt
|
||||||
-- menuone: popup even when there's only one match
|
-- menuone: popup even when there's only one match
|
||||||
|
|
@ -628,8 +629,8 @@ wk.register({
|
||||||
local current_buf_nr = vim.fn.bufnr()
|
local current_buf_nr = vim.fn.bufnr()
|
||||||
local all = vim.tbl_filter(function(bufnr)
|
local all = vim.tbl_filter(function(bufnr)
|
||||||
return current_buf_nr ~= bufnr
|
return current_buf_nr ~= bufnr
|
||||||
and vim.api.nvim_buf_get_option(bufnr, "buftype") ~= "terminal"
|
and vim.api.nvim_buf_get_option(bufnr, "buftype") ~= "terminal"
|
||||||
and vim.api.nvim_buf_get_option(bufnr, "buflisted")
|
and vim.api.nvim_buf_get_option(bufnr, "buflisted")
|
||||||
end, vim.api.nvim_list_bufs())
|
end, vim.api.nvim_list_bufs())
|
||||||
for _, bufnr in ipairs(all) do
|
for _, bufnr in ipairs(all) do
|
||||||
require("bufdelete").bufdelete(bufnr, false)
|
require("bufdelete").bufdelete(bufnr, false)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue