Skip to content

Disable process/server id in modeline #3729

Answered by sonofjon
sonofjon asked this question in Q&A
Discussion options

You must be logged in to vote

For anyone interested, here's my solution.

;; Custom LSP modeline print function without process id
(defun aj8/lsp--workspace-print (workspace)
  "Visual representation WORKSPACE."
  (let* ((proc (lsp--workspace-cmd-proc workspace))
         (status (lsp--workspace-status workspace))
         (server-id (-> workspace lsp--workspace-client lsp--client-server-id symbol-name)))
    (if (eq 'initialized status)
        (format "%s" server-id)
      (format "%s/%s" server-id status))))

 ;; Don't show process id in modeline
(advice-add #'lsp--workspace-print :override #'aj8/lsp--workspace-print)

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@yyoncho
Comment options

@sonofjon
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by sonofjon
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants