From cd9cc1dcd090ce3478b922edd2f2cd832cab3a16 Mon Sep 17 00:00:00 2001 From: Jeff Date: Mon, 9 Nov 2026 10:17:29 +0100 Subject: [PATCH] initial commit --- after/plugin/lualine.lua | 47 +++++++++++++++++++++++++++++ after/plugin/telescope.lua | 4 +++ after/plugin/treesitter.lua | 13 ++++++++ init.lua | 3 ++ lua/config/lazy.lua | 41 ++++++++++++++++++++++++++ lua/jeff/init.lua | 31 +++++++++++++++++++ lua/jeff/remap.lua | 2 ++ lua/plugins/init.lua | 59 +++++++++++++++++++++++++++++++++++++ 8 files changed, 200 insertions(+) create mode 100644 after/plugin/lualine.lua create mode 100644 after/plugin/telescope.lua create mode 100644 after/plugin/treesitter.lua create mode 100644 init.lua create mode 100644 lua/config/lazy.lua create mode 100644 lua/jeff/init.lua create mode 100644 lua/jeff/remap.lua create mode 100644 lua/plugins/init.lua diff --git a/after/plugin/lualine.lua b/after/plugin/lualine.lua new file mode 100644 index 0000000..2e20b18 --- /dev/null +++ b/after/plugin/lualine.lua @@ -0,0 +1,47 @@ +require('lualine').setup { + options = { + icons_enabled = false, + theme = 'auto', + component_separators = { left = '', right = ''}, + section_separators = { left = '', right = ''}, + disabled_filetypes = { + statusline = {}, + winbar = {}, + }, + ignore_focus = {}, + always_divide_middle = true, + always_show_tabline = true, + globalstatus = false, + refresh = { + statusline = 1000, + tabline = 1000, + winbar = 1000, + refresh_time = 16, -- ~60fps + events = { + 'WinEnter', + 'BufEnter', + 'BufWritePost', + 'SessionLoadPost', + 'FileChangedShellPost', + 'VimResized', + 'Filetype', + 'CursorMoved', + 'CursorMovedI', + 'ModeChanged', + }, + } + }, + sections = { + lualine_a = {'mode'}, + lualine_b = {'filename'}, + lualine_c = {'branch', 'diff', 'diagnostics'}, + lualine_x = {'encoding', 'fileformat', 'filetype'}, + lualine_y = {'location'}, + lualine_z = {'progress'} + }, + + tabline = {}, + winbar = {}, + inactive_winbar = {}, + extensions = {} +} diff --git a/after/plugin/telescope.lua b/after/plugin/telescope.lua new file mode 100644 index 0000000..a6092bf --- /dev/null +++ b/after/plugin/telescope.lua @@ -0,0 +1,4 @@ +local builtin = require('telescope.builtin') + +vim.keymap.set("n", "pf", builtin.find_files, {}) +vim.keymap.set("n", "", builtin.git_files, {}) diff --git a/after/plugin/treesitter.lua b/after/plugin/treesitter.lua new file mode 100644 index 0000000..cc87844 --- /dev/null +++ b/after/plugin/treesitter.lua @@ -0,0 +1,13 @@ +require"nvim-treesitter".setup { + ensure_installed = {"c", "lua", "javascript", "python", "R", "help"}, + + -- install syncronously? + sync_install = false, + + auto_install = true, + + highlight = { + enable = true, + additional_vim_regex_highlighting = false, + }, +} diff --git a/init.lua b/init.lua new file mode 100644 index 0000000..91ba2ee --- /dev/null +++ b/init.lua @@ -0,0 +1,3 @@ +require("jeff") +require("config.lazy") + diff --git a/lua/config/lazy.lua b/lua/config/lazy.lua new file mode 100644 index 0000000..bebb87c --- /dev/null +++ b/lua/config/lazy.lua @@ -0,0 +1,41 @@ +-- Bootstrap lazy.nvim +local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" +if not (vim.uv or vim.loop).fs_stat(lazypath) then + local lazyrepo = "https://github.com/folke/lazy.nvim.git" + local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) + if vim.v.shell_error ~= 0 then + vim.api.nvim_echo({ + { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, + { out, "WarningMsg" }, + { "\nPress any key to exit..." }, + }, true, {}) + vim.fn.getchar() + os.exit(1) + end +end +vim.opt.rtp:prepend(lazypath) + + + +-- Make sure to setup `mapleader` and `maplocalleader` before +-- loading lazy.nvim so that mappings are correct. +-- This is also a good place to setup other settings (vim.opt) + +-- i do this partly in my own config ~~jeff +-- vim.g.mapleader = " " +vim.g.maplocalleader = "\\" + + + +-- Setup lazy.nvim +require("lazy").setup({ + spec = { + -- import your plugins + { import = "plugins" }, + }, + -- Configure any other settings here. See the documentation for more details. + -- colorscheme that will be used when installing plugins. + install = { colorscheme = { "habamax" } }, + -- automatically check for plugin updates + checker = { enabled = true }, +}) diff --git a/lua/jeff/init.lua b/lua/jeff/init.lua new file mode 100644 index 0000000..dfd2291 --- /dev/null +++ b/lua/jeff/init.lua @@ -0,0 +1,31 @@ +require("jeff.remap") + +vim.opt.guicursor = "n-c-v-sm:block-blinkon0,i-ci-r-cr-o:block-blinkon200-blinkoff150-blinkwait10" + +vim.opt.nu = true +vim.opt.relativenumber = true + +vim.opt.cursorline = true +vim.opt.cursorlineopt = "both" + +vim.opt.tabstop = 4 +vim.opt.softtabstop = 4 +vim.opt.shiftwidth = 4 +vim.opt.expandtab = false + +vim.opt.smartindent = true + +vim.opt.wrap = false +vim.opt.smoothscroll = true + +vim.opt.hlsearch = false +vim.opt.incsearch = true + +vim.opt.termguicolors = true +vim.opt.showmode = false + +vim.opt.scrolloff = 8 +-- vim.opt.scrolloffpad = 8 +vim.opt.signcolumn = "yes" + +vim.opt.colorcolumn = "80,120" diff --git a/lua/jeff/remap.lua b/lua/jeff/remap.lua new file mode 100644 index 0000000..b760350 --- /dev/null +++ b/lua/jeff/remap.lua @@ -0,0 +1,2 @@ +vim.g.mapleader = " " +vim.keymap.set("n", "pv", vim.cmd.Ex) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua new file mode 100644 index 0000000..157fb91 --- /dev/null +++ b/lua/plugins/init.lua @@ -0,0 +1,59 @@ +return { + -- telecope + {'nvim-telescope/telescope.nvim', version = '*', + dependencies = { + 'nvim-lua/plenary.nvim', + -- optional but recommended + { 'nvim-telescope/telescope-fzf-native.nvim', build = 'make' }, + } + }, + + -- treesitter + { + 'nvim-treesitter/nvim-treesitter', + lazy = false, + build = ':TSUpdate' + }, + + -- render-latex + { + "techwizrd/render-latex.nvim", + ft = "markdown", + opts = {}, + }, + + -- render-markdown + { + 'MeanderingProgrammer/render-markdown.nvim', + dependencies = { 'nvim-treesitter/nvim-treesitter', 'nvim-mini/mini.nvim' }, -- if you use the mini.nvim suite + -- dependencies = { 'nvim-treesitter/nvim-treesitter', 'nvim-mini/mini.icons' }, -- if you use standalone mini plugins + -- dependencies = { 'nvim-treesitter/nvim-treesitter', 'nvim-tree/nvim-web-devicons' }, -- if you prefer nvim-web-devicons + ---@module 'render-markdown' + ---@type render.md.UserConfig + opts = {}, + }, + + -- lualine (status line) + { + 'nvim-lualine/lualine.nvim', + dependencies = { 'nvim-tree/nvim-web-devicons' } + }, + + -- rose pine (color scheme) + { + "rose-pine/neovim", + name = "rose-pine", + config = function() + vim.cmd("colorscheme rose-pine") + end + }, + + -- kanagawa (color scheme) + { + "rebelot/kanagawa.nvim", + name = "kanagawa", + --config = function() + -- vim.cmd("colorscheme kanagawa") + -- end + } +}