From: Andre Ramnitz Date: Thu, 28 Nov 2024 17:42:25 +0000 (+0100) Subject: kak: configure starship to use kak-lsp info X-Git-Tag: v0.3~41 X-Git-Url: https://git.ramnitz.eu/?a=commitdiff_plain;h=9feda92d97337957a5958abcdf0dfac895b05ff7;p=dotfiles.git kak: configure starship to use kak-lsp info --- diff --git a/dot-config/kak/starship.toml b/dot-config/kak/starship.toml index 5a2db18f..1602da51 100644 --- a/dot-config/kak/starship.toml +++ b/dot-config/kak/starship.toml @@ -1,8 +1,12 @@ add_newline = false format = """\ +${custom.kaklsp_err}\ +${custom.kaklsp_warn}\ +${custom.kaklsp_hint}\ +${custom.kaklsp_code_actions}\ +${custom.kaklsp_progress}\ ${custom.kakmode}\ ${custom.kakcontext}\ -${custom.kaklsp_progress}\ $git_branch\ $git_commit\ $git_state\ @@ -10,10 +14,6 @@ $git_status\ $directory\ ${custom.kakfile}\ ${custom.kakfiletype}\ -${custom.kaklsp_err}\ -${custom.kaklsp_warn}\ -${custom.kaklsp_hint}\ -${custom.kaklsp_code_actions}\ $package\ ${custom.kaksession}\ ${custom.kakbuflist}\ @@ -28,6 +28,46 @@ ${custom.kakposition}\ [fill] symbol = ' ' +[custom.kaklsp_err] +description = "Show errors number from kak-lsp if any" +format = "[ %opt{lsp_diagnostic_error_count}]($style)" +style = "fg:red bold bg:default" +when = '[ -n "$kak_opt_lsp_diagnostic_error_count" -a "$kak_opt_lsp_diagnostic_error_count" -ne 0 ]' +shell = ['sh'] +disabled = false + +[custom.kaklsp_warn] +description = "Show warnings number from kak-lsp if any" +format = "[  %opt{lsp_diagnostic_warning_count}]($style)" +style = "fg:yellow bold bg:default" +when = '[ -n "$kak_opt_lsp_diagnostic_warning_count" -a "$kak_opt_lsp_diagnostic_warning_count" -ne 0 ]' +shell = ['sh'] +disabled = false + +[custom.kaklsp_hint] +description = "Show hints number from kak-lsp if any" +format = "[ ﯦ %opt{lsp_diagnostic_hint_count}]($style)" +style = "fg:white bold bg:default" +when = '[ -n "$kak_opt_lsp_diagnostic_hint_count" -a "$kak_opt_lsp_diagnostic_hint_count" -ne 0 ]' +shell = ['sh'] +disabled = false + +[custom.kaklsp_code_actions] +description = "Show lsp code actions if any" +format = "[ %opt{lsp_modeline_code_actions} ]($style)" +style = "fg:yellow bold bg:default" +when = '[ -n "$kak_opt_lsp_modeline_code_actions" ]' +shell = ['sh'] +disabled = false + +[custom.kaklsp_progress] +description = "Show activity of kak-lsp if any" +format = " [ ]($style)" +style = "fg:bright-white bold bg:default" +when = '[ -n "$kak_opt_lsp_modeline_progress" ]' +shell = ['sh'] +disabled = false + [git_branch] symbol = "" style = "fg:black bg:cyan bold" @@ -112,46 +152,6 @@ when = '' shell = ['true'] disabled = false -[custom.kaklsp_err] -description = "Show errors number from kak-lsp if any" -format = "[ %opt{lsp_diagnostic_error_count}]($style)" -style = "fg:red bold bg:black" -when = '[ -n "$kak_opt_lsp_diagnostic_error_count" -a "$kak_opt_lsp_diagnostic_error_count" -ne 0 ]' -shell = ['sh'] -disabled = true - -[custom.kaklsp_warn] -description = "Show warnings number from kak-lsp if any" -format = "[  %opt{lsp_diagnostic_warning_count}]($style)" -style = "fg:yellow bold bg:black" -when = '[ -n "$kak_opt_lsp_diagnostic_warning_count" -a "$kak_opt_lsp_diagnostic_warning_count" -ne 0 ]' -shell = ['sh'] -disabled = true - -[custom.kaklsp_hint] -description = "Show hints number from kak-lsp if any" -format = "[ ﯦ %opt{lsp_diagnostic_hint_count}]($style)" -style = "fg:white bold bg:black" -when = '[ -n "$kak_opt_lsp_diagnostic_hint_count" -a "$kak_opt_lsp_diagnostic_hint_count" -ne 0 ]' -shell = ['sh'] -disabled = true - -[custom.kaklsp_code_actions] -description = "Show lsp code actions if any" -format = "[ %opt{lsp_modeline_code_actions} ]($style)" -style = "fg:yellow bold bg:black" -when = '[ -n "$kak_opt_lsp_modeline_code_actions" ]' -shell = ['sh'] -disabled = true - -[custom.kaklsp_progress] -description = "Show activity of kak-lsp if any" -format = " [ ]($style)" -style = "fg:bright-white bold bg:black" -when = '[ -n "$kak_opt_lsp_modeline_progress" ]' -shell = ['sh'] -disabled = false - [custom.kakbuflist] description = "Open buffers" format = '[](fg:white bg:bright-black)[ numbufs: $output ]($style)'