fix: ensure single quotes are used consistently across configuration files

This commit is contained in:
2024-11-12 14:19:44 -05:00
parent 0d6750bbcd
commit 3f096313fc
51 changed files with 3097 additions and 3057 deletions
+24 -24
View File
@@ -7,47 +7,47 @@ local autogrp = vim.api.nvim_create_augroup
local autocmd = vim.api.nvim_create_autocmd
-- LazyGit root detection
if pcall(require, "lazygit.utils") then
autocmd("BufEnter", {
pattern = "*",
if pcall(require, 'lazygit.utils') then
autocmd('BufEnter', {
pattern = '*',
callback = function()
require("lazygit.utils").project_root_dir()
require('lazygit.utils').project_root_dir()
end,
})
end
-- ━━━━━━━━━━━━━━━━━━━━━━━ Set up Qalc keymappings ━━━━━━━━━━━━━━━━━━━━━━━
if pcall(require, "qalc") then
if pcall(require, 'qalc') then
-- Create a group for filetype-specific mappings
autogrp("QalcFileTypeMappings", { clear = true })
autogrp('QalcFileTypeMappings', { clear = true })
-- Create an autocommand for the qalc filetype
autocmd("FileType", {
pattern = "qalc",
group = "QalcFileTypeMappings",
autocmd('FileType', {
pattern = 'qalc',
group = 'QalcFileTypeMappings',
callback = function()
-- Set the key mapping: 'y' to run the :QalcYank command in normal mode
vim.keymap.set( -- Yank Result
"n",
"y",
":QalcYank +<CR>",
'n',
'y',
':QalcYank +<CR>',
{ noremap = true, silent = true }
)
-- Set the key mapping: 'q' to run the :QalcClose command in normal mode
vim.keymap.set( -- Close Qalc
"n",
"q",
":QalcClose<CR>",
'n',
'q',
':QalcClose<CR>',
{ noremap = true, silent = true }
)
end,
})
-- Define a custom command to close the Qalc buffer
vim.api.nvim_create_user_command("QalcClose", function()
vim.api.nvim_create_user_command('QalcClose', function()
local buf_name = vim.api.nvim_buf_get_name(0)
if buf_name ~= "" then
vim.cmd("bd!")
if buf_name ~= '' then
vim.cmd('bd!')
else
-- If the buffer has no name, just remove it without invoking :bd!
vim.api.nvim_buf_delete(0, { force = true })
@@ -56,19 +56,19 @@ if pcall(require, "qalc") then
end
-- ━━━━━━━━━━━━━━━━━━━━━━━━━━ Set up highlights ━━━━━━━━━━━━━━━━━━━━━━━━━━
local load_highlight = require("utils.highlight")
local load_highlight = require('utils.highlight')
load_highlight.setup_autocommands()
load_highlight.setup_dashboard_highlight()
-- ━━━━━━━━━━━━━━━━━━━━━━━━━━ Set up cpp picker ━━━━━━━━━━━━━━━━━━━━━━━━━━
-- Adds a keymap for quicker picking when in cpp files
require("data.autocmd").cpp_picker()
require('data.autocmd').cpp_picker()
-- ━━━━━━━━━━━━━━━━━━━━━━━━━━ Set up nvim_exec ━━━━━━━━━━━━━━━━━━━━━━━
-- Function to check and execute the NVIM_EXEC environment variable
local function execute_nvim_exec()
local exec_command = os.getenv("NVIM_EXEC")
local exec_command = os.getenv('NVIM_EXEC')
-- If NVIM_EXEC is set, execute the command
if exec_command then
@@ -77,9 +77,9 @@ local function execute_nvim_exec()
end
-- Define an autogroup for the autocmd
autogrp("NvimExec", { clear = true })
autogrp('NvimExec', { clear = true })
-- Define an autocmd to run the function at startup
autocmd("VimEnter", {
group = "NvimExec",
autocmd('VimEnter', {
group = 'NvimExec',
callback = execute_nvim_exec,
})