improve nvim formatting

This commit is contained in:
elkowar 2021-06-14 10:44:59 +02:00
parent a54384fa2b
commit 74e8063bfc
No known key found for this signature in database
GPG key ID: E321AD71B1D1F27F
7 changed files with 33 additions and 7 deletions

View file

@ -12,9 +12,11 @@
<def name="test">
<box class="{{some_var}}" space-evenly="false" spacing="10">
<scale value="{{scaleval}}" orientation="v" min="0" max="100" flipped="true" />
<box space-evenly="false" orientation="v">
asdasdfflmao
<box> |  {{ round((EWW_NET["enp34s0"].NET_UP) * 8 / (1024 * 1024), 2)}}
 {{ round((EWW_NET["enp34s0"].NET_DOWN) * 8 / (1024 * 1024), 2)}}
|  {{EWW_RAM}}
@ -27,7 +29,6 @@
asdf {{ round(0.1234, 2) }}
</box>
<scale value="50" orientation="v" min="0" max="100" flipped="true" />
<button onclick="pgrep 'eww' &amp;&amp; echo '' || echo ''" cursor="wait">Test bug</button>
<button
@ -111,6 +112,10 @@
<var name="some_var"></var>
<var name="code"></var>
<script-var name="scaleval" interval="50ms">
echo 25
</script-var>
<var name="song-image"></var>
<var name="song-image-visible">true</var>

View file

@ -37,11 +37,13 @@ in
ra = "ranger";
gaa = "git add --all";
lg = "lazygit";
gc = "git commit -m ";
gp = "git push";
gst = "git status";
g = "git fuzzy";
cr = "cargo run --";
y = "z";
};
home.packages = with pkgs; lib.mkMerge [
@ -77,7 +79,6 @@ in
gtop
nix-prefetch
cargo-bloat
sccache
bpytop
cargo-watch
cargo-expand

View file

@ -154,6 +154,7 @@ in
initExtra = ''
eval $(opam env)
eval $(luarocks path --lua-version=5.4)
eval "$(zoxide init zsh)"
export MANPAGER='nvim +Man! +"set nocul" +"set noshowcmd" +"set noruler" +"set noshowmode" +"set laststatus=2" +"set statusline=\ %t"'
export MANPAGER='nvim +Man! +"set nocul" +"set noshowcmd" +"set noruler" +"set noshowmode" +"set laststatus=0"'

View file

@ -13,6 +13,9 @@
(utils.keymap :n :K "<Nop>")
(utils.keymap :v :K "<Nop>")
(utils.keymap :i "" "<C-w>")
(utils.keymap :i :<C-h> "<C-w>")
(utils.keymap :i :<C-BS> "<C-w>")
(utils.keymap :n :MM "<cmd>lua require('nvim-gehzu').go_to_definition()<CR>" {})
(utils.keymap :n :MN "<cmd>lua require('nvim-gehzu').show_definition()<CR>" {})
@ -21,6 +24,12 @@
(fn cmd [s desc] [(.. "<cmd>" s "<cr>") desc])
(fn rebind [s desc] [s desc])
(defn format []
(if (a.some #$1.resolved_capabilities.document_formatting (vim.lsp.get_active_clients))
(vim.lsp.buf.formatting)
(vim.cmd "Neoformat")))
(wk.setup {})
(wk.register
{"c" {:name "+comment out"}
@ -51,7 +60,8 @@
"e" (cmd "Trouble lsp_workspace_diagnostics" "Show diagnostics")
"g" [vim.lsp.buf.definition "Go to definition"]
"i" [vim.lsp.buf.implementation "Show implementation"]
"f" [vim.lsp.buf.formatting "format file"]}
"f" [format "format file"]
"," (cmd "RustRunnables" "Run rust stuff")}
"f" {:name "+folds"
"o" (cmd "foldopen" "open fold")

View file

@ -104,6 +104,8 @@
:glepnir/lspsaga.nvim {:after "vim-gruvbox8"
:mod "dots.plugins.lspsaga"}
:sbdchd/neoformat {}
;; --------------------
:Olical/conjure {}
@ -152,6 +154,7 @@
:edwinb/idris2-vim {:ft ["idris2"]}
;:ShinKage/nvim-idris2 {}
:vmchale/ats-vim {:ft ["ats" "dats" "sats"]}
:google/vim-jsonnet {}
:bakpakin/fennel.vim {})

View file

@ -56,7 +56,6 @@
;{:properties ["documentation" "detail" "additionalTextEdits"]})
;(init-lsp :rust_analyzer {:capabilities capabilities}))
(init-lsp :tsserver {:root_dir (lsp.util.root_pattern "package.json")})
(init-lsp :jsonls {:commands {:Format [ #(vim.lsp.buf.range_formatting [] [0 0] [(vim.fn.line "$") 0])]}})
(init-lsp :denols {:root_dir (better_root_pattern [".git"] ["package.json"])})
(init-lsp :hls {:settings {:languageServerHaskell {:formattingProvider "stylish-haskell"}}})
@ -66,11 +65,17 @@
(init-lsp :erlangls)
(init-lsp :yamlls)
(init-lsp :html)
;(init-lsp :clangd)
;(init-lsp :ccls)
(init-lsp :cssls {:filestypes ["css" "scss" "less" "stylus"]
:settings {:css {:validate true}
:less {:validate true}
:scss {:validate true}}})
(lsp.tsserver.setup {:root_dir (lsp.util.root_pattern "package.json")
:on_attach (fn [client bufnr]
(set client.resolved_capabilities.document_formatting false)
(on_attach client bufnr))})
(let [rust-tools (require "rust-tools")]
@ -107,7 +112,8 @@
(vim.lsp.buf_request 0
:textDocument/semanticTokens/full
{:textDocument (vim.lsp.util.make_text_document_params)}
nil)))
nil)
vim.NIL))
(when (not lsp.idris2_lsp)
(set lsp-configs.idris2_lsp

View file

@ -205,9 +205,9 @@ interval = 600
[module/gpuinfo]
type = custom/script
exec = "sudo ~/scripts/gpuinfo.sh"
exec = echo "$(radeontop -l 1 -d - | grep -o -e "gpu[^.]*" | sed "s/gpu //")%" || echo ""
format = "%{F#d3869b}%{T3}%{T-}%{F-} <label>"
click-left = "~/.config/polybar/polybar-scripts/toggle_gpuinfo_window.sh 'sudo /home/leon/scripts/gpuinfo.sh --watch'"
click-left = "~/.config/polybar/polybar-scripts/toggle_gpuinfo_window.sh radeontop"
interval = 2
[module/pulseaudio-control]