Fix git blame toggle mapping

This commit is contained in:
Pavle Portic 2023-12-14 14:59:15 +01:00
parent d7a046389a
commit 466f52599a
Signed by: TheEdgeOfRage
GPG Key ID: 66AD4BA646FBC0D2
4 changed files with 21 additions and 5 deletions

View File

@ -28,6 +28,7 @@ vim.cmd([[colorscheme gruvbox]])
require("sets")
require("mappings")
require("autocmd")
require("git")
require("lsp")
require("line")

View File

@ -1,4 +1,11 @@
vim.api.nvim_create_autocmd({ "FocusGained" }, {
pattern = { "*" },
command = "checktime",
})
-- vim.api.nvim_create_autocmd({ "BufNewFile", "BufRead" }, {
-- pattern = { "*.yaml", "*.yml" },
-- callback = function()
-- local fname = vim.fn.expand("%:p")
-- if require("lspconfig.util").root_pattern("Chart.yaml")(fname) then
-- vim.opt_local.filetype = "helm"
-- else
-- vim.opt_local.filetype = "yaml"
-- end
-- end,
-- })

View File

@ -127,6 +127,14 @@ lspconfig.terraformls.setup({})
-- json & yaml
lspconfig.jsonls.setup({})
lspconfig.yamlls.setup({})
-- helm
-- lspconfig.helm_ls.setup({
-- filetypes = { "helm" },
-- cmd = { "helm_ls", "serve" },
-- root_dir = function(fname)
-- return require("lspconfig.util").root_pattern("Chart.yaml")(fname)
-- end,
-- })
-- Install LSP servers automatically
require("mason-lspconfig").setup({ automatic_installation = true })

View File

@ -51,7 +51,7 @@ vim.keymap.set("", "\\", ':let @/ = ""<CR>', opts)
-- Git
vim.keymap.set("n", "<leader>gd", vim.cmd.Gvdiff, opts)
-- vim.keymap.set("n", "<leader>gb", vim.cmd('Gitsigns toggle_current_line_blame'))
vim.keymap.set("n", "<leader>gb", function() vim.cmd("Gitsigns toggle_current_line_blame") end, opts)
-- window movement
vim.keymap.set("n", "<leader>wn", "<C-W>j", opts)