Skip to content

Commit

Permalink
close #71
Browse files Browse the repository at this point in the history
Signed-off-by: tracyone <tracyone@live.cn>
  • Loading branch information
tracyone committed Nov 10, 2022
1 parent 4df88af commit 748e1cf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lua/utils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ local function get_size(tabl)
end

function module.is_lsp_running()
local client_obj = vim.lsp.buf_get_clients()
local current_buf = vim.api.nvim_get_current_buf()
local client_obj = vim.lsp.get_active_clients{ buffer = current_buf }
return get_size(client_obj)
end

Expand Down
3 changes: 3 additions & 0 deletions rc/options.vim
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,9 @@ if get(g:,'feat_enable_airline') != 1
if te#env#SupportCscope()
let l:mystatus_line.='cscope[%{cscope_connection()}]'.s:right_seperator
endif
if get(g:, 'feat_enable_lsp') == 1
let l:mystatus_line.='lsp[%{te#lsp#is_server_running()}]'.s:right_seperator
endif
if a:type == 1
let l:mystatus_line.=s:git_branch
let l:mystatus_line.=s:function_name
Expand Down

0 comments on commit 748e1cf

Please sign in to comment.