added discord + formatting + rest api + more
This commit is contained in:
parent
fd1eb6128a
commit
f82cc2bc93
15 changed files with 189 additions and 70 deletions
26
lua/core/plugins/formatter.lua
Normal file
26
lua/core/plugins/formatter.lua
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
-- Using formatter.nvim: https://github.com/mhartington/formatter.nvim
|
||||
return {
|
||||
"stevearc/conform.nvim",
|
||||
event = { "BufWritePre" },
|
||||
cmd = { "ConformInfo" },
|
||||
|
||||
-- This will provide type hinting with LuaLS
|
||||
---@module "conform"
|
||||
---@type conform.setupOpts
|
||||
opts = {
|
||||
formatters_by_ft = {
|
||||
lua = { "stylua" },
|
||||
python = { "black" },
|
||||
javascript = { "prettier" } -- add stop_after_first if you want more than 1
|
||||
},
|
||||
-- Set default options
|
||||
default_format_opts = {
|
||||
lsp_format = "fallback"
|
||||
},
|
||||
format_on_save = { timeout_ms = 500 },
|
||||
},
|
||||
init = function ()
|
||||
vim.o.formatexpr = "v:lua.require'conform'.formatexpr()"
|
||||
end
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue