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