summaryrefslogtreecommitdiff
path: root/lua
diff options
context:
space:
mode:
authorJosh Rahm <rahm@google.com>2024-03-27 00:22:31 +0000
committerJosh Rahm <rahm@google.com>2024-03-27 00:22:31 +0000
commit715e1be7dca3b6dd7a337e53b35502e5d1472e0f (patch)
tree8f11f92583c3736dad6200f31058315fde14f99b /lua
parent998742b3ba0742f724b938bb3a95170616f862da (diff)
downloadconfig.vim-715e1be7dca3b6dd7a337e53b35502e5d1472e0f.tar.gz
config.vim-715e1be7dca3b6dd7a337e53b35502e5d1472e0f.tar.bz2
config.vim-715e1be7dca3b6dd7a337e53b35502e5d1472e0f.zip
More ricing. Primarily with Lualine.
Diffstat (limited to 'lua')
-rw-r--r--lua/lsp.lua11
-rw-r--r--lua/lualinesetup.lua42
2 files changed, 48 insertions, 5 deletions
diff --git a/lua/lsp.lua b/lua/lsp.lua
index 9332795..4c0fb66 100644
--- a/lua/lsp.lua
+++ b/lua/lsp.lua
@@ -2,15 +2,16 @@ local vim = assert(vim)
local nvim_lsp = require("lspconfig")
-nvim_lsp.perlpls.setup {}
-nvim_lsp.lua_ls.setup {}
-nvim_lsp.clangd.setup {}
nvim_lsp.bashls.setup {}
+nvim_lsp.clangd.setup {}
+nvim_lsp.jqls.setup {}
+nvim_lsp.lua_ls.setup {}
+nvim_lsp.ocamllsp.setup {}
+nvim_lsp.perlpls.setup {}
nvim_lsp.rust_analyzer.setup {}
+nvim_lsp.verible.setup {}
nvim_lsp.vimls.setup {}
nvim_lsp.zls.setup {}
-nvim_lsp.ocamllsp.setup {}
-nvim_lsp.verible.setup {}
nvim_lsp.hls.setup {
settings = {
haskell = {
diff --git a/lua/lualinesetup.lua b/lua/lualinesetup.lua
new file mode 100644
index 0000000..16e0cce
--- /dev/null
+++ b/lua/lualinesetup.lua
@@ -0,0 +1,42 @@
+local vim = assert(vim)
+
+-- LSP clients attached to buffer
+local clients_lsp = function()
+ local bufnr = vim.api.nvim_get_current_buf()
+
+ local clients = vim.lsp.buf_get_clients(bufnr)
+ if next(clients) == nil then
+ return ''
+ end
+
+ local c = {}
+ for _, client in pairs(clients) do
+ table.insert(c, client.name)
+ end
+ return '\u{f085} ' .. table.concat(c, ',')
+end
+
+local config = {
+ options = {
+ theme = 'meltdown',
+ component_separators = '‣', -- '┃'
+ section_separators = '',
+ },
+ sections = {
+ lualine_a = { 'mode' },
+ lualine_b = { 'branch', 'diff', 'diagnostics' },
+ lualine_c = { 'filename' },
+
+ -- right
+ lualine_x = {
+ { clients_lsp, color = { fg = '#80a0ff' } },
+ { 'encoding', color = { fg = '#80a0ff' } },
+ { 'fileformat', color = { fg = '#ffb700' } },
+ { 'filetype', color = { fg = '#80a0ff' } },
+ },
+ lualine_y = { 'progress' },
+ lualine_z = { 'location' }
+ },
+}
+
+require("lualine").setup(config)