fix: update autocommands
This commit is contained in:
@@ -1 +1 @@
|
|||||||
{"nvim-dap": {"commit": "0e6b7c4"}, "FixCursorHold.nvim": {"commit": "1900f89"}, "nvcode-color-schemes.vim": {"commit": "3a0e624"}, "telescope-fzf-native.nvim": {"commit": "6c921ca"}, "glow.nvim": {"commit": "5b38fb7"}, "packer.nvim": {"commit": "ea0cc3c"}, "nvim-lspconfig": {"commit": "360a895"}, "playground": {"commit": "429f3e7"}, "numb.nvim": {"commit": "3f7d4a7"}, "nvim-dap-virtual-text": {"commit": "57f1dbd"}, "which-key.nvim": {"commit": "7ccf476"}, "telescope-file-browser.nvim": {"commit": "ad7b637"}, "aerial.nvim": {"commit": "f34defe"}, "nvim-autopairs": {"commit": "defad64"}, "neotest-go": {"commit": "1a15e11"}, "nvim-colorizer.lua": {"commit": "36c610a"}, "toggleterm.nvim": {"commit": "b90a138"}, "tabular": {"commit": "339091a"}, "vim-fugitive": {"commit": "6fcb0ad"}, "rnvimr": {"commit": "5f0483d"}, "gitsigns.nvim": {"commit": "907ae86"}, "codi.vim": {"commit": "83b9859"}, "lspkind-nvim": {"commit": "57610d5"}, "cmp-cmdline": {"commit": "8ee981b"}, "telescope.nvim": {"commit": "a197706"}, "telescope-project.nvim": {"commit": "7c64b18"}, "trouble.nvim": {"commit": "3f85d8e"}, "nvim-ts-context-commentstring": {"commit": "9bff161"}, "lsp_signature.nvim": {"commit": "51784ba"}, "nvim-lint": {"commit": "73682da"}, "one-monokai-vim": {"commit": "4fdfd93"}, "gruvbox.nvim": {"commit": "7fb36e0"}, "mason.nvim": {"commit": "d66c60e"}, "cmp-nvim-lsp": {"commit": "44b16d1"}, "dashboard-nvim": {"commit": "d82ddae"}, "LuaSnip": {"commit": "e687d78"}, "vim-go-coverage": {"commit": "d9b0c9f"}, "vim-matchup": {"commit": "6dbe108"}, "popup.nvim": {"commit": "b7404d3"}, "cmp-vsnip": {"commit": "989a8a7"}, "nvim-bqf": {"commit": "a906a9d"}, "FTerm.nvim": {"commit": "d132089"}, "nvim-treesitter": {"commit": "2461e5ac"}, "vim-vsnip": {"commit": "7753ba9"}, "nvim-ts-autotag": {"commit": "6be1192"}, "neotest": {"commit": "1e67a50"}, "nvim-dap-ui": {"commit": "34160a7"}, "nvim-luapad": {"commit": "a5b3d6a"}, "monokai.nvim": {"commit": "b8bd44d"}, "lspsaga.nvim": {"commit": "5faeec9"}, "vim-markdown": {"commit": "cc82d88"}, "hop.nvim": {"commit": "75f73d3"}, "barbar.nvim": {"commit": "f8d1b44"}, "nvim-tree.lua": {"commit": "94c7c81"}, "bracey.vim": {"commit": "4e1a22a"}, "fzf-lua": {"commit": "2a00373"}, "lsp-rooter.nvim": {"commit": "7c83364"}, "nvim-comment": {"commit": "e9ac16a"}, "plenary.nvim": {"commit": "9ce85b0"}, "nvim-cmp": {"commit": "5dce1b7"}, "telescope-dap.nvim": {"commit": "4e2d5ef"}, "galaxyline.nvim": {"commit": "20f5f75"}, "markdown-preview.nvim": {"commit": "02cc387"}, "nvim-web-devicons": {"commit": "925e2aa"}, "neodev.nvim": {"commit": "1c796d3"}, "cmp-path": {"commit": "91ff86c"}, "cmp-buffer": {"commit": "3022dbc"}}
|
{"nvim-dap": {"commit": "b3d4408"}, "FixCursorHold.nvim": {"commit": "1900f89"}, "nvcode-color-schemes.vim": {"commit": "3a0e624"}, "telescope-fzf-native.nvim": {"commit": "6c921ca"}, "glow.nvim": {"commit": "5b38fb7"}, "packer.nvim": {"commit": "ea0cc3c"}, "nvim-lspconfig": {"commit": "57139c6"}, "playground": {"commit": "429f3e7"}, "numb.nvim": {"commit": "3f7d4a7"}, "nvim-treesitter": {"commit": "5ec42175"}, "cmp-cmdline": {"commit": "8ee981b"}, "telescope-file-browser.nvim": {"commit": "ad7b637"}, "aerial.nvim": {"commit": "f34defe"}, "nvim-autopairs": {"commit": "defad64"}, "lspkind-nvim": {"commit": "57610d5"}, "neotest-go": {"commit": "1a15e11"}, "nvim-colorizer.lua": {"commit": "36c610a"}, "toggleterm.nvim": {"commit": "b90a138"}, "tabular": {"commit": "339091a"}, "cmp-nvim-lsp": {"commit": "44b16d1"}, "vim-fugitive": {"commit": "6fcb0ad"}, "rnvimr": {"commit": "5f0483d"}, "gitsigns.nvim": {"commit": "907ae86"}, "codi.vim": {"commit": "83b9859"}, "nvim-ts-autotag": {"commit": "6be1192"}, "which-key.nvim": {"commit": "7ccf476"}, "telescope.nvim": {"commit": "59812c2"}, "telescope-project.nvim": {"commit": "7c64b18"}, "trouble.nvim": {"commit": "3f85d8e"}, "nvim-ts-context-commentstring": {"commit": "95e9ba9"}, "lsp_signature.nvim": {"commit": "51784ba"}, "nvim-lint": {"commit": "12517fb"}, "one-monokai-vim": {"commit": "4fdfd93"}, "gruvbox.nvim": {"commit": "7fb36e0"}, "mason.nvim": {"commit": "d66c60e"}, "hop.nvim": {"commit": "75f73d3"}, "LuaSnip": {"commit": "e687d78"}, "nvim-bqf": {"commit": "a906a9d"}, "vim-matchup": {"commit": "6dbe108"}, "popup.nvim": {"commit": "b7404d3"}, "cmp-vsnip": {"commit": "989a8a7"}, "vim-go-coverage": {"commit": "d9b0c9f"}, "FTerm.nvim": {"commit": "d132089"}, "nvim-dap-virtual-text": {"commit": "57f1dbd"}, "vim-vsnip": {"commit": "be27746"}, "neotest": {"commit": "1e67a50"}, "nvim-dap-ui": {"commit": "34160a7"}, "barbar.nvim": {"commit": "283bcea"}, "monokai.nvim": {"commit": "b8bd44d"}, "lspsaga.nvim": {"commit": "5faeec9"}, "vim-markdown": {"commit": "cc82d88"}, "dashboard-nvim": {"commit": "d82ddae"}, "nvim-luapad": {"commit": "a5b3d6a"}, "nvim-tree.lua": {"commit": "94c7c81"}, "bracey.vim": {"commit": "4e1a22a"}, "fzf-lua": {"commit": "1e5347e"}, "lsp-rooter.nvim": {"commit": "7c83364"}, "nvim-comment": {"commit": "e9ac16a"}, "plenary.nvim": {"commit": "9ce85b0"}, "nvim-cmp": {"commit": "5dce1b7"}, "telescope-dap.nvim": {"commit": "4e2d5ef"}, "galaxyline.nvim": {"commit": "20f5f75"}, "markdown-preview.nvim": {"commit": "02cc387"}, "nvim-web-devicons": {"commit": "925e2aa"}, "neodev.nvim": {"commit": "471324e"}, "cmp-path": {"commit": "91ff86c"}, "cmp-buffer": {"commit": "3022dbc"}}
|
||||||
|
|||||||
@@ -2,13 +2,13 @@ local utils = require('utils')
|
|||||||
|
|
||||||
local auto_formatters = { }
|
local auto_formatters = { }
|
||||||
|
|
||||||
local python_autoformat = {'BufWritePre', '*.py', 'lua vim.lsp.buf.formatting_sync(nil, 1000)'}
|
local python_autoformat = {'BufWritePre', '*.py', 'lua vim.lsp.buf.format({async=false})'}
|
||||||
if O.python.autoformat then table.insert(auto_formatters, python_autoformat) end
|
if O.python.autoformat then table.insert(auto_formatters, python_autoformat) end
|
||||||
|
|
||||||
local javascript_autoformat = {'BufWritePre', '*.js', 'lua vim.lsp.buf.formatting_sync(nil, 1000)'}
|
local javascript_autoformat = {'BufWritePre', '*.js', 'lua vim.lsp.buf.format({async=false})'}
|
||||||
local javascriptreact_autoformat = {'BufWritePre', '*.jsx', 'lua vim.lsp.buf.formatting_sync(nil, 1000)'}
|
local javascriptreact_autoformat = {'BufWritePre', '*.jsx', 'lua vim.lsp.buf.format({async=false})'}
|
||||||
local typescript_autoformat = {'BufWritePre', '*.ts', 'lua vim.lsp.buf.formatting_sync(nil, 1000)'}
|
local typescript_autoformat = {'BufWritePre', '*.ts', 'lua vim.lsp.buf.format({async=false})'}
|
||||||
local typescriptreact_autoformat = {'BufWritePre', '*.tsx', 'lua vim.lsp.buf.formatting_sync(nil, 1000)'}
|
local typescriptreact_autoformat = {'BufWritePre', '*.tsx', 'lua vim.lsp.buf.format({async=false})'}
|
||||||
if O.tsserver.autoformat then
|
if O.tsserver.autoformat then
|
||||||
table.insert(auto_formatters, javascript_autoformat)
|
table.insert(auto_formatters, javascript_autoformat)
|
||||||
table.insert(auto_formatters, javascriptreact_autoformat)
|
table.insert(auto_formatters, javascriptreact_autoformat)
|
||||||
@@ -16,16 +16,16 @@ if O.tsserver.autoformat then
|
|||||||
table.insert(auto_formatters, typescriptreact_autoformat)
|
table.insert(auto_formatters, typescriptreact_autoformat)
|
||||||
end
|
end
|
||||||
|
|
||||||
local lua_format = {'BufWritePre', '*.lua', 'lua vim.lsp.buf.formatting_sync(nil, 1000)'}
|
local lua_format = {'BufWritePre', '*.lua', 'lua vim.lsp.buf.format({async=false})'}
|
||||||
if O.lua.autoformat then table.insert(auto_formatters, lua_format) end
|
if O.lua.autoformat then table.insert(auto_formatters, lua_format) end
|
||||||
|
|
||||||
local json_format = {'BufWritePre', '*.json', 'lua vim.lsp.buf.formatting_sync(nil, 1000)'}
|
local json_format = {'BufWritePre', '*.json', 'lua vim.lsp.buf.format({async=false})'}
|
||||||
if O.json.autoformat then table.insert(auto_formatters, json_format) end
|
if O.json.autoformat then table.insert(auto_formatters, json_format) end
|
||||||
|
|
||||||
local ruby_format = {'BufWritePre', '*.rb', 'lua vim.lsp.buf.formatting_sync(nil,1000)'}
|
local ruby_format = {'BufWritePre', '*.rb', 'lua vim.lsp.buf.format({async=false})'}
|
||||||
if O.ruby.autoformat then table.insert(auto_formatters, ruby_format) end
|
if O.ruby.autoformat then table.insert(auto_formatters, ruby_format) end
|
||||||
|
|
||||||
local go_format = {'BufWritePre', '*.go', 'lua vim.lsp.buf.formatting_sync(nil,1000)'}
|
local go_format = {'BufWritePre', '*.go', 'lua vim.lsp.buf.format({async=false})'}
|
||||||
if O.go.autoformat then table.insert(auto_formatters, go_format) end
|
if O.go.autoformat then table.insert(auto_formatters, go_format) end
|
||||||
|
|
||||||
utils.define_augroups({
|
utils.define_augroups({
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ end
|
|||||||
|
|
||||||
function lv_utils.open_md()
|
function lv_utils.open_md()
|
||||||
local p = vim.fn.expand('%:p')
|
local p = vim.fn.expand('%:p')
|
||||||
vim.fn.system("open -a typora "..p)
|
vim.fn.system("open -a marktext "..p)
|
||||||
end
|
end
|
||||||
|
|
||||||
function lv_utils.define_augroups(definitions) -- {{{1
|
function lv_utils.define_augroups(definitions) -- {{{1
|
||||||
|
|||||||
Reference in New Issue
Block a user