null ls removed
This commit is contained in:
+24
-18
@@ -4,67 +4,73 @@ set -e
|
|||||||
# general
|
# general
|
||||||
sudo systemctl enable --now sshd.service
|
sudo systemctl enable --now sshd.service
|
||||||
sudo systemctl enable --now fstrim.timer
|
sudo systemctl enable --now fstrim.timer
|
||||||
yay plymouth tldextract go nodejs unzip exa
|
yay -S plymouth tldextract go nodejs unzip exa
|
||||||
|
|
||||||
# nvidia
|
# nvidia
|
||||||
yay cuda nvidia-settings nvidia-docker
|
yay -S cuda nvidia-settings nvidia-docker
|
||||||
|
|
||||||
# python
|
# python
|
||||||
yay python-pip pyenv ipython
|
yay -S python-pip pyenv ipython
|
||||||
|
|
||||||
# sound
|
# sound
|
||||||
yay manjaro-pipewire pavucontrol
|
yay -S manjaro-pipewire pavucontrol
|
||||||
|
|
||||||
# terminal and shell
|
# terminal and shell
|
||||||
yay kitty fish
|
yay -S kitty fish
|
||||||
chsh -s /usr/bin/fish
|
chsh -s /usr/bin/fish
|
||||||
|
|
||||||
# code
|
# code
|
||||||
yay neovim tig stylua tmux diff-so-fancy ripgrep prettier jq git-lfs git-secret shfmt yq glow nvimpager git-delta
|
yay -S neovim tmux tig diff-so-fancy ripgrep nvimpager
|
||||||
git clone https://github.com/tmux-plugins/tpm ~/.config/tmux/plugins/tpm
|
git clone https://github.com/tmux-plugins/tpm ~/.config/tmux/plugins/tpm
|
||||||
|
# git
|
||||||
|
yay -S git-secret git-delta git-lfs
|
||||||
|
# formatters
|
||||||
|
yay -S python-black python-blackdoc python-pyment python-isort \
|
||||||
|
eslint_d eslint jq yamlfmt shfmt prettierd
|
||||||
|
|
||||||
# file sync
|
# file sync
|
||||||
yay syncthings rclone
|
yay -S syncthings rclone glusterfs
|
||||||
sudo systemctl enable --now syncthing@hjalmarlucius.service
|
sudo systemctl enable --now syncthing@hjalmarlucius.service
|
||||||
systemctl --user daemon-reload
|
systemctl --user daemon-reload
|
||||||
systemctl --user enable --now rclone-gdrive.service
|
systemctl --user enable --now rclone-gdrive.service
|
||||||
|
sudo systemctl enable --now glusterd
|
||||||
|
|
||||||
# docker incl non-root daemon
|
# docker incl non-root daemon
|
||||||
yay docker docker-compose dry-bin nvidia-docker docker-buildx
|
yay -S docker docker-compose dry-bin nvidia-docker docker-buildx
|
||||||
sudo groupadd docker && sudo usermod -aG docker $USER
|
sudo groupadd docker && sudo usermod -aG docker $USER
|
||||||
sudo systemctl enable --now containerd.service
|
sudo systemctl enable --now containerd.service
|
||||||
sudo systemctl enable --now docker.service
|
sudo systemctl enable --now docker.service
|
||||||
|
|
||||||
# printer
|
# printer
|
||||||
yay manajaro-printer samsung-unified-driver-printer
|
yay -S manajaro-printer samsung-unified-driver-printer
|
||||||
|
|
||||||
# monitors
|
# monitors
|
||||||
yay iftop bpytop nvtop
|
yay -S iftop bpytop nvtop
|
||||||
|
|
||||||
# pdf
|
# pdf
|
||||||
yay zathura zathura-pdf-mupdf zathura-djvu zathura-ps
|
yay -S zathura zathura-pdf-mupdf zathura-djvu zathura-ps
|
||||||
|
|
||||||
# fonts
|
# fonts
|
||||||
yay noto-fonts-emoji ttf-hack
|
yay -S noto-fonts-emoji ttf-hack
|
||||||
|
|
||||||
# browser
|
# browser
|
||||||
|
|
||||||
# zerotier
|
# zerotier
|
||||||
yay zerotier-one
|
yay -S zerotier-one
|
||||||
sudo systemctl enable --now zerotier-one.service
|
sudo systemctl enable --now zerotier-one.service
|
||||||
sudo zerotier-cli join d5e5fb653797795b
|
sudo zerotier-cli join d5e5fb653797795b
|
||||||
|
|
||||||
# coolercontrol
|
# coolercontrol
|
||||||
yay coolercontrol
|
yay -S coolercontrol
|
||||||
sudo systemctl enable --now coolercontrold.service
|
sudo systemctl enable --now coolercontrold.service
|
||||||
sudo systemctl edit coolercontrold.service # set log level to WARN
|
sudo systemctl edit coolercontrold.service # set log level to WARN
|
||||||
|
|
||||||
# video streaming
|
# video streaming
|
||||||
yay vlc protobuf
|
yay -S vlc protobuf
|
||||||
yay castnow
|
yay -S castnow
|
||||||
|
|
||||||
# div applications
|
# div applications
|
||||||
yay i3status \
|
yay -S i3status \
|
||||||
rofi \
|
rofi \
|
||||||
mutt \
|
mutt \
|
||||||
redshift \
|
redshift \
|
||||||
|
|||||||
+97
-95
@@ -149,11 +149,6 @@ require("lazy").setup({
|
|||||||
vim.g.mkdp_echo_preview_url = 1
|
vim.g.mkdp_echo_preview_url = 1
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"ellisonleao/glow.nvim",
|
|
||||||
config = true,
|
|
||||||
cmd = "Glow",
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
-- better asterisk search
|
-- better asterisk search
|
||||||
"haya14busa/vim-asterisk",
|
"haya14busa/vim-asterisk",
|
||||||
@@ -513,58 +508,85 @@ require("lazy").setup({
|
|||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"williamboman/mason-lspconfig.nvim",
|
"mhartington/formatter.nvim",
|
||||||
dependencies = { "williamboman/mason.nvim" },
|
-- Utilities for creating configurations
|
||||||
},
|
config = function ()
|
||||||
{
|
|
||||||
-- autoinstalls stuff specified in null-ls
|
local util = require("formatter.util")
|
||||||
"jay-babu/mason-null-ls.nvim",
|
local map = vim.keymap.set
|
||||||
event = { "BufReadPre", "BufNewFile" },
|
local opts = { silent = true, noremap = true }
|
||||||
dependencies = {
|
map("n", "<leader>f", ":Format<cr>", opts)
|
||||||
"williamboman/mason.nvim",
|
map("n", "<leader>F", ":FormatWrite<cr>", opts)
|
||||||
"jose-elias-alvarez/null-ls.nvim",
|
|
||||||
},
|
-- Provides the Format, FormatWrite, FormatLock, and FormatWriteLock commands
|
||||||
config = function()
|
require("formatter").setup({
|
||||||
require("mason-null-ls").setup({
|
logging = true,
|
||||||
ensure_installed = nil,
|
log_level = vim.log.levels.WARN,
|
||||||
automatic_setup = false,
|
filetype = {
|
||||||
automatic_installation = false,
|
python = {
|
||||||
})
|
require("formatter.filetypes.python").black,
|
||||||
end,
|
-- require("formatter.filetypes.python").pyment,
|
||||||
},
|
function ()
|
||||||
{
|
return {
|
||||||
"jose-elias-alvarez/null-ls.nvim",
|
exe = "isort",
|
||||||
dependencies = { "nvim-lua/plenary.nvim" },
|
args = { "--quiet", "--profile black", "--force-single-line-import", "-" },
|
||||||
config = function()
|
stdin = true,
|
||||||
-- local augroup = vim.api.nvim_create_augroup("LspFormatting", {})
|
}
|
||||||
local null_ls = require("null-ls")
|
end,
|
||||||
null_ls.setup({
|
function ()
|
||||||
sources = {
|
return {
|
||||||
-- null_ls.builtins.diagnostics.mypy,
|
exe = "black",
|
||||||
null_ls.builtins.diagnostics.eslint_d,
|
args = { "--quiet", "--preview", "-" },
|
||||||
null_ls.builtins.formatting.black.with({ extra_args = { "--preview" } }),
|
stdin = true,
|
||||||
null_ls.builtins.formatting.eslint_d,
|
}
|
||||||
null_ls.builtins.formatting.isort,
|
end,
|
||||||
null_ls.builtins.formatting.jq,
|
function ()
|
||||||
null_ls.builtins.formatting.prettierd,
|
return {
|
||||||
null_ls.builtins.formatting.shfmt.with({ extra_args = { "--indent", "4" } }),
|
exe = "blackdoc",
|
||||||
null_ls.builtins.formatting.stylua.with({ extra_args = { "--indent-type", "Spaces" } }),
|
args = { "-q", "-t py311", },
|
||||||
null_ls.builtins.formatting.yamlfmt,
|
stdin = false,
|
||||||
},
|
}
|
||||||
-- on_attach = function(client, bufnr)
|
end,
|
||||||
-- if client.supports_method("textDocument/formatting") then
|
},
|
||||||
-- vim.api.nvim_clear_autocmds({ group = augroup, buffer = bufnr })
|
lua = {
|
||||||
-- vim.api.nvim_create_autocmd("BufWritePre", {
|
function ()
|
||||||
-- group = augroup,
|
return {
|
||||||
-- buffer = bufnr,
|
exe = "stylua",
|
||||||
-- callback = function()
|
args = {
|
||||||
-- vim.lsp.buf.format({ bufnr = bufnr })
|
"--search-parent-directories",
|
||||||
-- end,
|
"--indent-type Spaces",
|
||||||
-- })
|
"--stdin-filepath",
|
||||||
-- end
|
util.escape_path(util.get_current_buffer_file_path()),
|
||||||
-- end,
|
"--",
|
||||||
})
|
"-",
|
||||||
end,
|
},
|
||||||
|
stdin = true,
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
yaml = {
|
||||||
|
function ()
|
||||||
|
return {
|
||||||
|
exe = "yamlfmt",
|
||||||
|
args = { "-formatter indentless_arrays=true,retain_line_breaks=true,line_ending=lf,max_line_length=100,pad_line_comments=2", "-in" },
|
||||||
|
stdin = true,
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
sh = { require("formatter.filetypes.sh").shfmt, },
|
||||||
|
typescript = { require("formatter.filetypes.typescript").eslint_d, },
|
||||||
|
javascript = { require("formatter.filetypes.javascript").eslint_d, },
|
||||||
|
html = { require("formatter.filetypes.html").prettierd, },
|
||||||
|
css = {
|
||||||
|
require("formatter.filetypes.css").prettierd,
|
||||||
|
require("formatter.filetypes.css").eslint_d,
|
||||||
|
},
|
||||||
|
markdown = { require("formatter.filetypes.markdown").prettierd, },
|
||||||
|
json = {require("formatter.filetypes.json").jq, },
|
||||||
|
["*"] = { require("formatter.filetypes.any").remove_trailing_whitespace },
|
||||||
|
}
|
||||||
|
})
|
||||||
|
end
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"neovim/nvim-lspconfig",
|
"neovim/nvim-lspconfig",
|
||||||
@@ -609,22 +631,9 @@ require("lazy").setup({
|
|||||||
bmap("n", "K", vim.lsp.buf.hover)
|
bmap("n", "K", vim.lsp.buf.hover)
|
||||||
bmap("n", "<M-r>", vim.lsp.buf.rename)
|
bmap("n", "<M-r>", vim.lsp.buf.rename)
|
||||||
bmap("n", "<leader>ca", vim.lsp.buf.code_action)
|
bmap("n", "<leader>ca", vim.lsp.buf.code_action)
|
||||||
vim.api.nvim_buf_create_user_command(bufnr, "Format", function(_)
|
|
||||||
vim.lsp.buf.format({ timeout_ms = 5000 })
|
|
||||||
end, { desc = "Format current buffer with LSP" })
|
|
||||||
bmap("n", "<leader>f", "<cmd>Format<cr>")
|
|
||||||
if
|
|
||||||
client.server_capabilities.documentFormattingProvider
|
|
||||||
or client.server_capabilities.documentRangeFormattingProvider
|
|
||||||
then
|
|
||||||
vim.api.nvim_command([[augroup Format]])
|
|
||||||
vim.api.nvim_command([[autocmd! * <buffer>]])
|
|
||||||
vim.api.nvim_command([[autocmd BufWritePre * lua vim.lsp.buf.format({ timeout_ms = 5000 })]])
|
|
||||||
vim.api.nvim_command([[augroup END]])
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
local servers = {
|
local server_configs = {
|
||||||
pyright = {
|
pyright = {
|
||||||
python = {
|
python = {
|
||||||
analysis = {
|
analysis = {
|
||||||
@@ -645,21 +654,12 @@ require("lazy").setup({
|
|||||||
},
|
},
|
||||||
telemetry = { enable = false },
|
telemetry = { enable = false },
|
||||||
diagnostics = {
|
diagnostics = {
|
||||||
-- Get the language server to recognize the `vim` global
|
-- Get the language server to recognize the `vim` global in init.lua
|
||||||
globals = { "vim" },
|
globals = { "vim" },
|
||||||
},
|
},
|
||||||
format = { -- disable formatting, stylua handles it
|
format = {enable = false},
|
||||||
enable = false,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
marksman = {},
|
|
||||||
yamlls = {},
|
|
||||||
tsserver = {},
|
|
||||||
html = {},
|
|
||||||
eslint = {},
|
|
||||||
cssls = {},
|
|
||||||
bashls = {},
|
|
||||||
}
|
}
|
||||||
require("neodev").setup()
|
require("neodev").setup()
|
||||||
|
|
||||||
@@ -668,14 +668,25 @@ require("lazy").setup({
|
|||||||
|
|
||||||
local mason_lspconfig = require("mason-lspconfig")
|
local mason_lspconfig = require("mason-lspconfig")
|
||||||
mason_lspconfig.setup({
|
mason_lspconfig.setup({
|
||||||
ensure_installed = vim.tbl_keys(servers),
|
ensure_installed = {
|
||||||
|
"bashls", -- bash
|
||||||
|
"cssls", -- css
|
||||||
|
"eslint", -- javascript
|
||||||
|
"html", -- html
|
||||||
|
"jsonls", -- json
|
||||||
|
"lua_ls", -- lua
|
||||||
|
"marksman", -- markdown
|
||||||
|
"pyright", -- python
|
||||||
|
"tsserver", -- typescript
|
||||||
|
"yamlls", -- yaml
|
||||||
|
},
|
||||||
})
|
})
|
||||||
mason_lspconfig.setup_handlers({
|
mason_lspconfig.setup_handlers({
|
||||||
function(server_name)
|
function(server_name)
|
||||||
require("lspconfig")[server_name].setup({
|
require("lspconfig")[server_name].setup({
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
settings = servers[server_name],
|
settings = server_configs[server_name],
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
@@ -771,16 +782,11 @@ vim.o.foldenable = false
|
|||||||
vim.o.foldmethod = "expr"
|
vim.o.foldmethod = "expr"
|
||||||
|
|
||||||
vim.o.completeopt = "menu,menuone,noinsert"
|
vim.o.completeopt = "menu,menuone,noinsert"
|
||||||
|
vim.opt.formatoptions = vim.opt.formatoptions - {"c", "r", "o"}
|
||||||
|
|
||||||
-- ----------------------------------------
|
-- press enter in quickfix list to goto
|
||||||
-- AUTOCOMMANDS
|
|
||||||
-- ----------------------------------------
|
|
||||||
local cmd = vim.cmd
|
|
||||||
|
|
||||||
vim.api.nvim_command([[augroup MYAU]])
|
vim.api.nvim_command([[augroup MYAU]])
|
||||||
vim.api.nvim_command([[autocmd!]])
|
vim.api.nvim_command([[autocmd!]])
|
||||||
vim.api.nvim_command([[autocmd BufWritePre * %s/\s\+$//e]])
|
|
||||||
vim.api.nvim_command([[autocmd FileType python setlocal indentkeys-=<:>]])
|
|
||||||
vim.api.nvim_command([[autocmd BufReadPost quickfix nmap <buffer> <cr> <cr>]])
|
vim.api.nvim_command([[autocmd BufReadPost quickfix nmap <buffer> <cr> <cr>]])
|
||||||
vim.api.nvim_command([[augroup END]])
|
vim.api.nvim_command([[augroup END]])
|
||||||
|
|
||||||
@@ -837,14 +843,10 @@ map("n", "<C-n>", "<cmd>cn<cr>", { noremap = true })
|
|||||||
map("n", "<F1>", "<cmd>Lazy<cr>", { noremap = true })
|
map("n", "<F1>", "<cmd>Lazy<cr>", { noremap = true })
|
||||||
map("n", "<F2>", "<cmd>Mason<cr>", { noremap = true })
|
map("n", "<F2>", "<cmd>Mason<cr>", { noremap = true })
|
||||||
map("n", "<F3>", "<cmd>LspInfo<cr>", { noremap = true })
|
map("n", "<F3>", "<cmd>LspInfo<cr>", { noremap = true })
|
||||||
map("n", "<F4>", "<cmd>NullLsInfo<cr>", { noremap = true })
|
|
||||||
map("n", "<F5>", "<cmd>checkt<cr>", { noremap = true })
|
map("n", "<F5>", "<cmd>checkt<cr>", { noremap = true })
|
||||||
map("n", "<F6>", "<cmd>TodoQuickFix<cr>", { noremap = true })
|
map("n", "<F6>", "<cmd>TodoQuickFix<cr>", { noremap = true })
|
||||||
map("n", "<F9>", '<cmd>lua require("telescope.builtin").colorscheme({enable_preview=1})<cr>', { noremap = true })
|
map("n", "<F9>", '<cmd>lua require("telescope.builtin").colorscheme({enable_preview=1})<cr>', { noremap = true })
|
||||||
|
|
||||||
-- shit HACK
|
|
||||||
map("n", "<leader>b", "<cmd>!blackdoc %<cr>", { noremap = true })
|
|
||||||
|
|
||||||
-- cursor color
|
-- cursor color
|
||||||
|
|
||||||
-- https://codeyarns.com/tech/2011-07-29-vim-chart-of-color-names.html
|
-- https://codeyarns.com/tech/2011-07-29-vim-chart-of-color-names.html
|
||||||
|
|||||||
Reference in New Issue
Block a user