Bring over commits accidentally only on local_machine branch to main
This commit is contained in:
parent
07471f5d48
commit
332c883a48
11 changed files with 59 additions and 11 deletions
|
|
@ -8,7 +8,7 @@ local handle_count = 1
|
|||
function M.setup()
|
||||
utils.set_keymap_list({
|
||||
{
|
||||
"q",
|
||||
"<Leader>q",
|
||||
function()
|
||||
for _, cb in ipairs(callbacks) do
|
||||
if cb ~= nil then
|
||||
|
|
|
|||
16
nvim/lua/colors.lua
Normal file
16
nvim/lua/colors.lua
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
local has_generated = false
|
||||
local colors = require("ayu.colors")
|
||||
colors.generate(true)
|
||||
|
||||
local M = {}
|
||||
|
||||
function M.get()
|
||||
if not has_generated then
|
||||
colors.generate(true)
|
||||
has_generated = true
|
||||
end
|
||||
|
||||
return colors
|
||||
end
|
||||
|
||||
return M
|
||||
|
|
@ -66,6 +66,16 @@ utils.foreach({
|
|||
vim.cmd.normal({ cmd })
|
||||
end
|
||||
end },
|
||||
{ "<C-t>", ":$tabnew %<CR>", { silent = true }, },
|
||||
{ "<Leader>1", ":1tabn<CR>", { silent = true }, },
|
||||
{ "<Leader>2", ":2tabn<CR>", { silent = true }, },
|
||||
{ "<Leader>3", ":3tabn<CR>", { silent = true }, },
|
||||
{ "<Leader>4", ":4tabn<CR>", { silent = true }, },
|
||||
{ "<Leader>5", ":5tabn<CR>", { silent = true }, },
|
||||
{ "<Leader>6", ":6tabn<CR>", { silent = true }, },
|
||||
{ "<Leader>7", ":7tabn<CR>", { silent = true }, },
|
||||
{ "<Leader>8", ":8tabn<CR>", { silent = true }, },
|
||||
{ "<Leader>9", ":9tabn<CR>", { silent = true }, },
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
local saved_hlsearch = false
|
||||
local saved_highlights = {}
|
||||
local colors = require("ayu.colors")
|
||||
colors.generate(true)
|
||||
|
||||
local function leap_across_windows()
|
||||
require("leap").leap({
|
||||
|
|
@ -25,7 +23,7 @@ end
|
|||
|
||||
local function save_and_set_invisible_inlay_hints_hl()
|
||||
saved_highlights = vim.api.nvim_get_hl(0, { name = "LspInlayHint" })
|
||||
vim.api.nvim_set_hl(0, "LspInlayHint", { fg = colors.bg, bg = "none" })
|
||||
vim.api.nvim_set_hl(0, "LspInlayHint", { fg = require("colors").get().bg, bg = "none" })
|
||||
end
|
||||
|
||||
local function restore_inlay_hints_hl()
|
||||
|
|
|
|||
|
|
@ -1,11 +1,24 @@
|
|||
local function resize_mode()
|
||||
if require("window_management").is_in_resizing_mode() then
|
||||
return "▲ Resizing ▼"
|
||||
return "▲ Resizing ▼ "
|
||||
else
|
||||
return ""
|
||||
return " "
|
||||
end
|
||||
end
|
||||
|
||||
local tabs = {
|
||||
"tabs",
|
||||
use_mode_colors = true,
|
||||
tabs_color = {
|
||||
active = "lualine_b_command",
|
||||
},
|
||||
show_modified_status = false,
|
||||
component_separators = {
|
||||
left = "",
|
||||
right = ""
|
||||
},
|
||||
}
|
||||
|
||||
return {
|
||||
"nvim-lualine/lualine.nvim",
|
||||
dependencies = {
|
||||
|
|
@ -38,7 +51,7 @@ return {
|
|||
},
|
||||
resize_mode,
|
||||
},
|
||||
lualine_c = { "buffers" },
|
||||
lualine_c = { tabs },
|
||||
lualine_x = { "encoding", "fileformat", "filetype" },
|
||||
lualine_y = { "progress" },
|
||||
lualine_z = { "location" }
|
||||
|
|
|
|||
|
|
@ -11,6 +11,15 @@ return {
|
|||
["vim.lsp.util.convert_input_to_markdown_lines"] = true,
|
||||
["vim.lsp.util.stylize_markdown"] = true,
|
||||
},
|
||||
signature = {
|
||||
auto_open = true,
|
||||
opts = {
|
||||
position = {
|
||||
row = 2,
|
||||
col = 0,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
presets = {
|
||||
bottom_search = true, -- use a classic bottom cmdline for search
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
local opt = vim.opt
|
||||
|
||||
-- Disable tabs, will use telescope and harpoon instead
|
||||
-- Disable tabs
|
||||
opt.showtabline = 0
|
||||
|
||||
-- Make Vim use the system clipboard
|
||||
|
|
@ -71,7 +71,7 @@ opt.scrolloff = 4
|
|||
opt.list = false
|
||||
|
||||
-- Sessions
|
||||
opt.sessionoptions = { "buffers", "curdir", "winsize", "winpos", "skiprtp" }
|
||||
opt.sessionoptions = { "buffers", "curdir", "winsize", "winpos", "tabpages", "skiprtp" }
|
||||
|
||||
-- Builtin LSP completion tweaks
|
||||
-- See comment in lspsetup autocmd for LspAttach
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue