updates to nvim, mainly lsp and plugin removal

This commit is contained in:
Solomon Laing 2023-10-20 20:00:22 +10:30
parent f314f8f8a9
commit 89ab8c246f
9 changed files with 175 additions and 129 deletions

View File

@ -5,3 +5,4 @@
[[ -f ~/.config/shell/profile ]] && . ~/.config/shell/profile
[[ -f ~/.bashrc ]] && . ~/.bashrc
. "/home/solomon/.local/share/cargo/env"

View File

@ -101,3 +101,4 @@ PROMPT_COMMAND=set_prompt
#THIS MUST BE AT THE END OF THE FILE FOR SDKMAN TO WORK!!!
export SDKMAN_DIR="$HOME/.sdkman"
[[ -s "$HOME/.sdkman/bin/sdkman-init.sh" ]] && source "$HOME/.sdkman/bin/sdkman-init.sh"
. "/home/solomon/.local/share/cargo/env"

View File

@ -1,48 +1,48 @@
return {
{
"goolord/alpha-nvim",
event = "VimEnter",
config = function()
local dashboard = require("alpha.themes.dashboard")
local function button(sc, txt, key, key_opts)
local b = dashboard.button(sc, txt, key, key_opts)
b.opts.hl_shortcut = "Macro"
return b
end
local icons = require("lazyvim.config.icons")
dashboard.section.header.val = {
[[ , __ ___ __. _ __ ` , _ , _ ]],
[[ |' `. .' ` .' \ | / | |' `|' `.]],
[[ | | |----' | | ` / | | | |]],
[[ / | `.___, `._.' \/ / / ' /]],
}
dashboard.section.buttons.val = {
button("f", icons.documents.Files .. " Find file", ":Telescope find_files <CR>"),
button("e", icons.ui.NewFile .. " New file", ":ene <BAR> startinsert <CR>"),
button("r", icons.ui.History .. " Recent files", ":Telescope oldfiles <CR>"),
button("t", icons.ui.List .. " Find text", ":Telescope live_grep <CR>"),
button("c", icons.ui.Gear .. " Config", ":e ~/.config/nvim/init.lua <CR>"),
button("u", icons.ui.CloudDownload .. " Update", ":Lazy<CR>"),
button("q", icons.ui.SignOut .. " Quit", ":qa<CR>"),
}
dashboard.section.footer.val = {
[[┬┌┐┌┬┌─┬ ┌─┐┌┬┐┌┐ ┬ ┌─┐┌┬┐┌─┐┌─┐┌┬┐]],
[[││││├┴┐│ ├┤ │ ├┴┐│ │ │ │ │ │ ││││]],
[[┴┘└┘┴ ┴┴─┘└─┘ ┴ └─┘┴─┘└─┘ ┴o└─┘└─┘┴ ┴]],
}
dashboard.section.header.opts.hl = "Include"
dashboard.section.buttons.opts.hl = "Macro"
dashboard.section.footer.opts.hl = "Type"
dashboard.opts.opts.noautocmd = true
require("alpha").setup(dashboard.opts)
end,
},
-- {
-- "goolord/alpha-nvim",
-- event = "VimEnter",
-- config = function()
-- local dashboard = require("alpha.themes.dashboard")
--
-- local function button(sc, txt, key, key_opts)
-- local b = dashboard.button(sc, txt, key, key_opts)
-- b.opts.hl_shortcut = "Macro"
-- return b
-- end
--
-- local icons = require("lazyvim.config.icons")
--
-- dashboard.section.header.val = {
-- [[ , __ ___ __. _ __ ` , _ , _ ]],
-- [[ |' `. .' ` .' \ | / | |' `|' `.]],
-- [[ | | |----' | | ` / | | | |]],
-- [[ / | `.___, `._.' \/ / / ' /]],
-- }
--
-- dashboard.section.buttons.val = {
-- button("f", icons.documents.Files .. " Find file", ":Telescope find_files <CR>"),
-- button("e", icons.ui.NewFile .. " New file", ":ene <BAR> startinsert <CR>"),
-- button("r", icons.ui.History .. " Recent files", ":Telescope oldfiles <CR>"),
-- button("t", icons.ui.List .. " Find text", ":Telescope live_grep <CR>"),
-- button("c", icons.ui.Gear .. " Config", ":e ~/.config/nvim/init.lua <CR>"),
-- button("u", icons.ui.CloudDownload .. " Update", ":Lazy<CR>"),
-- button("q", icons.ui.SignOut .. " Quit", ":qa<CR>"),
-- }
--
-- dashboard.section.footer.val = {
-- [[┬┌┐┌┬┌─┬ ┌─┐┌┬┐┌┐ ┬ ┌─┐┌┬┐┌─┐┌─┐┌┬┐]],
-- [[││││├┴┐│ ├┤ │ ├┴┐│ │ │ │ │ │ ││││]],
-- [[┴┘└┘┴ ┴┴─┘└─┘ ┴ └─┘┴─┘└─┘ ┴o└─┘└─┘┴ ┴]],
-- }
--
-- dashboard.section.header.opts.hl = "Include"
-- dashboard.section.buttons.opts.hl = "Macro"
-- dashboard.section.footer.opts.hl = "Type"
--
-- dashboard.opts.opts.noautocmd = true
--
-- require("alpha").setup(dashboard.opts)
-- end,
-- },
}

