Update autocommands to new nvim 0.7.0 syntax
parent
fb18155176
commit
421c02feec
|
@ -3,8 +3,8 @@
|
|||
fields=0 48 17 18 38 39 40 2 46 47 49 1
|
||||
sort_key=46
|
||||
sort_direction=1
|
||||
tree_sort_key=0
|
||||
tree_sort_direction=1
|
||||
tree_sort_key=46
|
||||
tree_sort_direction=-1
|
||||
hide_kernel_threads=1
|
||||
hide_userland_threads=0
|
||||
shadow_other_users=0
|
||||
|
|
|
@ -38,4 +38,11 @@ vim.keymap.set("n", "<Leader>c", ":ccl <bar> lcl<CR>")
|
|||
vim.cmd("set path+=**")
|
||||
|
||||
-- automatically rebalance windows on vim resize
|
||||
vim.cmd("autocmd VimResized * :wincmd =")
|
||||
local au_id = vim.api.nvim_create_augroup("esensar_init_lua", {})
|
||||
vim.api.nvim_create_autocmd("VimResized", {
|
||||
pattern = "*",
|
||||
group = au_id,
|
||||
callback = function()
|
||||
vim.cmd("wincmd =")
|
||||
end,
|
||||
})
|
||||
|
|
|
@ -19,12 +19,14 @@ local function on_attach(client, bufnr)
|
|||
vim.keymap.set("n", "<Leader>ac", vim.lsp.buf.code_action, opts)
|
||||
|
||||
if client.resolved_capabilities.document_formatting then
|
||||
vim.cmd([[
|
||||
augroup LspFormatting
|
||||
autocmd! * <buffer>
|
||||
autocmd BufWritePre <buffer> lua vim.lsp.buf.formatting_seq_sync()
|
||||
augroup END
|
||||
]])
|
||||
local au_id = vim.api.nvim_create_augroup("LspFormatting", {})
|
||||
vim.api.nvim_create_autocmd("BufWritePre", {
|
||||
group = au_id,
|
||||
callback = function()
|
||||
vim.lsp.buf.formatting_seq_sync()
|
||||
end,
|
||||
buffer = bufnr,
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ local configuration_overrides = {
|
|||
},
|
||||
omnisharp = {
|
||||
cmd = {
|
||||
vim.fn.glob("$HOME") .. "/lsp/dotnet/omnisharp/run",
|
||||
vim.fn.glob("$HOME") .. "/.local/share/lsp/dotnet/omnisharp/run",
|
||||
"--languageserver",
|
||||
"--hostPID",
|
||||
tostring(vim.fn.getpid()),
|
||||
|
|
Loading…
Reference in New Issue