Add j-hui/fidget.nvim & other configs

This commit is contained in:
Andy Teijelo 2022-10-20 01:06:20 -04:00
parent 4f9c92f38a
commit e347c1f5c7
7 changed files with 16 additions and 12 deletions

View file

@ -24,5 +24,5 @@ require "user.lsp"
--require "user.dap" --require "user.dap"
require "user.exrc" require "user.exrc"
--require "user.rust-tools"
require "user.vimspector" require "user.vimspector"
require "user.fidget"

6
lua/user/fidget.lua Normal file
View file

@ -0,0 +1,6 @@
local ok, fidget = pcall(require, "fidget")
if not ok then
return
end
fidget.setup()

View file

@ -97,11 +97,3 @@ keymap("n", "<F23>", "<Plug>VimspectorStepOut", opts)
keymap("n", "<F17>", "<cmd>VimspectorReset<cr>", opts) -- Shift+F5 keymap("n", "<F17>", "<cmd>VimspectorReset<cr>", opts) -- Shift+F5
keymap("n", "<F41>", "<Plug>VimspectorRestart", opts) -- Ctrl+Shift+F5 keymap("n", "<F41>", "<Plug>VimspectorRestart", opts) -- Ctrl+Shift+F5
keymap("n", "<leader>di", "<Plug>VimspectorBalloonEval", opts) keymap("n", "<leader>di", "<Plug>VimspectorBalloonEval", opts)
--keymap("n", "<leader>dl", "<cmd>lua require'dap'.run_last()<cr>", opts)
--keymap("n", "<leader>du", "<cmd>lua require'dapui'.toggle()<cr>", opts)
--keymap("n", "<F17>", "<cmd>lua require'dap'.terminate()<cr>", opts)
keymap("n", "<leader>lf", vim.lsp.buf.format, opts) -- Shift+F5
keymap("v", "<leader>lf", "<esc><cmd>'<,'>lua vim.lsp.buf.format()<cr>", opts) -- Shift+F5
keymap("x", "<leader>lf", "<esc><cmd>'<,'>lua vim.lsp.buf.format()<cr>", opts) -- Shift+F5

View file

@ -60,7 +60,11 @@ local function lsp_keymaps(bufnr)
keymap(bufnr, "n", "gI", "<cmd>lua vim.lsp.buf.implementation()<CR>", opts) keymap(bufnr, "n", "gI", "<cmd>lua vim.lsp.buf.implementation()<CR>", opts)
keymap(bufnr, "n", "gr", "<cmd>lua vim.lsp.buf.references()<CR>", opts) keymap(bufnr, "n", "gr", "<cmd>lua vim.lsp.buf.references()<CR>", opts)
keymap(bufnr, "n", "gl", "<cmd>lua vim.diagnostic.open_float()<CR>", opts) keymap(bufnr, "n", "gl", "<cmd>lua vim.diagnostic.open_float()<CR>", opts)
keymap(bufnr, "n", "<leader>lf", "<cmd>lua vim.lsp.buf.format{ async = true }<cr>", opts) keymap(bufnr, "n", "<leader>lf", "<cmd>lua vim.lsp.buf.format{ async = true }<cr>", opts)
keymap(bufnr, "v", "<leader>lf", "<esc><cmd>'<,'>lua vim.lsp.buf.format()<cr>", opts)
keymap(bufnr, "x", "<leader>lf", "<esc><cmd>'<,'>lua vim.lsp.buf.format()<cr>", opts)
keymap(bufnr, "n", "<leader>li", "<cmd>LspInfo<cr>", opts) keymap(bufnr, "n", "<leader>li", "<cmd>LspInfo<cr>", opts)
keymap(bufnr, "n", "<leader>lI", "<cmd>LspInstallInfo<cr>", opts) keymap(bufnr, "n", "<leader>lI", "<cmd>LspInstallInfo<cr>", opts)
keymap(bufnr, "n", "<leader>la", "<cmd>lua vim.lsp.buf.code_action()<cr>", opts) keymap(bufnr, "n", "<leader>la", "<cmd>lua vim.lsp.buf.code_action()<cr>", opts)

View file

@ -3,6 +3,6 @@ if not status_ok then
return return
end end
require "user.lsp.mason" require("user.lsp.mason")
require("user.lsp.handlers").setup() require("user.lsp.handlers").setup()
require "user.lsp.null-ls" require("user.lsp.null-ls")

View file

@ -27,7 +27,7 @@ local settings = {
require("mason").setup(settings) require("mason").setup(settings)
require("mason-lspconfig").setup({ require("mason-lspconfig").setup({
ensure_installed = servers, ensure_installed = servers,
automatic_installation = true, automatic_installation = false,
}) })
local lspconfig_status_ok, lspconfig = pcall(require, "lspconfig") local lspconfig_status_ok, lspconfig = pcall(require, "lspconfig")

View file

@ -112,6 +112,8 @@ return packer.startup(function(use)
-- VimSpector -- VimSpector
use { "puremourning/vimspector" } use { "puremourning/vimspector" }
use { "j-hui/fidget.nvim", commit = "1097a86db8ba38e390850dc4035a03ed234a4673" }
-- Automatically set up your configuration after cloning packer.nvim -- Automatically set up your configuration after cloning packer.nvim
-- Put this at the end after all plugins -- Put this at the end after all plugins
if PACKER_BOOTSTRAP then if PACKER_BOOTSTRAP then