diff --git a/README.md b/README.md index 6f41e826..fdb42710 100644 --- a/README.md +++ b/README.md @@ -44,11 +44,10 @@ nix develop -c /etc/nixos/git/docs/setup.sh --- # To Do List * [ ] fixes - * fix vim theming in tmux - * change tmux bracket angles - * change vim bracket angles * find a better sidebar for vim * try the outliner tool again for vim + * borders around all the things + * re-enable a few things when 24.05 is stable ## Host Specific ### framework-server @@ -66,6 +65,8 @@ nix develop -c /etc/nixos/git/docs/setup.sh ## Desktop / GUI * [ ] rofi - rbw integration * [ ] Set up PyRadio with Nightride.FM +* [ ] Update desktop Hyprland config with new monitor setup +* [ ] See if I can hide the waybar hyprlan workspace switcher when only 1 desktop is present Completed ToDo List [here](./docs/complete.md) diff --git a/home-manager/common/software/cli/bash.nix b/home-manager/common/software/cli/bash.nix index 22a9df5b..d1b773c2 100644 --- a/home-manager/common/software/cli/bash.nix +++ b/home-manager/common/software/cli/bash.nix @@ -37,7 +37,7 @@ GPG_TTY=$(tty) EDITOR=vim ssh-add > /dev/null &> /dev/null - # [ -z "$TMUX" ] && { tmux attach || exec tmux new-session && exit;} + [ -z "$TMUX" ] && { tmux attach || exec tmux new-session && exit;} ''; sessionVariables = { # Set the GTK Theme diff --git a/home-manager/common/software/cli/nixvim.nix b/home-manager/common/software/cli/nixvim.nix index c4ef1924..57c05d60 100644 --- a/home-manager/common/software/cli/nixvim.nix +++ b/home-manager/common/software/cli/nixvim.nix @@ -2,6 +2,56 @@ imports = [ ./nixvim/base.nix ]; programs.nixvim = { + extraConfigLuaPost = '' + local _border = "rounded" + + vim.lsp.handlers["textDocument/hover"] = vim.lsp.with( + vim.lsp.handlers.hover, { + border = _border + } + ) + + vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with( + vim.lsp.handlers.signature_help, { + border = _border + } + ) + + vim.diagnostic.config{ + float={border=_border} + } + vim.cmd [[nnoremap :lua vim.lsp.diagnostic.show_line_diagnostics({ border = "single" })]] + vim.cmd [[nnoremap ]g :lua vim.lsp.diagnostic.goto_next({ popup_opts = { border = "single" }})]] + vim.cmd [[nnoremap [g :lua vim.lsp.diagnostic.goto_prev({ popup_opts = { border = "single" }})]] + + vim.diagnostic.config { float={border=_border} } + require('lspconfig.ui.windows').default_options = { border = _border } + local signs = { Error = "󰅚 ", Warn = "󰀪 ", Hint = "󰌶 ", Info = " " } + + for type, icon in pairs(signs) do + local hl = "DiagnosticSign" .. type + vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl }) + end + + local orig_util_open_floating_preview = vim.lsp.util.open_floating_preview + function vim.lsp.util.open_floating_preview(contents, syntax, opts, ...) + opts = opts or {} + opts.border = opts.border or border + return orig_util_open_floating_preview(contents, syntax, opts, ...) + end + + vim.diagnostic.config({ + virtual_text = { + prefix = '●', + } + }) + LspDiagnosticsFloatingError = {fg=color1,bg=none,style='bold'}; + LspDiagnosticsFloatingWarning = {fg=color2,bg=none,style='bold'}; + LspDiagnosticsFloatingInformation = {fg=color3,bg=none,style='italic'}; + LspDiagnosticsFloatingHint = {fg=color4,bg=none,style='italic'}; + + ''; + plugins = { lsp-lines.enable = false; lsp-lines.currentLine = true; @@ -40,8 +90,25 @@ tailwindcss.enable = true; svelte.enable = true; }; + + onAttach = '' + vim.api.nvim_create_autocmd("CursorHold", { + buffer = bufnr, + callback = function() + local opts = { + focusable = false, + close_events = { "BufLeave", "CursorMoved", "InsertEnter", "FocusLost" }, + border = 'rounded', + source = 'always', + prefix = ' ', + scope = 'cursor', + } + vim.diagnostic.open_float(nil, opts) + end + }) + ''; keymaps = { - silent = true; + silent = false; diagnostic = { "lk" = { action = "goto_prev"; diff --git a/home-manager/common/software/cli/nixvim/base.nix b/home-manager/common/software/cli/nixvim/base.nix index 84e38d60..783c8414 100644 --- a/home-manager/common/software/cli/nixvim/base.nix +++ b/home-manager/common/software/cli/nixvim/base.nix @@ -30,7 +30,6 @@ }; plugins = { - # Git related # Gutter information for git modifications gitsigns.enable = true; @@ -79,13 +78,43 @@ # winbar that uses nvim-navic in order to get LSP context from your language server. barbecue.enable = true; # tab bar like Firefox or Chrome - bufferline.enable = true; + bufferline = { + enable = true; + offsets = [{ + filetype = "NvimTree"; + text = "File Explorer"; + highlight = "EcovimNvimTreeTitle"; + text_align = "center"; + separator = true; + }]; + }; + # sidebar file browser - nvim-tree.enable = true; + nvim-tree = { + enable = true; + diagnostics.enable = true; + renderer = { + highlightModified = "icon"; + highlightOpenedFiles = "all"; + indentMarkers.enable = true; + }; + }; # Terminal in vim toggleterm.enable = true; # Alerts / CodeActions - trouble.enable = true; + trouble = { + enable = true; +# TODO Re-enable on 24.05 +# settings = { +# auto_close = true; +# auto_open = true; +# cycle_results = false; +# height = 14; +# win_config = { +# border = "rounded"; +# }; +# }; + }; # Code Related # Parser generator tool @@ -94,11 +123,11 @@ luasnip.enable = true; cmp_luasnip.enable = true; # CMP Addons - # cmp-buffer.enable = true; - # cmp-path.enable = true; - # cmp-nvim-lsp.enable = true; - # cmp-nvim-lsp-document-symbol.enable = true; - # cmp-nvim-lsp-signature-help.enable = true; + cmp-buffer.enable = true; + cmp-path.enable = true; + cmp-nvim-lsp.enable = true; + cmp-nvim-lsp-document-symbol.enable = true; + cmp-nvim-lsp-signature-help.enable = true; # List of linters for nixvim @@ -123,6 +152,7 @@ # Popup to show shortcuts which-key = { enable = true; + window.border = "rounded"; registrations = { "b" = "Manage buffers..."; "c" = "Colorscheme..."; @@ -230,7 +260,7 @@ snippet.expand = "luasnip"; window = { completion.border = "rounded"; - documentation.border = "rounded"; + documentation.border = "rounded"; }; formatting = { fields = [ "menu" "abbr" "kind" ];