changes here and there

This commit is contained in:
Solomon Laing 2022-11-19 17:10:01 +10:30
parent 8a9f62baaf
commit 0167541ae8
3 changed files with 67 additions and 54 deletions

View File

@ -36,9 +36,9 @@ local settings = {
ui = {
border = "rounded",
icons = {
package_installed = "",
package_pending = "",
package_uninstalled = "",
package_installed = "i",
package_pending = "p",
package_uninstalled = "u",
},
},
log_level = vim.log.levels.INFO,

View File

@ -8,16 +8,31 @@ local formatting = null_ls.builtins.formatting
-- https://github.com/jose-elias-alvarez/null-ls.nvim/tree/main/lua/null-ls/builtins/diagnostics
local diagnostics = null_ls.builtins.diagnostics
-- https://github.com/prettier-solidity/prettier-plugin-solidity
-- npm install --save-dev prettier prettier-plugin-solidity
null_ls.setup {
null_ls.setup({
debug = false,
sources = {
formatting.prettier.with {
extra_filetypes = { "toml", "solidity" },
extra_args = { "--no-semi", "--single-quote", "--jsx-single-quote" },
formatting.prettier.with({
filetypes = {
"javascript",
"javascriptreact",
"typescript",
"typescriptreact",
"vue",
"css",
"scss",
"less",
"html",
"json",
"jsonc",
"yaml",
"graphql",
"handlebars",
},
formatting.black.with { extra_args = { "--fast" } },
}),
formatting.deno_fmt.with({
filetypes = { "markdown" }, -- only runs `deno fmt` for markdown
}),
formatting.black.with({ extra_args = { "--fast" } }),
formatting.stylua,
-- formatting.shfmt,
formatting.google_java_format,
@ -26,7 +41,7 @@ null_ls.setup {
-- diagnostics.flake8,
diagnostics.shellcheck,
},
}
})
local unwrap = {
method = null_ls.methods.DIAGNOSTICS,
@ -37,7 +52,7 @@ local unwrap = {
-- sources have access to a params object
-- containing info about the current file and editor state
for i, line in ipairs(params.content) do
local col, end_col = line:find "unwrap()"
local col, end_col = line:find("unwrap()")
if col and end_col then
-- null-ls fills in undefined positions
-- and converts source diagnostics into the required format

View File

@ -7,7 +7,7 @@
[ -f "$XINITRC" ] && alias startx="startx $XINITRC"
# sudo not required for some system commands
for command in mount umount sv pacman updatedb su shutdown poweroff reboot ; do
for command in mount umount pacman su shutdown poweroff reboot ; do
alias $command="sudo $command"
done; unset command
@ -40,9 +40,6 @@ alias \
lf="lfub" \
magit="nvim -c MagitOnly" \
ref="shortcuts >/dev/null; source ${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutrc ; source ${XDG_CONFIG_HOME:-$HOME/.config}/shell/zshnameddirrc" \
weath="less -S ${XDG_DATA_HOME:-$HOME/.local/share}/weatherreport" \
# Everything above this comes from Luke Smiths voidrice.
# Alias dotfiles/config related commands
alias \
@ -57,10 +54,11 @@ alias \
tmn="tmux new" \
tma="tmux-worker" \
tms="tmux-sessioniser" \
tm.="tmux-sessioniser \"$(pwd)\""
tm.="tmux-sessioniser ."
# Alias some extra things for ease of use
alias \
myip="curl api.ipify.org" \
cls="clear" \
c="clear"
c="clear" \
cdc="cd && clear"