-- -- ~~~ 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.api.nvim_create_autocmd("FileType", { pattern = { "*" }, callback = function() vim.o.shiftwidth = 4 vim.o.tabstop = 4 vim.o.softtabstop = 4 vim.o.expandtab = true end }) -- use system clipboard vim.opt.clipboard:append("unnamedplus") -- don't auto-add comments vim.api.nvim_create_autocmd("FileType", { pattern = { "*" }, callback = function() vim.opt.formatoptions = "" end }) -- 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", "tn", "tabnew") vim.keymap.set("n", "tw", "tabclose") vim.keymap.set("n", "tt", "tabnext") vim.keymap.set("n", "tT", "tabprev") -- -- ~~~ 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()