From 488527b6bb21b95ebd49b3db033a93eb4b388500 Mon Sep 17 00:00:00 2001 From: talksik Date: Wed, 20 Mar 2024 12:08:53 -0700 Subject: [PATCH] setting up lualine --- init.lua | 23 +++++++----------- lua/custom/plugins/init.lua | 47 +++++++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+), 15 deletions(-) diff --git a/init.lua b/init.lua index 3068daa..20b710e 100644 --- a/init.lua +++ b/init.lua @@ -516,6 +516,9 @@ require('lazy').setup({ -- For example, in C this would take you to the header. map('gD', vim.lsp.buf.declaration, '[G]oto [D]eclaration') + map('lg', vim.diagnostic.open_float, 'Open diagnostics') + map('lf', vim.lsp.buf.format, '[L]sp [F]ormat') + -- The following two autocommands are used to highlight references of the -- word under your cursor when your cursor rests there for a little while. -- See `:help CursorHold` for information about when this is executed @@ -553,6 +556,11 @@ require('lazy').setup({ -- - settings (table): Override the default settings passed when initializing the server. -- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/ local servers = { + -- FIXME: + -- qmlls = { + -- cmd = { '/home/talksik/Qt/6.6.1/gcc_64/bin/qmlls' }, + -- filetypes = { 'qml' }, + -- }, clangd = { cmd = { '/home/talksik/Qt/Tools/QtCreator/libexec/qtcreator/clang/bin/clangd', @@ -789,21 +797,6 @@ require('lazy').setup({ -- - sr)' - [S]urround [R]eplace [)] ['] require('mini.surround').setup() - -- Simple and easy statusline. - -- You could remove this setup call if you don't like it, - -- and try some other statusline plugin - local statusline = require 'mini.statusline' - -- set use_icons to true if you have a Nerd Font - statusline.setup { use_icons = vim.g.have_nerd_font } - - -- You can configure sections in the statusline by overriding their - -- default behavior. For example, here we set the section for - -- cursor location to LINE:COLUMN - ---@diagnostic disable-next-line: duplicate-set-field - statusline.section_location = function() - return '%2l:%-2v' - end - -- ... and there is more! -- Check out: https://github.com/echasnovski/mini.nvim end, diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index 7a2547a..54bb7bb 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -37,4 +37,51 @@ return { vim.api.nvim_set_keymap('n', 'zz', 'ZenMode', { noremap = true, silent = true }) end, }, + + { + 'nvim-lualine/lualine.nvim', + config = function() + require('lualine').setup { + options = { + icons_enabled = true, + theme = 'solarized', + }, + sections = { + lualine_a = { + { + 'mode', + }, + }, + lualine_b = { + { + 'filename', + path = 4, + }, + }, + lualine_c = { + { + 'diff', + }, + { + 'diagnostics', + }, + }, + -- lualine_x = { + -- }, + -- lualine_y = { + -- }, + lualine_z = { + { + 'datetime', + -- options: default, us, uk, iso, or your own format string ("%H:%M", etc..) + style = '%H:%M:%S', + }, + { + 'filesize', + }, + }, + }, + } + end, + }, }