update format

This commit is contained in:
long-crypto 2024-07-21 06:20:35 +00:00 committed by GitHub
parent 921753798e
commit d245916744
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 60 additions and 60 deletions

View File

@ -413,11 +413,11 @@ require('lazy').setup({
dependencies = { dependencies = {
-- Automatically install LSPs and related tools to stdpath for Neovim -- Automatically install LSPs and related tools to stdpath for Neovim
{ {
"williamboman/mason.nvim", 'williamboman/mason.nvim',
opts = { opts = {
log_level = vim.log.levels.OFF, log_level = vim.log.levels.OFF,
pip = { pip = {
install_args = { "--no-cache-dir" }, install_args = { '--no-cache-dir' },
}, },
}, },
}, -- NOTE: Must be loaded before dependants }, -- NOTE: Must be loaded before dependants
@ -428,11 +428,11 @@ require('lazy').setup({
-- Useful status updates for LSP. -- Useful status updates for LSP.
-- NOTE: `opts = {}` is the same as calling `require('fidget').setup({})` -- NOTE: `opts = {}` is the same as calling `require('fidget').setup({})`
{ {
"j-hui/fidget.nvim", 'j-hui/fidget.nvim',
opts = { opts = {
logger = { logger = {
level = vim.log.levels.OFF, level = vim.log.levels.OFF,
path = "/dev/null", path = '/dev/null',
}, },
}, },
}, },
@ -471,7 +471,7 @@ require('lazy').setup({
-- That is to say, every time a new file is opened that is associated with -- That is to say, every time a new file is opened that is associated with
-- an lsp (for example, opening `main.rs` is associated with `rust_analyzer`) this -- an lsp (for example, opening `main.rs` is associated with `rust_analyzer`) this
-- function will be executed to configure the current buffer -- function will be executed to configure the current buffer
vim.lsp.set_log_level("off") vim.lsp.set_log_level 'off'
vim.api.nvim_create_autocmd('LspAttach', { vim.api.nvim_create_autocmd('LspAttach', {
group = vim.api.nvim_create_augroup('kickstart-lsp-attach', { clear = true }), group = vim.api.nvim_create_augroup('kickstart-lsp-attach', { clear = true }),
callback = function(event) callback = function(event)
@ -883,27 +883,27 @@ require('lazy').setup({
}, },
{ {
"akinsho/toggleterm.nvim", 'akinsho/toggleterm.nvim',
config = function() config = function()
require("toggleterm").setup({ require('toggleterm').setup {
size = 20, size = 20,
open_mapping = [[<c-\>]], open_mapping = [[<c-\>]],
direction = "float", direction = 'float',
float_opts = { float_opts = {
border = "curved", border = 'curved',
}, },
}) }
function _G.set_terminal_keymaps() function _G.set_terminal_keymaps()
local opts = { buffer = 0 } local opts = { buffer = 0 }
vim.keymap.set("t", "jk", [[<C-\><C-n>]], opts) vim.keymap.set('t', 'jk', [[<C-\><C-n>]], opts)
end end
-- if you only want these mappings for toggle term use term://*toggleterm#* instead -- if you only want these mappings for toggle term use term://*toggleterm#* instead
vim.cmd("autocmd! TermOpen term://* lua set_terminal_keymaps()") vim.cmd 'autocmd! TermOpen term://* lua set_terminal_keymaps()'
end, end,
keys = [[<c-\>]], keys = [[<c-\>]],
cmd = "ToggleTerm", cmd = 'ToggleTerm',
}, },
-- The following two comments only work if you have downloaded the kickstart repo, not just copy pasted the -- The following two comments only work if you have downloaded the kickstart repo, not just copy pasted the