dotfiles/.config/lvim/config.lua
2022-03-25 14:47:18 +11:00

60 lines
1.8 KiB
Lua

-- Options
lvim.colorscheme = "tokyonight"
lvim.log.level = "warn"
lvim.format_on_save = true
lvim.builtin.alpha.mode = "startify"
lvim.builtin.nvimtree.show_icons.git = 1
local o = vim.opt
o.timeoutlen = 300
o.shell = "/bin/sh"
-- Keymappings
local delete = function () end
lvim.leader = "space"
lvim.keys.normal_mode["<C-s>"] = ":w<cr>"
lvim.builtin.cmp.mapping["<C-Space>"] = delete()
lvim.builtin.which_key.mappings["P"] = { "<cmd>Telescope projects<CR>", "Projects" }
lvim.builtin.which_key.mappings["t"] = {
name = "+Trouble",
r = { "<cmd>Trouble lsp_references<cr>", "References" },
f = { "<cmd>Trouble lsp_definitions<cr>", "Definitions" },
d = { "<cmd>Trouble lsp_document_diagnostics<cr>", "Diagnostics" },
q = { "<cmd>Trouble quickfix<cr>", "QuickFix" },
l = { "<cmd>Trouble loclist<cr>", "LocationList" },
w = { "<cmd>Trouble lsp_workspace_diagnostics<cr>", "Diagnostics" },
}
lvim.builtin.which_key.mappings["n"] = {
name = "+Neorg",
s = { ":NeorgStart silent=true<cr>", "Start"},
t = { ":Neorg gtd capture<cr>", "New Task"},
v = { ":Neorg gtd views<cr>", "View Tasks"},
e = { ":Neorg gtd edit<cr>", "Edit Tasks"},
w = { ":Neorg news all<cr>", "Neorg News"},
d = {
name = "+Journal",
t = { ":Neorg journal today<cr>", "Today" },
y = { ":Neorg journal yesterday<cr>", "Yesterday" },
n = { ":Neorg journal tomorrow<cr>", "Tomorrow" },
c = { ":Neorg journal custom", "Custom" },
},
}
-- Plugins
local req = function (module)
require(module)
end
lvim.builtin.notify.active = true
lvim.builtin.terminal.active = true
lvim.builtin.dap.active = true
lvim.plugins = {
{ "folke/tokyonight.nvim", },
{ "nvim-neorg/neorg", config = req "conf.neorg", },
{ "folke/trouble.nvim", cmd = "TroubleToggle", },
}
require "conf.luasnip"