From 8afead02b0a21327d8c777caca24c3f8a02fdc5d Mon Sep 17 00:00:00 2001 From: JafarAbdi Date: Sun, 10 Nov 2024 12:44:37 +0100 Subject: [PATCH] Upates --- neovim/.config/nvim/init.lua | 24 +++++++++++++++++++++--- scripts/.local/bin/myinstall | 7 +++++++ 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/neovim/.config/nvim/init.lua b/neovim/.config/nvim/init.lua index f2a17e5..6898f81 100644 --- a/neovim/.config/nvim/init.lua +++ b/neovim/.config/nvim/init.lua @@ -730,7 +730,7 @@ local servers = { "linters", "bin", "ruff" - ) .. " --quiet ${INPUT}", + ) .. " check --quiet ${INPUT}", lintStdin = true, lintFormats = { "%f:%l:%c: %m", @@ -979,11 +979,20 @@ for _, server in pairs(servers) do or function(startpath) return vim.fs.root(startpath, { ".git" }) end + local capabilities = + vim.tbl_deep_extend("force", vim.lsp.protocol.make_client_capabilities(), { + workspace = { + didChangeWatchedFiles = { + dynamicRegistration = true, + }, + }, + }) + vim.lsp.start({ name = server.name, cmd = server.cmd, on_attach = function(_, _) end, - capabilities = vim.lsp.protocol.make_client_capabilities(), + capabilities = capabilities, settings = server.settings or vim.empty_dict(), init_options = server.init_options and server.init_options(args.file) or vim.empty_dict(), root_dir = root_dir(args.file), @@ -1400,9 +1409,15 @@ require("lazy").setup({ vim.diagnostic.config({ underline = false, update_in_insert = true, - virtual_text = { severity = vim.diagnostic.severity.ERROR }, + virtual_text = { + severity = vim.diagnostic.severity.ERROR, + source = "if_many", + }, severity_sort = true, signs = false, + jump = { + float = true, + }, }) vim.opt.foldenable = false vim.opt.number = true @@ -1461,6 +1476,9 @@ vim.filetype.add({ xacro = "xml", install = "text", repos = "yaml", + jinja = "jinja", + jinja2 = "jinja", + j2 = "jinja", }, }) diff --git a/scripts/.local/bin/myinstall b/scripts/.local/bin/myinstall index 41e391a..6abd4e4 100755 --- a/scripts/.local/bin/myinstall +++ b/scripts/.local/bin/myinstall @@ -98,6 +98,7 @@ case "${1:-}" in $0 fd $0 repgrep $0 pixi + $0 uv $0 nvim nightly $0 mold $0 difftastic @@ -428,6 +429,12 @@ case "${1:-}" in rattler-build completion --shell=fish > ~/.config/fish/completions/rattler-build.fish ;; + uv) + curl -LsSf https://astral.sh/uv/install.sh | sh + echo 'uv generate-shell-completion fish | source' >> ~/.config/fish/config.fish + echo 'uvx --generate-shell-completion fish | source' >> ~/.config/fish/config.fish + ;; + pixi) wget https://github.com/prefix-dev/pixi/releases/latest/download/pixi-x86_64-unknown-linux-musl -O ~/.local/bin/pixi chmod +x ~/.local/bin/pixi