boop cache

This commit is contained in:
Christian Nieves
2024-05-02 16:18:14 +00:00
parent 5840cc2b2d
commit 0aef98bb0a
3 changed files with 58 additions and 51 deletions

View File

@ -107,11 +107,13 @@ return {
vim.cmd([[autocmd FileType gdscript setlocal autoindent noexpandtab tabstop=4 shiftwidth=4]])
-- Golang
require("go").setup({
lsp_cfg = {
capabilities = capabilities,
},
})
if not use_google then
require("go").setup({
lsp_cfg = {
capabilities = capabilities,
},
})
end
local format_sync_grp = vim.api.nvim_create_augroup("GoFormat", {})
vim.api.nvim_create_autocmd("BufWritePre", {
pattern = "*.go",

View File

@ -1,4 +1,6 @@
local M = {}
local M = {
use_google_cache = nil,
}
function M.map(mode, lhs, rhs, opts)
local options = { noremap = true }
@ -10,7 +12,10 @@ function M.map(mode, lhs, rhs, opts)
end
function M.use_google()
return M.file_exists(os.getenv("HOME") .. "/use_google")
if M.use_google_cache == nil then
M.use_google_cache = M.file_exists(os.getenv("HOME") .. "/use_google")
end
return M.use_google_cache
end
function M.file_exists(name)