aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nvim/init.lua145
1 files changed, 145 insertions, 0 deletions
diff --git a/src/nvim/init.lua b/src/nvim/init.lua
new file mode 100644
index 0000000..442dac4
--- /dev/null
+++ b/src/nvim/init.lua
@@ -0,0 +1,145 @@
+--
+-- ~~~ neovim config
+--
+
+-- set up map leader
+vim.g.mapleader = "\\"
+
+--
+-- ~~~ lazy.nvim
+
+local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
+
+-- load lazy.nvim
+if not (vim.uv or vim.loop).fs_stat(lazypath) then
+
+ -- clone repo
+ local lazyrepo = "https://github.com/folke/lazy.nvim.git"
+ local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
+
+end
+
+-- load lazy.nvim
+vim.opt.rtp:prepend(lazypath)
+
+-- setup lazy.nvim
+require("lazy").setup({
+
+ -- plugins
+ spec = {
+
+ -- tree sitter
+ {
+ "nvim-treesitter/nvim-treesitter",
+ branch = "master",
+ lazy = false,
+ build = ":TSUpdate"
+ },
+
+ -- vimwiki
+ {
+ "vimwiki/vimwiki",
+ init = function()
+ vim.g.vimwiki_list = {
+ {
+ path = "~/nexus",
+ syntax = "markdown",
+ ext = ".md"
+ }
+ }
+ end
+ },
+
+ -- lualine
+ {
+ "nvim-lualine/lualine.nvim",
+ dependencies = {
+ "nvim-tree/nvim-web-devicons"
+ }
+ },
+
+ -- indent guides
+ {
+ "lukas-reineke/indent-blankline.nvim",
+ main = "ibl",
+ },
+
+ -- fleet theme
+ {
+ "razcoen/fleet.nvim",
+ priority = 1000
+ },
+ },
+
+ -- installer options
+ install = {
+
+ -- set theme
+ colorscheme = { "fleet" }
+ }
+})
+
+--
+-- ~~~ language options
+
+-- use 4-spaces as tabs
+vim.o.shiftwidth = 4
+vim.o.tabstop = 4
+vim.o.softtabstop = 4
+vim.o.expandtab = true
+
+-- use system clipboard
+vim.opt.clipboard:append("unnamedplus")
+
+-- setup tree sitter
+require("nvim-treesitter.configs").setup({
+
+ -- ensure Nu is installed
+ ensure_installed = { "nu" },
+
+ -- enable syntax highlighting
+ highlight = { enabled = true }
+})
+
+-- enable tree sitter for Nu
+vim.api.nvim_create_autocmd("FileType", {
+ pattern = { "nu" },
+ callback = function()
+ vim.treesitter.start()
+ end
+})
+
+--
+-- ~~~ keybindings
+
+-- tabs
+vim.keymap.set("n", "<Leader>tn", "<cmd>tabnew<cr>")
+vim.keymap.set("n", "<Leader>tw", "<cmd>tabclose<cr>")
+vim.keymap.set("n", "<Leader>tt", "<cmd>tabnext<cr>")
+vim.keymap.set("n", "<Leader>tT", "<cmd>tabprev<cr>")
+
+--
+-- ~~~ theming
+
+-- set theme
+require("fleet").setup({ transparent_mode = true })
+vim.cmd.colorscheme "fleet"
+
+vim.opt.termguicolors = true
+
+-- setup lualine
+require("lualine").setup()
+
+-- enable line numbers
+vim.opt.number = true
+vim.opt.cursorline = true
+
+-- hide current mode
+vim.opt.showmode = false
+
+-- conceal information
+vim.opt.concealcursor = "n"
+vim.opt.conceallevel = 2
+
+-- setup indent guides
+require("ibl").setup()