nvim-lua / lsp-status.nvim

Utility functions for getting diagnostic status and progress messages from LSP servers, for use in the Neovim statusline
MIT License
625 stars 41 forks source link

Question: Status line is not displayed correctly #37

Closed nabezokodaikon closed 3 years ago

nabezokodaikon commented 3 years ago

Status line is not displayed correctly

If you set as below, it will look like the screenshot.

lua << END
local lsp_status = require('lsp-status')
lsp_status.register_progress()

local nvim_lsp = require('lspconfig')

nvim_lsp.tsserver.setup({
  on_attach = lsp_status.on_attach,
  capabilities = lsp_status.capabilities
})
END

function! LspStatus() abort
    if luaeval('#vim.lsp.buf_get_clients() > 0')
        return luaeval("require('lsp-status').status()")
    endif

    return ''
endfunction

set statusline=%{LspStatus()}
スクリーンショット 2021-02-04 21 44 23

How do you make it look like a sample?

wbthomason commented 3 years ago

Do you have the fonts mentioned in the README installed?

ajitid commented 3 years ago

Do we also need to define handlers = lsp_status.extensions.tsserver.setup() here?

wbthomason commented 3 years ago

@zlksnk: We haven't explicitly implemented any extensions for tsserver. If you'd like these to be added, please open a new PR or issue with more information (e.g. what are the extensions, etc.). Thanks!

nabezokodaikon commented 3 years ago

I can't have a status line like the sample. I gave up. Thank you.