Compare commits

..

3 Commits

Author SHA1 Message Date
7f60e7fcb0
feat(markdown): Auto set some options for md files
Basic options that I want set when I'm editing markdown files are now
configured as an ftplugin file.
2023-04-11 22:55:34 +01:00
40eeea3bd9
feat(LSP): Add support for autoformatting in C#
Make the omnisharp language server format C# files on write.
2023-04-11 22:53:55 +01:00
c898cad0df
fix(mail): Rename mail
Rename the mail ftplugin file to acutally match the type for mail files.
2023-04-11 22:52:41 +01:00
3 changed files with 21 additions and 0 deletions

View File

@ -22,6 +22,25 @@ modules["mason-lspconfig"].setup_handlers {
modules["lspconfig"][server_name].setup {
capabilities = capabilities
}
end,
["omnisharp"] = function ()
modules["lspconfig"]["omnisharp"].setup {
capabilities = capabilities,
on_attach = function (client,buffnr)
vim.notify("attaching to CS buffer {" .. buffnr .. "}")
local gr = vim.api.nvim_create_augroup("CS-OnAttach",{})
vim.api.nvim_create_autocmd({"BufWritePre"}, {
group = gr,
pattern = {"*.cs"},
desc = "(C#) Format before write",
callback = function ()
vim.lsp.buf.format()
end
}
)
vim.notify("Attached to CS buffer")
end
}
end
}

2
ftplugin/markdown.lua Normal file
View File

@ -0,0 +1,2 @@
vim.o.spell = true
vim.o.textwidth = 75