remove noice, it is not nice... | remove rustacean, just use rust_analyzer by itself it is fine as is | add fidget for lsp progress

This commit is contained in:
RingOfStorms (Josh) 2024-05-20 01:40:45 -05:00
parent 77248911bc
commit d822cd7b6d
9 changed files with 60 additions and 110 deletions

View file

@ -18,8 +18,7 @@ vim.opt.timeoutlen = 300
-- line numbering, relative
vim.opt.number = true
vim.wo.number = true
vim.wo.relativenumber = true
vim.opt.relativenumber = true
-- Highlights the results of previous search, which is annoying when we are done searching
vim.opt.hlsearch = false
@ -69,9 +68,9 @@ vim.opt.splitbelow = true
vim.opt.splitright = true
-- Set completeopt to have a better completion experience
vim.opt.completeopt = "menuone,noselect"
vim.opt.completeopt = "menu,menuone,noinsert,noselect"
vim.diagnostic.config({
float = { border = "single" },
float = { border = "single" },
})
-- Minimal number of screen lines to keep above and below the cursor.
@ -85,5 +84,3 @@ vim.opt.equalalways = false
-- enable colors for opacity changes
vim.opt.termguicolors = true

View file

@ -46,8 +46,7 @@ return {
luasnip.lsp_expand(args.body)
end,
},
completion = { completeopt = "menu,menuone,noinsert" },
completion = { completeopt = "menu,menuone,noinsert,noselect" },
mapping = cmp.mapping.preset.insert({
-- Scroll the documentation window [b]ack / [f]orward
["<C-u>"] = cmp.mapping.scroll_docs(-4),
@ -55,17 +54,20 @@ return {
["<esc>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.abort()
fallback()
if cmp.get_active_entry() == nil then
-- TODO this is still being weird... if I go into active entry then back up and press esc it causes havoc
fallback()
end
else
fallback()
end
end),
-- ["<esc>"] = cmp.mapping.abort(),
-- Select the [n]ext item
["<C-j>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_next_item()
-- elseif luasnip.expand_or_jumpable() then
elseif luasnip.expand_or_locally_jumpable() then
luasnip.expand_or_jump()
else
@ -83,7 +85,7 @@ return {
end
end, { "i", "s" }),
["<C-y>"] = cmp.mapping.confirm({ select = true }),
["<C-space>"] = cmp.mapping.complete({}),
["<C-c>"] = cmp.mapping.complete({}),
}),
sources = {
{
@ -107,21 +109,6 @@ return {
-- Rust crates.io integration
{ name = "crates" },
},
-- TODO revisit if I want these or not
-- sorting = {
-- priority_weight = 1,
-- comparators = {
-- cmp.config.compare.locality,
-- cmp.config.compare.recently_used,
-- cmp.config.compare.score,
-- cmp.config.compare.offset,
-- cmp.config.compare.order,
-- },
-- },
-- window = { -- also? https://github.com/RingOfStorms/nvim/blob/master/lua/plugins/lsp.lua#L330-L347
-- completion = cmp.config.window.bordered(),
-- documentation = cmp.config.window.bordered(),
-- },
})
end,
}

View file

@ -46,7 +46,7 @@ end
return {
"nvim-lualine/lualine.nvim",
dependencies = { { "folke/noice.nvim", optional = true } },
-- dependencies = { { "folke/noice.nvim", optional = true } },
lazy = false,
opts = function()
return {

View file

@ -1,55 +0,0 @@
return {
"folke/noice.nvim",
dependencies = {
"MunifTanjim/nui.nvim",
"rcarriga/nvim-notify",
{ "nvim-telescope/telescope.nvim", optional = true },
},
event = "VeryLazy",
opts = {
route = {
routes = {
{ filter = { event = "lsp" }, opts = { skip = true } },
-- { opts = { skip = true } },
},
},
-- cmdline = {
-- enabled = false,
-- },
-- popupmenu = {
-- enabled = false, -- enables the Noice popupmenu
-- },
-- notify = {
-- enabled = false,
-- },
-- smart_move = {
-- enabled = false,
-- },
messages = {
-- enabled = false,
view = "mini", -- default view for messages
view_error = "notify", -- view for errors
view_warn = "mini", -- view for warnings
view_history = "messages", -- view for :messages
view_search = false, -- view for search count messages. Set to `false` to disable
},
lsp = {
-- override markdown rendering so that **cmp** and other plugins use **Treesitter**
override = {
["vim.lsp.util.convert_input_to_markdown_lines"] = true,
["vim.lsp.util.stylize_markdown"] = true,
["cmp.entry.get_documentation"] = true, -- requires hrsh7th/nvim-cmp
},
-- I had an issue with auto_open kicking me out of insert mode when entering insert mode
signature = { enabled = false, auto_open = { trigger = false } },
-- hover = { enabled = false },
-- message = { enabled = false },
},
},
config = function(_, opts)
require("noice").setup(opts)
U.safeRequire("telescope", function(t)
t.load_extension("noice")
end)
end,
}

View file

@ -1,12 +1,25 @@
return {
"rcarriga/nvim-notify",
lazy = false,
priority = 150,
opts = {
top_down = false,
timeout = 5000,
},
config = function(_, opts)
require("notify").setup(opts)
end,
"rcarriga/nvim-notify",
lazy = false,
priority = 150,
opts = {
top_down = false,
timeout = 5000,
},
config = function(_, opts)
require("notify").setup(opts)
vim.notify = require("notify")
U.safeRequire("telescope", function(t)
t.load_extension("notify")
end)
end,
keys = {
{
"<leader>fn",
"<cmd>Telescope notify<cr>",
desc = "Telescope search notifications",
mode = { "n", "v", "x" },
},
},
}

View file

@ -0,0 +1,7 @@
return {
"j-hui/fidget.nvim",
event = "VeryLazy",
opts = {
},
main = "fidget",
}

View file

@ -1,7 +1,11 @@
return {
-- LSP helper plugins for various languages
{ "folke/neodev.nvim", event = { "BufRead *.lua", "BufRead *.vim" }, opts = {}, main = "neodev" },
{ "mrcjkb/rustaceanvim", lazy = false }, -- uses ftplugins to enable itself lazily already
-- { TODO come back to this, do I actually use any features provided here? I was losing out on rust-analyzer stuff when this was on and it was added below...
-- "mrcjkb/rustaceanvim",
-- -- uses ftplugins to enable itself lazily already
-- lazy = false,
-- },
-- TODO add some hotkeys for opening the popup menus on crates
{ "Saecki/crates.nvim", event = "BufRead Cargo.toml", tag = "stable", opts = {}, main = "crates" },
{
@ -106,9 +110,8 @@ return {
},
},
},
rust_analyzer = {},
nil_ls = {},
-- TODO probably remove V
v_analyzer = { filetypes = { "vlang", "v", "vsh", "vv" } },
tsserver = {
-- typescript/javascript
implicitProjectConfiguration = {