View File

@ -6,6 +6,7 @@ return {
"hrsh7th/cmp-nvim-lsp",
"hrsh7th/cmp-buffer",
"hrsh7th/cmp-path",
"hrsh7th/cmp-cmdline",
"hrsh7th/cmp-emoji",
"saadparwaiz1/cmp_luasnip",
},
@ -34,6 +35,7 @@ return {
{ name = "luasnip" },
{ name = "buffer" },
{ name = "path" },
{ name = "cmdline" },
{ name = "emoji" },
}),
formatting = {

View File

@ -4,12 +4,12 @@ return {
event = "BufReadPre",
opts = {
signs = {
add = { text = "" },
change = { text = "" },
delete = { text = "" },
topdelete = { text = "" },
changedelete = { text = "" },
untracked = { text = "" },
add = { text = "a" },
change = { text = "c" },
delete = { text = "d" },
topdelete = { text = "td" },
changedelete = { text = "cd" },
untracked = { text = "u" },
},
on_attach = function(buffer)
local gs = package.loaded.gitsigns

View File

@ -14,7 +14,7 @@ return {
-- options for vim.diagnostic.config()
diagnostics = {
underline = true,
update_in_insert = false,
update_in_insert = true,
virtual_text = { spacing = 4, prefix = "" },
severity_sort = true,
},
@ -40,6 +40,17 @@ return {
},
},
},
rust_analyzer = {
capabilities = capabilities,
on_attach = on_attach,
cmd = {
"rustup",
"run",
"stable",
"rust-analyzer",
},
},
},
setup = {
-- additional setup can be added here.
@ -183,4 +194,18 @@ return {
end
end,
},
{
"simrat39/rust-tools.nvim",
opts = {
server = {
on_attach = function(_, bufnr)
local rt = require("rust-tools")
-- Hover actions
vim.keymap.set("n", "<C-space>", rt.hover_actions.hover_actions, { buffer = bufnr })
-- Code action groups
vim.keymap.set("n", "<Leader>a", rt.code_action_group.code_action_group, { buffer = bufnr })
end,
},
},
},
}

View File

@ -4,15 +4,44 @@ return {
event = "VeryLazy",
opts = {
lsp = {
progress = {
enabled = true,
},
hover = {
enabled = true,
},
signature = {
enabled = true,
},
message = {
enabled = true,
},
override = {
["vim.lsp.util.convert_input_to_markdown_lines"] = true,
["vim.lsp.util.stylize_markdown"] = true,
},
},
cmdline = {
enabled = false,
},
messages = {
enabled = false,
},
popupmenu = {
enabled = true,
},
notify = {
enabled = false,
},
smart_move = {
enabled = true,
},
presets = {
bottom_search = true,
command_palette = true,
long_message_to_split = true,
bottom_search = false,
command_palette = false,
long_message_to_split = false,
inc_rename = false,
lsp_doc_border = false,
},
},
-- stylua: ignore

View File

@ -22,35 +22,35 @@ return {
{
"folke/neodev.nvim",
},
{
"rcarriga/nvim-notify",
opts = {
-- Animation style (see below for details)
stages = "static",
-- Render function for notifications. See notify-render()
render = "default",
-- Default timeout for notifications
timeout = 2000,
-- For stages that change opacity this is treated as the highlight behind the window
-- Set this to either a highlight group or an RGB hex value e.g. "#000000"
background_colour = "Normal",
-- Minimum width for notification windows
minimum_width = 10,
-- Icons for the different levels
icons = {
ERROR = icons.diagnostics.Error,
WARN = icons.diagnostics.Warning,
INFO = icons.diagnostics.Information,
DEBUG = icons.ui.Bug,
TRACE = icons.ui.Pencil,
},
},
},
-- {
-- "rcarriga/nvim-notify",
-- opts = {
-- -- Animation style (see below for details)
-- stages = "static",
--
-- -- Render function for notifications. See notify-render()
-- render = "default",
--
-- -- Default timeout for notifications
-- timeout = 2000,
--
-- -- For stages that change opacity this is treated as the highlight behind the window
-- -- Set this to either a highlight group or an RGB hex value e.g. "#000000"
-- background_colour = "Normal",
--
-- -- Minimum width for notification windows
-- minimum_width = 10,
--
-- -- Icons for the different levels
-- icons = {
-- ERROR = icons.diagnostics.Error,
-- WARN = icons.diagnostics.Warning,
-- INFO = icons.diagnostics.Information,
-- DEBUG = icons.ui.Bug,
-- TRACE = icons.ui.Pencil,
-- },
-- },
-- },
{
"echasnovski/mini.bufremove",
event = "VeryLazy",
@ -60,38 +60,38 @@ return {
{ "<leader>bD", function() require("mini.bufremove").delete(0, true) end, desc = "Delete Buffer (Force)" },
},
},
{
"ghillb/cybu.nvim",
event = "VeryLazy",
keys = {
{ "<leader>bl", "<cmd>CybuNext<cr>", desc = "Next Buffer" },
{ "<leader>bh", "<cmd>CybuPrev<cr>", desc = "Prev Buffer" },
},
opts = {
position = {
relative_to = "win", -- win, editor, cursor
anchor = "topright", -- topleft, topcenter, topright,
-- centerleft, center, centerright,
-- bottomleft, bottomcenter, bottomright
-- vertical_offset = 10, -- vertical offset from anchor in lines
-- horizontal_offset = 0, -- vertical offset from anchor in columns
-- max_win_height = 5, -- height of cybu window in lines
-- max_win_width = 0.5, -- integer for absolute in columns
-- float for relative to win/editor width
},
display_time = 1750, -- time the cybu window is displayed
style = {
separator = " ", -- string used as separator
prefix = "", -- string used as prefix for truncated paths
padding = 1, -- left & right padding in number of spaces
hide_buffer_id = true,
devicons = {
enabled = true, -- enable or disable web dev icons
colored = true, -- enable color for web dev icons
},
},
},
},
-- {
-- "ghillb/cybu.nvim",
-- event = "VeryLazy",
-- keys = {
-- { "<leader>bl", "<cmd>CybuNext<cr>", desc = "Next Buffer" },
-- { "<leader>bh", "<cmd>CybuPrev<cr>", desc = "Prev Buffer" },
-- },
-- opts = {
-- position = {
-- relative_to = "win", -- win, editor, cursor
-- anchor = "topright", -- topleft, topcenter, topright,
-- -- centerleft, center, centerright,
-- -- bottomleft, bottomcenter, bottomright
-- -- vertical_offset = 10, -- vertical offset from anchor in lines
-- -- horizontal_offset = 0, -- vertical offset from anchor in columns
-- -- max_win_height = 5, -- height of cybu window in lines
-- -- max_win_width = 0.5, -- integer for absolute in columns
-- -- float for relative to win/editor width
-- },
-- display_time = 1750, -- time the cybu window is displayed
-- style = {
-- separator = " ", -- string used as separator
-- prefix = "…", -- string used as prefix for truncated paths
-- padding = 1, -- left & right padding in number of spaces
-- hide_buffer_id = true,
-- devicons = {
-- enabled = true, -- enable or disable web dev icons
-- colored = true, -- enable color for web dev icons
-- },
-- },
-- },
-- },
{
"mbbill/undotree",
cmd = { "UndotreeToggle" },

View File

@ -92,18 +92,6 @@ return {
f = {
name = "+file",
n = { "<cmd>enew<cr>", "New File" },
t = {
function()
utils.float_term(nil, { cwd = utils.get_root() })
end,
"Terminal (rood dir)",
},
T = {
function()
utils.float_term()
end,
"Terminal (cwd)",
},
},
q = {