lualine
This commit is contained in:
@ -1,6 +1,10 @@
|
|||||||
local use_google = require("utils").use_google
|
local use_google = require("utils").use_google
|
||||||
local notify = require 'notify'
|
local notify = require 'notify'
|
||||||
|
|
||||||
|
local lsp_status = require('lsp-status')
|
||||||
|
lsp_status.register_progress()
|
||||||
|
|
||||||
|
|
||||||
require("mason").setup()
|
require("mason").setup()
|
||||||
require("mason-lspconfig").setup({
|
require("mason-lspconfig").setup({
|
||||||
ensure_installed = { "sumneko_lua", "rust_analyzer" }
|
ensure_installed = { "sumneko_lua", "rust_analyzer" }
|
||||||
@ -84,8 +88,6 @@ cider_lsp_handlers['window/showMessage'] = function(_, result, ctx)
|
|||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
local lsp_status = require('lsp-status')
|
|
||||||
|
|
||||||
-- 3. Set up CiderLSP
|
-- 3. Set up CiderLSP
|
||||||
local on_attach = function(client, bufnr)
|
local on_attach = function(client, bufnr)
|
||||||
vim.b['is_cider_lsp_attached'] = 'no'
|
vim.b['is_cider_lsp_attached'] = 'no'
|
||||||
@ -141,7 +143,6 @@ capabilities.textDocument.publishDiagnostics={
|
|||||||
layeredDiagnostics=true
|
layeredDiagnostics=true
|
||||||
}
|
}
|
||||||
|
|
||||||
lsp_status.register_progress()
|
|
||||||
capabilities = vim.tbl_extend('keep', capabilities or {}, lsp_status.capabilities)
|
capabilities = vim.tbl_extend('keep', capabilities or {}, lsp_status.capabilities)
|
||||||
|
|
||||||
local runtime_path = vim.split(package.path, ";")
|
local runtime_path = vim.split(package.path, ";")
|
||||||
@ -186,6 +187,7 @@ if use_google() then
|
|||||||
})
|
})
|
||||||
lspconfig.analysislsp.setup({
|
lspconfig.analysislsp.setup({
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
|
on_attach = on_attach,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ local function isCiderLspAttached()
|
|||||||
if vim.b['is_cider_lsp_attached'] == 'yes' then
|
if vim.b['is_cider_lsp_attached'] == 'yes' then
|
||||||
return '✓'
|
return '✓'
|
||||||
else
|
else
|
||||||
return 'LSP..'
|
return 'x'
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
return ''
|
return ''
|
||||||
@ -41,6 +41,8 @@ local function getLGTMs()
|
|||||||
return "LGTM:"..table.concat(lgtm, ",").." Approval:"..table.concat(appr, ",")
|
return "LGTM:"..table.concat(lgtm, ",").." Approval:"..table.concat(appr, ",")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local lsp_status = require('lsp-status')
|
||||||
|
|
||||||
require('lualine').setup {
|
require('lualine').setup {
|
||||||
options = {
|
options = {
|
||||||
theme = 'auto',
|
theme = 'auto',
|
||||||
@ -53,8 +55,8 @@ require('lualine').setup {
|
|||||||
},
|
},
|
||||||
sections = {
|
sections = {
|
||||||
lualine_a = {'mode'},
|
lualine_a = {'mode'},
|
||||||
lualine_b = {'branch', 'diff', getCitc, isCiderLspAttached, 'lsp_progress'},
|
lualine_b = {'branch', 'diff', getCitc, isCiderLspAttached},
|
||||||
lualine_c = {'filename', getLightbulb},
|
lualine_c = {getLightbulb, 'filename'},
|
||||||
lualine_x = {
|
lualine_x = {
|
||||||
{ 'diagnostics', sources = {"nvim_lsp"}, symbols = {error = ' ', warn = ' ', info = ' ', hint = ' '} },
|
{ 'diagnostics', sources = {"nvim_lsp"}, symbols = {error = ' ', warn = ' ', info = ' ', hint = ' '} },
|
||||||
'encoding',
|
'encoding',
|
||||||
|
Reference in New Issue
Block a user