diff --git a/hm/vim/decoration.nix b/hm/vim/decoration.nix index 6975e5d..b5f51bc 100644 --- a/hm/vim/decoration.nix +++ b/hm/vim/decoration.nix @@ -38,7 +38,7 @@ title = true; }; plugins = { - # Tablinee + # Tabline barbar.enable = true; # TODO Investigate bufferline? # Status line @@ -52,17 +52,21 @@ enable = true; inactiveSections = sections; sections = { - lualine_a = [ - { - name = ''string.format('%d', vim.fn.line('$'))''; - } - "location" - ]; + lualine_a = [{ + name = ''string.format('%d', vim.fn.line('$'))''; + }]; lualine_b = [ "mode" ]; lualine_c = [{ name = "filename"; + color = { + __raw = '' + function(section) + return { fg = vim.bo.modified and '${base08}' or '${normal.fg}' } + end + ''; + }; extraConfig = { path = 1; # Relative path symbols = { @@ -72,8 +76,12 @@ unnamed = "󱀶"; }; }; - }]; - lualine_x = (lib.mapAttrsToList + } + "location"]; + lualine_x = [{ + name = ''(next(vim.lsp.buf_get_clients()) == nil) and "󰒲 " or ""''; + extraConfig.separator = { left = ""; right = ""; }; + }] ++ (lib.mapAttrsToList (diag_name: diag_color: { name = "diagnostics"; extraConfig = { @@ -117,7 +125,7 @@ b = inverted // { bg = mode_color; gui = "bold"; }; c = normal; x = inverted; - y = inverted; + y = normal; z = inverted // { bg = mode_color; }; }) { @@ -132,11 +140,16 @@ b = normal_ina // { bg = base00; gui = "bold"; }; c = normal_ina; x = inverted_ina; - y = inverted_ina; + y = normal_ina; z = normal_ina // { bg = base00; }; }; }; }; + # Show context on top if scrolled out + treesitter-context = { + enable = true; + maxLines = 5; + }; }; }; }; diff --git a/hm/vim/default.nix b/hm/vim/default.nix index 125fe37..e067dce 100644 --- a/hm/vim/default.nix +++ b/hm/vim/default.nix @@ -70,6 +70,8 @@ overrideGenericSorter = true; }; }; + # TODO Go to any symbol in the current working directory, for when LSP doesn't support it. + # Or at least something to live_grep the curent word. # Surrounding pairs surround.enable = true; # Change surrounding pairs (e.g. brackets, quotes) diff --git a/hm/vim/git.nix b/hm/vim/git.nix index ee7047c..7c8706f 100644 --- a/hm/vim/git.nix +++ b/hm/vim/git.nix @@ -10,6 +10,7 @@ ''; extraPlugins = with pkgs.vimPlugins; [ fugitive-gitlab-vim # Open files in GitLab + # TODO Investigate gitlinker instead ]; plugins = { fugitive.enable = true; # Git basics