From 80befc33f846277e1ab4ecc7791c3141328c725b Mon Sep 17 00:00:00 2001 From: Patrick Auernig Date: Tue, 9 May 2023 12:15:38 +0200 Subject: [PATCH] Add some mor plugins Namingly lualine, cloak, and overseer --- after/plugin/lsp.lua | 8 ++++++ after/plugin/tasks.lua | 1 + lua/valeth/init.lua | 3 +- lua/valeth/packer.lua | 64 ++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 75 insertions(+), 1 deletion(-) create mode 100644 after/plugin/tasks.lua diff --git a/after/plugin/lsp.lua b/after/plugin/lsp.lua index 75e013e..637afcd 100644 --- a/after/plugin/lsp.lua +++ b/after/plugin/lsp.lua @@ -19,6 +19,10 @@ local cmp_mapping = lsp.defaults.cmp_mappings({ lsp.setup_nvim_cmp({ mapping = cmp_mapping }) +vim.diagnostic.config({ + virtual_text = false, +}) + -- Gimme pretty icons lsp.set_sign_icons({ error = '✘', @@ -49,4 +53,8 @@ lsp.format_on_save({ } }) + + lsp.setup() + +require("lsp-inlayhints").setup() diff --git a/after/plugin/tasks.lua b/after/plugin/tasks.lua new file mode 100644 index 0000000..7fafa35 --- /dev/null +++ b/after/plugin/tasks.lua @@ -0,0 +1 @@ +local overseer = require("overseer") diff --git a/lua/valeth/init.lua b/lua/valeth/init.lua index e933b8d..ef0b4e7 100644 --- a/lua/valeth/init.lua +++ b/lua/valeth/init.lua @@ -1,4 +1,5 @@ vim.opt.number = true +vim.opt.relativenumber = true vim.opt.expandtab = true vim.opt.shiftwidth = 4 vim.opt.smartindent = true @@ -9,7 +10,7 @@ vim.opt.scrolloff = 8 vim.opt.signcolumn = "yes" vim.opt.colorcolumn = "100" -vim.g.mapleader = "," +vim.g.mapleader = " " vim.keymap.set("n", "", "noh") vim.keymap.set("n", "U", "redo") diff --git a/lua/valeth/packer.lua b/lua/valeth/packer.lua index f392cf6..4aaa1db 100644 --- a/lua/valeth/packer.lua +++ b/lua/valeth/packer.lua @@ -76,6 +76,9 @@ local function spec(use) use "mhartington/formatter.nvim" + -- Doesn't seem to work properly atm + use "lvimuser/lsp-inlayhints.nvim" + ---- Just Visual Stuff @@ -96,6 +99,60 @@ local function spec(use) end } + use { + "nvim-lualine/lualine.nvim", + requires = { + { "nvim-tree/nvim-web-devicons" } + }, + config = function() + local overseer = require("overseer") + local task_status = { + "overseer", + colored = true, + symbols = { + [overseer.STATUS.FAILURE] = "✗ ", + [overseer.STATUS.CANCELED] = "o", + [overseer.STATUS.SUCCESS] = "✓ ", + [overseer.STATUS.RUNNING] = "⟳ ", + }, + } + + require("lualine").setup({ + sections = { + lualine_x = { + task_status, + "encoding", + { "fileformat", icons_enabled = false }, + "filetype" + } + }, + }) + end + } + + use { + "lukas-reineke/indent-blankline.nvim", + config = function() + require("indent_blankline").setup { + space_char_blankline = " ", + show_current_context = true, + show_current_context_start = false, + } + end + } + + use { + "laytan/cloak.nvim", + config = function() + require("cloak").setup({ + cloak_length = 5, + patterns = { + { file_pattern = "*.env*", cloak_pattern = "=.+" } + } + }) + end + } + ---- Shortcuts @@ -160,6 +217,13 @@ local function spec(use) { "nvim-tree/nvim-web-devicons" }, } } + + use { + "stevearc/overseer.nvim", + config = function() + require('overseer').setup() + end + } end