Open17
nvimの設定の記録
macはちゃんと表示されるけど、windowsのpowershellで表示が崩れる
めんどいので英語にした。(直った)
AppData/Roaming/lazygit/config.yml
gui:
language: "en"
theme:
selectedLineBgColor:
- "#192f60"
行表示を普通の行表示に変えた。
あと、saveがファイルごとだったのでctl-sで全部保存にした。
vs codeの自動保存に慣れすぎていて、保存を忘れてしまう。
init.lua
vim.wo.relativenumber = false
mappings.lua
maps.n["<C-s>"] = { "<cmd>wa!<cr>", desc = "Force write" }
autosaveのプラグインを入れてみた。
plugin/auto-save.lua
return {
"pocco81/auto-save.nvim",
event = {"InsertLeave", "BufLeave", "FocusLost", "TextChanged"}
}
saveされまくってウザいからevent変えてみたけどなんか反映されてなさそう
todoコメントとかのハイライト機能を入れてみた
return {
"folke/todo-comments.nvim",
dependencies = {
"nvim-lua/plenary.nvim",
},
event = "User Astrofile",
config = function()
require("todo-comments").setup()
end,
}
lazygitでconflict
設定をすべて移動した。
user/init.lua
return {
colorscheme = "catppuccin",
options = {
opt = {
relativenumber = false,
number = true,
}
},
plugins = {
{
"lewis6991/gitsigns.nvim",
opts = {
current_line_blame = true,
current_line_blame_opts = {
delay = 200,
virt_text_pos = "eol"
}
},
},
{
"folke/todo-comments.nvim",
dependencies = {
"nvim-lua/plenary.nvim",
},
event = "User Astrofile",
config = function()
require("todo-comments").setup()
end,
},
{
"tpope/vim-fugitive",
cmd="Git"
},
{
"catppuccin/nvim",
name = "catppuccin",
opts = {
-- configuration options...
flavour = "Macchiato",
transparent_background = true
},
}
},
mappings = {
n = {
["<C-s>"] = { "<cmd>wa!<cr>", desc = "Force write" }
}
}
}
lazygitのthemeを変更
config.yml
gui:
language: "en"
theme:
activeBorderColor:
- "#8aadf4"
- bold
inactiveBorderColor:
- "#a5adcb"
optionsTextColor:
- "#8aadf4"
selectedLineBgColor:
- "#363a4f"
cherryPickedCommitBgColor:
- "#494d64"
cherryPickedCommitFgColor:
- "#8aadf4"
unstagedChangesColor:
- "#ed8796"
defaultFgColor:
- "#cad3f5"
searchingActiveBorderColor:
- "#eed49f"
nerdFontsVersion: "3"
git:
branchLogCmd: "git log --graph --color=always --abbrev-commit --date=format:'%Y/%m/%d %H:%M' --pretty=format:'%C(#ed8796)%d%Creset%C(#cad3f5)%h%Creset %C(#a6da95) %an %Creset %C(#8aadf4)%ad%Creset %C(#cad3f5 bold)%w(80)%s%Creset%w(80,2,2)%b' {{branchName}} --"
mappingを結構変えた
user/init.lua
mappings = {
n = {
["<C-s>"] = { "<cmd>wa!<cr>", desc = "Force write" },
["<C-p>"] = { '<Cmd>execute v:count . "ToggleTerm"<CR>', desc = "Toggle terminal" },
["<C-o>"] = {
function()
require("astronvim.utils.buffer").nav(vim.v.count > 0 and vim.v.count or 1)
end,
desc = "Next buffer"
},
["<C-i>"] = {
function()
require("astronvim.utils.buffer").nav(-(vim.v.count > 0 and vim.v.count or 1))
end,
desc = "Previous buffer",
},
["<C-g>"] = {
function()
local utils = require "astronvim.utils"
local worktree = require("astronvim.utils.git").file_worktree()
local flags = worktree and (" --work-tree=%s --git-dir=%s"):format(worktree.toplevel, worktree.gitdir) or ""
utils.toggle_term_cmd("lazygit " .. flags)
end,
desc = "ToggleTerm lazygit",
}
},
t = {
["<C-p>"] = { '<Cmd>execute v:count . "ToggleTerm"<CR>', desc = "Toggle terminal" }
}
}
やっとvisual-multiが動いた。
init.lua
{
"mg979/vim-visual-multi",
event = "BufRead"
}
hlchunkを入れた
init.lua
{
"shellRaining/hlchunk.nvim",
event = { "UIEnter" },
config = function()
require("hlchunk").setup({})
end
}