nix-format and remove obsolete obsidian derivation
This commit is contained in:
parent
570c2753a7
commit
64f5af878d
9 changed files with 37 additions and 83 deletions
|
|
@ -1,17 +1,17 @@
|
|||
local nvim_lsp = require("lspconfig")
|
||||
|
||||
local format_async = function(err, _, result, _, bufnr)
|
||||
if err ~= nil or result == nil then return end
|
||||
if not vim.api.nvim_buf_get_option(bufnr, "modified") then
|
||||
local view = vim.fn.winsaveview()
|
||||
vim.lsp.util.apply_text_edits(result, bufnr)
|
||||
vim.fn.winrestview(view)
|
||||
if bufnr == vim.api.nvim_get_current_buf() then
|
||||
vim.api.nvim_command("noautocmd :update")
|
||||
end
|
||||
end
|
||||
end
|
||||
vim.lsp.handlers["textDocument/formatting"] = format_async
|
||||
-- local format_async = function(err, _, result, _, bufnr)
|
||||
-- if err ~= nil or result == nil then return end
|
||||
-- if not vim.api.nvim_buf_get_option(bufnr, "modified") then
|
||||
-- local view = vim.fn.winsaveview()
|
||||
-- vim.lsp.util.apply_text_edits(result, bufnr)
|
||||
-- vim.fn.winrestview(view)
|
||||
-- if bufnr == vim.api.nvim_get_current_buf() then
|
||||
-- vim.api.nvim_command("noautocmd :update")
|
||||
-- end
|
||||
-- end
|
||||
-- end
|
||||
-- vim.lsp.handlers["textDocument/formatting"] = format_async
|
||||
|
||||
local on_attach = function(client, bufnr)
|
||||
local buf_map = vim.api.nvim_buf_set_keymap
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue