nvim-config/config.lua

87 lines
3.3 KiB
Lua

-- Read the docs: https://www.lunarvim.org/docs/configuration
-- Video Tutorials: https://www.youtube.com/watch?v=sFA9kX-Ud_c&list=PLhoH5vyxr6QqGu0i7tt_XoVK9v-KvZ3m6
-- Forum: https://www.reddit.com/r/lunarvim/
-- Discord: https://discord.com/invite/Xb9B4Ny
lvim.plugins = {
"mrjones2014/nvim-ts-rainbow",
-- "eandrju/cellular-automaton.nvim",
-- "nvim-treesitter/nvim-treesitter",
"alec-gibson/nvim-tetris",
{
"iamcco/markdown-preview.nvim",
build = "cd app && npm install",
ft = "markdown",
config = function()
vim.g.mkdp_auto_start = 1
end,
},
{
'wfxr/minimap.vim',
build = "cargo install --locked code-minimap",
cmd = {"Minimap", "MinimapClose", "MinimapToggle", "MinimapRefresh", "MinimapUpdateHighlight"},
config = function ()
vim.cmd ("let g:minimap_width = 10")
vim.cmd ("let g:minimap_auto_start = 1")
vim.cmd ("let g:minimap_auto_start_win_enter = 1")
vim.cmd ("let g:minimap_git_colors = 1")
end,
},
{
"simrat39/symbols-outline.nvim",
config = function()
require('symbols-outline').setup()
end
},
{
"Pocco81/auto-save.nvim",
config = function()
require("auto-save").setup()
end,
},
{
"tamton-aquib/duck.nvim",
config = function ()
vim.keymap.set('n', '<leader>dn', function () require("duck").hatch("🦀", 10) end, {})
vim.keymap.set('n', '<leader>dk', function () require("duck").cook() end, {})
end
},
}
lvim.colorscheme = "slate"
lvim.autocommands = {
{
{ "ColorScheme" },
{
pattern = "*",
callback = function()
-- change `Normal` to the group you want to change
-- and `#ffffff` to the color you want
-- see `:h nvim_set_hl` for more options
vim.api.nvim_set_hl(0, "String", { fg = "#9ece6a", underline = false, bold = false })
vim.api.nvim_set_hl(0, "Type", { fg = "#00ff00", underline = false, bold = false })
vim.api.nvim_set_hl(0, "@lsp.type.selfKeyword.rust", {fg = "#b00202", bold = true, underline=false})
vim.api.nvim_set_hl(0, "Identifier", { fg = "#ffffff", underline = false, bold = false })
vim.api.nvim_set_hl(0, "Function", { fg = "#025fb0", underline = false, bold = false })
vim.api.nvim_set_hl(0, "@lsp.typemod.variable.constant.rust", { fg = "#00ff00", underline = false, bold = false })
vim.api.nvim_set_hl(0, "@lsp.type.interface", {fg = "#a402b0", bold = true, underline=false})
vim.api.nvim_set_hl(0, "Comment", {fg = "#989898", bold = false, underline=false})
vim.api.nvim_set_hl(0, "NvimTreeGitDirty", {fg = "#ffaa00", bold = false, underline=false})
vim.api.nvim_set_hl(0, "@string.escape", {fg = "#aa00ff", bold = false, underline=false})
-- vim.api.nvim_set_hl(0, "Operator", {fg = "#ffffff", bold = false, underline=false})
end,
},
},
}
vim.cmd.set("rnu")
lvim.keys.normal_mode["<C-s>"] = ":w<Enter>"
lvim.keys.normal_mode["Q"] = ":wqa<Enter>"
lvim.keys.normal_mode["<leader>t"] = ":SymbolsOutline<Enter>"
lvim.keys.normal_mode[";"] = "$a;<ESC>"
lvim.keys.normal_mode["<leader>Lpr"] = ":n ~/vex/roberts/src/main.rs<Enter>"
lvim.keys.normal_mode["<leader>Lpt"] = ":n ~/vex/patch/src/lib.rs<Enter>"
lvim.builtin.treesitter.rainbow.enable = true
require("duck").hatch("🦀", 10);