From 479b6006264640a4376234a79c8ae726863fdb91 Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Sun, 1 Oct 2023 19:23:30 +0200 Subject: [PATCH] djlint --- .../plugins/extras/formatting/prettier.lua | 28 ++++++++++++++++-- spell/en.utf-8.add | 3 ++ spell/en.utf-8.add.spl | Bin 2852 -> 2881 bytes 3 files changed, 28 insertions(+), 3 deletions(-) diff --git a/lua/plex/plugins/extras/formatting/prettier.lua b/lua/plex/plugins/extras/formatting/prettier.lua index c4459d6..e5b22d9 100644 --- a/lua/plex/plugins/extras/formatting/prettier.lua +++ b/lua/plex/plugins/extras/formatting/prettier.lua @@ -33,9 +33,23 @@ return { } end, }, + -- NOTE: If using this config, you need to install prettierd. + -- At the time of writing that is done with: + -- `sudo npm install -g @fsouza/prettierd` cpp = { require("formatter.filetypes.cpp").clangformat }, css = { require("formatter.filetypes.css").prettierd }, - html = { require("formatter.filetypes.html").prettierd }, + -- NOTE: If you don't care about django templates, + -- you can use one of the formatters provided by default. + -- html = { require("formatter.filetypes.html").prettierd }, + html = { + function() + return { + exe = "djlint", + args = { "-" }, + stdin = 1, + } + end, + }, java = { require("formatter.filetypes.java").clangformat() }, javascript = { require("formatter.filetypes.javascript").prettierd }, json = { require("formatter.filetypes.json").prettierd }, @@ -43,7 +57,15 @@ return { latex = { require("formatter.filetypes.latex").latexindent }, markdown = { require("formatter.filetypes.markdown").prettierd }, php = { require("formatter.filetypes.php").phpcbf }, - python = { require("formatter.filetypes.python").autopep8() }, + python = { + function() + return { + exe = "autopep8", + args = { "--aggressive -" }, + stdin = 1, + } + end, + }, sh = { require("formatter.filetypes.sh").shfmt() }, sql = { require("formatter.filetypes.sql").pgformat() }, toml = { require("formatter.filetypes.toml").taplo() }, @@ -54,7 +76,7 @@ return { -- "formatter.filetypes.any" defines default configurations for any -- filetype require("formatter.filetypes.any").remove_trailing_whitespace, - require("formatter.defaults.prettierd") + require("formatter.defaults.prettierd"), }, } opts.filetype = vim.tbl_extend("keep", opts.filetype or {}, filetypes) diff --git a/spell/en.utf-8.add b/spell/en.utf-8.add index 7e109f2..cd5caa2 100644 --- a/spell/en.utf-8.add +++ b/spell/en.utf-8.add @@ -200,3 +200,6 @@ pyi bietete desc Scherr +mariadb +Gawa +Django diff --git a/spell/en.utf-8.add.spl b/spell/en.utf-8.add.spl index 39cd78b39b70ca4644ede7c40b7863a7e8e1e614..311dde0dc908f2833d097b77b6195169ac534812 100644 GIT binary patch delta 603 zcmXX@J!lkR5ZyPsm%ZdnP>>TMoEp!dA~|zOp%OR_w6L(%LK1Fo_seB<&E9>t=YgOG z#KL;C6(Yt)3xBZorx06v!Ah*;5NvD`XEy0(zWLsp_uf1&e=1L1y?mwLHAzz6aUB1| zo2dp$#d$bRW6`X|H~1R5sPb3LmIAD!1DPC4`8O=?a*O6Cy}-l?hWUHIPv|7k7=NG@ zY;wh2n6Ad8T#>>oBE-m$%4fXfo9H~ksHh>hPo ze((Xt()?e`wm9=*YQlD}iKTB~?vD zHht#(#T47TQLG(!8%d@jTWscPAMwZH>ftX#YRA;pYwe!g8|_^!!ah5vJ&h&})S delta 554 zcmXX@y=xRf6yM*Q&Fw`@KoX)x2zNOYwaAg=1V!NxY(zpj5mCv0OfCbP+so`;0wR8Z zo#jgrK@bitL{LLIJ0U6j1MCD#+p~%ysBadV;qjY!zpwc;^=fMT=Jln#r_*%dujd7m zyW?#f3FhH>?Ur6Md<#7^_%qJ%Z)~98b(;5;HYvZQvxJ}gh3;X8TWWE-VaRPIa?~vn z7!=3=4+DOp=EimkGC8aOUOnWG>fG3YL5K)lfynSs&Ehgo_zTUrfJTmfd4t;>KTLF? zI^CiKlo!fnPv{fJ)ztjRzlIyU?_a4kG-X>(^0XCkjhH-ojCFY%JM<3MM&=Ol^2mqD z?Tl<+{KdGBwbB;FJW;tTVK*u#PdrOSr0^q`C{8kY=%T0r4=TNeIxL*@b}XA(CeoH- zE1ni{5iJ4y=X@bJj|aRG%o4rhr@_@rM^iDZVQDo}I+OM9eMi!Ee#xY6{?VtzDj9xh z=hl?%4f#)Sd|DlL(7~o7kkYKwrX`gqz2{~%!;oKAo5$WHQkvM7NTu6N{#IQ*wYNo) rp~!tmS2$$n>;I35cx7~^wv?AOl#%KgX_q{Ab{>Xu(#+nA(bxC~!$W|!