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 ~/.config/shell/profile ]] && . ~/.config/shell/profile
[[ -f ~/.bashrc ]] && . ~/.bashrc [[ -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!!! #THIS MUST BE AT THE END OF THE FILE FOR SDKMAN TO WORK!!!
export SDKMAN_DIR="$HOME/.sdkman" export SDKMAN_DIR="$HOME/.sdkman"
[[ -s "$HOME/.sdkman/bin/sdkman-init.sh" ]] && source "$HOME/.sdkman/bin/sdkman-init.sh" [[ -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 { return {
{ -- {
"goolord/alpha-nvim", -- "goolord/alpha-nvim",
event = "VimEnter", -- event = "VimEnter",
config = function() -- config = function()
local dashboard = require("alpha.themes.dashboard") -- local dashboard = require("alpha.themes.dashboard")
--
local function button(sc, txt, key, key_opts) -- local function button(sc, txt, key, key_opts)
local b = dashboard.button(sc, txt, key, key_opts) -- local b = dashboard.button(sc, txt, key, key_opts)
b.opts.hl_shortcut = "Macro" -- b.opts.hl_shortcut = "Macro"
return b -- return b
end -- end
--
local icons = require("lazyvim.config.icons") -- local icons = require("lazyvim.config.icons")
--
dashboard.section.header.val = { -- dashboard.section.header.val = {
[[ , __ ___ __. _ __ ` , _ , _ ]], -- [[ , __ ___ __. _ __ ` , _ , _ ]],
[[ |' `. .' ` .' \ | / | |' `|' `.]], -- [[ |' `. .' ` .' \ | / | |' `|' `.]],
[[ | | |----' | | ` / | | | |]], -- [[ | | |----' | | ` / | | | |]],
[[ / | `.___, `._.' \/ / / ' /]], -- [[ / | `.___, `._.' \/ / / ' /]],
} -- }
--
dashboard.section.buttons.val = { -- dashboard.section.buttons.val = {
button("f", icons.documents.Files .. " Find file", ":Telescope find_files <CR>"), -- button("f", icons.documents.Files .. " Find file", ":Telescope find_files <CR>"),
button("e", icons.ui.NewFile .. " New file", ":ene <BAR> startinsert <CR>"), -- button("e", icons.ui.NewFile .. " New file", ":ene <BAR> startinsert <CR>"),
button("r", icons.ui.History .. " Recent files", ":Telescope oldfiles <CR>"), -- button("r", icons.ui.History .. " Recent files", ":Telescope oldfiles <CR>"),
button("t", icons.ui.List .. " Find text", ":Telescope live_grep <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("c", icons.ui.Gear .. " Config", ":e ~/.config/nvim/init.lua <CR>"),
button("u", icons.ui.CloudDownload .. " Update", ":Lazy<CR>"), -- button("u", icons.ui.CloudDownload .. " Update", ":Lazy<CR>"),
button("q", icons.ui.SignOut .. " Quit", ":qa<CR>"), -- button("q", icons.ui.SignOut .. " Quit", ":qa<CR>"),
} -- }
--
dashboard.section.footer.val = { -- dashboard.section.footer.val = {
[[┬┌┐┌┬┌─┬ ┌─┐┌┬┐┌┐ ┬ ┌─┐┌┬┐┌─┐┌─┐┌┬┐]], -- [[┬┌┐┌┬┌─┬ ┌─┐┌┬┐┌┐ ┬ ┌─┐┌┬┐┌─┐┌─┐┌┬┐]],
[[││││├┴┐│ ├┤ │ ├┴┐│ │ │ │ │ │ ││││]], -- [[││││├┴┐│ ├┤ │ ├┴┐│ │ │ │ │ │ ││││]],
[[┴┘└┘┴ ┴┴─┘└─┘ ┴ └─┘┴─┘└─┘ ┴o└─┘└─┘┴ ┴]], -- [[┴┘└┘┴ ┴┴─┘└─┘ ┴ └─┘┴─┘└─┘ ┴o└─┘└─┘┴ ┴]],
} -- }
--
dashboard.section.header.opts.hl = "Include" -- dashboard.section.header.opts.hl = "Include"
dashboard.section.buttons.opts.hl = "Macro" -- dashboard.section.buttons.opts.hl = "Macro"
dashboard.section.footer.opts.hl = "Type" -- dashboard.section.footer.opts.hl = "Type"
--
dashboard.opts.opts.noautocmd = true -- dashboard.opts.opts.noautocmd = true
--
require("alpha").setup(dashboard.opts) -- require("alpha").setup(dashboard.opts)
end, -- end,
}, -- },
} }

View File

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

View File

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

View File

@ -14,7 +14,7 @@ return {
-- options for vim.diagnostic.config() -- options for vim.diagnostic.config()
diagnostics = { diagnostics = {
underline = true, underline = true,
update_in_insert = false, update_in_insert = true,
virtual_text = { spacing = 4, prefix = "" }, virtual_text = { spacing = 4, prefix = "" },
severity_sort = true, severity_sort = true,
}, },
@ -40,6 +40,17 @@ return {
}, },
}, },
}, },
rust_analyzer = {
capabilities = capabilities,
on_attach = on_attach,
cmd = {
"rustup",
"run",
"stable",
"rust-analyzer",
},
},
}, },
setup = { setup = {
-- additional setup can be added here. -- additional setup can be added here.
@ -183,4 +194,18 @@ return {
end end
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", event = "VeryLazy",
opts = { opts = {
lsp = { lsp = {
progress = {
enabled = true,
},
hover = {
enabled = true,
},
signature = {
enabled = true,
},
message = {
enabled = true,
},
override = { override = {
["vim.lsp.util.convert_input_to_markdown_lines"] = true, ["vim.lsp.util.convert_input_to_markdown_lines"] = true,
["vim.lsp.util.stylize_markdown"] = true, ["vim.lsp.util.stylize_markdown"] = true,
}, },
}, },
cmdline = {
enabled = false,
},
messages = {
enabled = false,
},
popupmenu = {
enabled = true,
},
notify = {
enabled = false,
},
smart_move = {
enabled = true,
},
presets = { presets = {
bottom_search = true, bottom_search = false,
command_palette = true, command_palette = false,
long_message_to_split = true, long_message_to_split = false,
inc_rename = false,
lsp_doc_border = false,
}, },
}, },
-- stylua: ignore -- stylua: ignore

View File

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

View File

@ -92,18 +92,6 @@ return {
f = { f = {
name = "+file", name = "+file",
n = { "<cmd>enew<cr>", "New 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 = { q = {