aboutsummaryrefslogtreecommitdiff
path: root/nvim/lua
diff options
context:
space:
mode:
authorEthan Morgan <ethan@gweithio.com>2026-02-14 16:40:16 +0000
committerEthan Morgan <ethan@gweithio.com>2026-02-14 16:40:16 +0000
commitb94eefa6b58f274bb61db4e792105c3959cf2022 (patch)
tree3d2896fb46ebc769e4fea8cf4f02ce3104e1f974 /nvim/lua
init dotfiles and stuffHEADmaster
Diffstat (limited to 'nvim/lua')
-rw-r--r--nvim/lua/sixfourtwelve/autocmds.lua56
-rw-r--r--nvim/lua/sixfourtwelve/filetype.lua5
-rw-r--r--nvim/lua/sixfourtwelve/init.lua4
-rw-r--r--nvim/lua/sixfourtwelve/knixstatusline.lua73
-rw-r--r--nvim/lua/sixfourtwelve/lazy.lua272
-rw-r--r--nvim/lua/sixfourtwelve/remap.lua22
-rw-r--r--nvim/lua/sixfourtwelve/set.lua30
7 files changed, 462 insertions, 0 deletions
diff --git a/nvim/lua/sixfourtwelve/autocmds.lua b/nvim/lua/sixfourtwelve/autocmds.lua
new file mode 100644
index 0000000..43ebcf0
--- /dev/null
+++ b/nvim/lua/sixfourtwelve/autocmds.lua
@@ -0,0 +1,56 @@
+vim.api.nvim_create_augroup('setIndent', { clear = true })
+
+vim.api.nvim_create_autocmd('Filetype', {
+ group = 'setIndent',
+ pattern = { 'c' },
+ command = 'setlocal shiftwidth=4 tabstop=4'
+})
+
+vim.api.nvim_create_autocmd('Filetype', {
+ group = 'setIndent',
+ pattern = { 'cpp' },
+ command = 'setlocal shiftwidth=2 tabstop=2'
+})
+
+vim.api.nvim_create_autocmd('Filetype', {
+ group = 'setIndent',
+ pattern = { 'fsharp' },
+ command = 'setlocal shiftwidth=4 tabstop=4'
+})
+
+vim.api.nvim_create_autocmd('Filetype', {
+ group = 'setIndent',
+ pattern = { 'objc', 'objcpp' },
+ command = 'setlocal shiftwidth=8 tabstop=8'
+})
+
+vim.api.nvim_create_autocmd('Filetype', {
+ group = 'setIndent',
+ pattern = { 'cs' },
+ command = 'setlocal shiftwidth=4 tabstop=4'
+})
+
+vim.api.nvim_create_autocmd('Filetype', {
+ group = 'setIndent',
+ pattern = { 'zig' },
+ command = 'setlocal shiftwidth=4 tabstop=4'
+})
+
+vim.api.nvim_create_autocmd('Filetype', {
+ group = 'setIndent',
+ pattern = { 'go' },
+ command = 'setlocal shiftwidth=8 tabstop=8'
+})
+
+
+vim.api.nvim_create_autocmd('Filetype', {
+ group = 'setIndent',
+ pattern = { 'odin' },
+ command = 'setlocal shiftwidth=8 tabstop=8'
+})
+
+vim.api.nvim_create_autocmd('Filetype', {
+ group = 'setIndent',
+ pattern = { 'ada' },
+ command = 'setlocal shiftwidth=3 tabstop=3'
+})
diff --git a/nvim/lua/sixfourtwelve/filetype.lua b/nvim/lua/sixfourtwelve/filetype.lua
new file mode 100644
index 0000000..2e44fb1
--- /dev/null
+++ b/nvim/lua/sixfourtwelve/filetype.lua
@@ -0,0 +1,5 @@
+vim.filetype.add({
+ extension = {
+ hx = 'haxe',
+ },
+})
diff --git a/nvim/lua/sixfourtwelve/init.lua b/nvim/lua/sixfourtwelve/init.lua
new file mode 100644
index 0000000..aed9fd0
--- /dev/null
+++ b/nvim/lua/sixfourtwelve/init.lua
@@ -0,0 +1,4 @@
+require("sixfourtwelve.remap")
+require("sixfourtwelve.set")
+require("sixfourtwelve.lazy")
+require("sixfourtwelve.autocmds")
diff --git a/nvim/lua/sixfourtwelve/knixstatusline.lua b/nvim/lua/sixfourtwelve/knixstatusline.lua
new file mode 100644
index 0000000..8791484
--- /dev/null
+++ b/nvim/lua/sixfourtwelve/knixstatusline.lua
@@ -0,0 +1,73 @@
+local M = {}
+
+M.Palette = {
+ black = "#090e13",
+ red = "#c4746e",
+ green = "#8a9a7b",
+ yellow = "#c4b28a",
+ blue = "#8ba4b0",
+ magenta = "#a292a3",
+ cyan = "#8ea4a2",
+ white = "#a4a7a4",
+ bright_black = "#5c6066",
+ bright_red = "#e46876",
+ bright_green = "#87a987",
+ bright_yellow = "#e6c384",
+ bright_blue = "#7fb4ca",
+ bright_magenta = "#938aa9",
+ bright_cyan = "#7aa89f",
+ bright_white = "#c5c9c7",
+ background = "#090e13",
+ foreground = "#c5c9c7",
+ cursor_color = "#c5c9c7",
+ selection_background = "#22262d",
+ selection_foreground = "#c5c9c7",
+
+ background_light = '#111a23'
+}
+
+vim.cmd [[
+set fillchars=vert:│
+
+" Optional: give split separators a highlight group
+highlight WinSeparator guifg=#c5c9c7 guibg=NONE
+set winhighlight=VertSplit:WinSeparator
+]]
+
+M.setup = function()
+ vim.api.nvim_set_hl(0, 'User1', { fg = M.Palette.green, bg = M.background_light })
+ vim.api.nvim_set_hl(0, 'User2', { fg = M.Palette.foreground, bg = M.background_light })
+ vim.api.nvim_set_hl(0, 'User3', { fg = M.Palette.red, bg = M.background_light })
+ vim.api.nvim_set_hl(0, 'User4', { fg = M.Palette.white, bg = M.background_light })
+ vim.api.nvim_set_hl(0, 'User6', { fg = M.Palette.yellow, bg = M.background_light })
+ --vim.api.nvim_set_hl(0, 'StatusLine', { bg = M.background_light })
+
+ local inspirations = {
+ 'every second counts',
+ 'Hello, World!',
+ 'this is water',
+ 'leaf',
+ 'timshel'
+ }
+ math.randomseed(os.time())
+ local random_index = math.random(#inspirations)
+ local inspiration = inspirations[random_index]
+ local s = '%1* ' .. inspiration .. '%*'
+
+ vim.o.laststatus = 2
+ vim.o.statusline = ''
+ -- set statusline+=%6*\ %<%F%* "full path
+ vim.cmd [[
+ set statusline+=%3*%m%* "modified flag
+ set statusline+=%4*\ %y%* "file type
+ ]]
+ vim.o.statusline = vim.o.statusline .. s
+ vim.cmd [[
+ set statusline+=%1*%=%5l%* "current line
+ set statusline+=%2*/%L%* "total lines
+ set statusline+=%1*%4v\ %* "virtual column number
+ set statusline+=%6*0x%04B\ %* "character under cursor
+ ]]
+end
+
+return M
diff --git a/nvim/lua/sixfourtwelve/lazy.lua b/nvim/lua/sixfourtwelve/lazy.lua
new file mode 100644
index 0000000..a89a964
--- /dev/null
+++ b/nvim/lua/sixfourtwelve/lazy.lua
@@ -0,0 +1,272 @@
+---@diagnostic disable: undefined-global
+---
+vim.g.mapleader = " "
+vim.g.maplocalleader = ","
+
+return require("lazy").setup({
+ {
+ 'b0o/incline.nvim',
+ config = function()
+ local helpers = require 'incline.helpers'
+ local devicons = require 'nvim-web-devicons'
+ require('incline').setup({
+ render = function(props)
+ local filename = vim.fn.fnamemodify(vim.api.nvim_buf_get_name(props.buf), ':t')
+ if filename == '' then
+ filename = '[No Name]'
+ end
+ local ft_icon, ft_color = devicons.get_icon_color(filename)
+ return {
+ ft_icon and { ' ', ft_icon, ' ', guibg = "", guifg = helpers.contrast_color(ft_color) } or '',
+ ' ',
+ { filename },
+ ' ',
+ guibg = '',
+ }
+ end,
+ })
+ end,
+ event = 'VeryLazy',
+ },
+ {
+ 'Bekaboo/dropbar.nvim',
+ -- optional, but required for fuzzy finder support
+ dependencies = {
+ 'nvim-telescope/telescope-fzf-native.nvim',
+ build = 'make'
+ },
+ config = function()
+ local dropbar_api = require('dropbar.api')
+ vim.keymap.set('n', '<Leader>;', dropbar_api.pick, { desc = 'Pick symbols in winbar' })
+ vim.keymap.set('n', '[;', dropbar_api.goto_context_start, { desc = 'Go to start of current context' })
+ vim.keymap.set('n', '];', dropbar_api.select_next_context, { desc = 'Select next context' })
+ end
+ },
+ {
+ "webhooked/kanso.nvim",
+ lazy = false,
+ priority = 1000,
+ config = function()
+ require("kanso").setup {
+ bold = false,
+ italics = false,
+ keywordStyle = { italic = false },
+ background = {
+ dark = "zen",
+ light = "pearl"
+ },
+ foreground = {
+ -- dark = "saturated",
+ -- light = "saturated"
+ }
+ }
+ vim.cmd("colorscheme kanso")
+ vim.defer_fn(function()
+ for _, group in ipairs({
+ "DiagnosticUnderlineError",
+ "DiagnosticUnderlineWarn",
+ "DiagnosticUnderlineInfo",
+ "DiagnosticUnderlineHint",
+ }) do
+ local hl = vim.api.nvim_get_hl(0, { name = group })
+ hl.undercurl = false
+ hl.underline = true
+ hl.bold = false
+ vim.api.nvim_set_hl(0, group, hl)
+ end
+ end, 50)
+
+ end
+ },
+ {"folke/twilight.nvim"},
+ {"edkolev/tmuxline.vim"},
+ {"nvim-lualine/lualine.nvim"},
+ {"Tsuzat/NeoSolarized.nvim"},
+ {"lifepillar/vim-solarized8"},
+ {
+ "seblyng/roslyn.nvim",
+ ---@module 'roslyn.config'
+ ---@type RoslynNvimConfig
+ opts = {},
+ },
+ { "Decodetalkers/csharpls-extended-lsp.nvim" },
+ {
+ "folke/snacks.nvim",
+ opts = {
+ indent = {
+ indent = {
+ enabled = false,
+ },
+ chunk = {
+ enabled = true,
+ char = {
+ horizontal = '─',
+ vertical = '│',
+ corner_top = '╭',
+ corner_bottom = '╰',
+ arrow = '─',
+ },
+ },
+ },
+ },
+ },
+ { "onsails/lspkind.nvim" },
+ { "RRethy/vim-illuminate" },
+-- {"windwp/windline.nvim",
+-- config = function()
+-- require("wlsample.airline")
+-- end,
+-- },
+ {
+ "scalameta/nvim-metals",
+ dependencies = {
+ "nvim-lua/plenary.nvim",
+ },
+ ft = { "scala", "sbt", "java" },
+ opts = function()
+ local metals_config = require("metals").bare_config()
+
+ local options = { buffer = bufnr, remap = false }
+ metals_config.on_attach = function(client, bufnr)
+ vim.keymap.set('n', 'gd', '<cmd>lua require"telescope.builtin".lsp_definitions({jump_type="vsplit"})<CR>',
+ options)
+ -- vim.keymap.set('n', 'gd', function() vim.lsp.buf.definition() end, options)
+ vim.keymap.set("n", "gr", function() vim.lsp.buf.references() end, options)
+ vim.keymap.set("n", "bh", function() vim.lsp.buf.hover() end, options)
+ vim.keymap.set("n", "ca", function() vim.lsp.buf.code_action() end, options)
+ vim.keymap.set("n", "cr", function() vim.lsp.buf.rename() end, options)
+ vim.keymap.set("n", "gv", function() vim.lsp.buf.signature_help() end, options)
+ vim.keymap.set("n", "gl", function() vim.diagnostic.open_float() end, options)
+ vim.keymap.set("n", "[d", function() vim.diagnostic.goto_next() end, options)
+ vim.keymap.set("n", "]d", function() vim.diagnostic.goto_prev() end, options)
+ end
+
+ return metals_config
+ end,
+ config = function(self, metals_config)
+ local nvim_metals_group = vim.api.nvim_create_augroup("nvim-metals", { clear = true })
+ vim.api.nvim_create_autocmd("FileType", {
+ pattern = self.ft,
+ callback = function()
+ require("metals").initialize_or_attach(metals_config)
+ end,
+ group = nvim_metals_group,
+ })
+ end
+ },
+ { "reasonml-editor/vim-reason-plus" },
+ {
+ 'echasnovski/mini.nvim',
+ config = function()
+ require('mini.ai').setup { n_lines = 500 }
+ require('mini.sessions').setup({})
+
+ require('mini.icons').setup({
+ style = 'glyph',
+ })
+ -- require('mini.tabline').setup({
+ -- show_icons = true,
+ -- tabpage_section = 'right',
+ -- })
+ --
+ local starter = require('mini.starter')
+ starter.setup({
+ evaluate_single = true,
+ items = {
+ starter.sections.builtin_actions(),
+ starter.sections.recent_files(10, false),
+ starter.sections.recent_files(10, true),
+ starter.sections.sessions(5, true)
+ },
+ content_hooks = {
+ starter.gen_hook.adding_bullet(),
+ starter.gen_hook.indexing('all', { 'Builtin actions' }),
+ starter.gen_hook.padding(3, 2),
+ },
+ })
+ end
+ },
+ { "folke/tokyonight.nvim" },
+ { 'dmmulroy/ts-error-translator.nvim' },
+ {
+ 'Olical/conjure',
+ ft = { "clojure", "fennel", "racket", "scheme", "lisp" },
+ lazy = true,
+ enabled = true,
+ },
+ { "ocaml-mlx/ocaml_mlx.nvim" },
+ {
+ "karb94/neoscroll.nvim",
+ config = function()
+ require('neoscroll').setup({})
+ end
+ },
+ -- { 'fatih/vim-go' },
+ { "nvim-treesitter/nvim-treesitter", build = ':TSUpdate', lazy = false, dependencies = { "OXY2DEV/markview.nvim" } },
+ { "nvim-treesitter/playground" },
+ {
+ "ThePrimeagen/harpoon",
+ lazy = true,
+ },
+ { "tpope/vim-fugitive" },
+ { "chrisbra/Colorizer" },
+ { "lewis6991/gitsigns.nvim" },
+ { "f-person/git-blame.nvim" },
+ { "j-hui/fidget.nvim" },
+ { 'MunifTanjim/nui.nvim' },
+ { "folke/noice.nvim" },
+ {
+ "hedyhli/outline.nvim",
+ config = function()
+ vim.keymap.set("n", "<leader>o", "<cmd>Outline<CR>",
+ { desc = "Toggle Outline" })
+
+ require("outline").setup {
+ outline_window = {
+ width = 25,
+ relative_width = true,
+ focus_on_open = true,
+ auto_jump = false
+ },
+ preview_window = {
+ auto_preview = true,
+ open_hover_on_preview = true,
+ width = 50,
+ min_width = 50,
+ relative_width = true,
+ border = 'single',
+ winhl = 'NormalFloat:',
+ },
+ }
+ end,
+ },
+ { 'windwp/nvim-autopairs' },
+ { 'neovim/nvim-lspconfig' },
+ {
+ 'williamboman/mason.nvim',
+ },
+ { 'williamboman/mason-lspconfig.nvim' },
+
+ { 'hrsh7th/nvim-cmp' },
+ { 'hrsh7th/cmp-buffer' },
+ { 'hrsh7th/cmp-path' },
+ { 'saadparwaiz1/cmp_luasnip' },
+ { 'hrsh7th/cmp-nvim-lsp' },
+ { 'hrsh7th/cmp-nvim-lua' },
+
+ { 'L3MON4D3/LuaSnip' },
+ { 'rafamadriz/friendly-snippets' },
+
+ {
+ 'VonHeikemen/lsp-zero.nvim',
+ lazy = false,
+ -- branch = 'v1.x',
+ },
+ { "kyazdani42/nvim-web-devicons" },
+ { 'mhartington/formatter.nvim' },
+ { 'kyazdani42/nvim-tree.lua' },
+ { 'nvim-telescope/telescope.nvim', dependencies = { { 'nvim-lua/plenary.nvim' } } },
+ { "mbbill/undotree" },
+ { "nvim-treesitter/nvim-treesitter-context" },
+ { "catppuccin/nvim", name = "catppuccin", priority = 1000 },
+}, opts)
diff --git a/nvim/lua/sixfourtwelve/remap.lua b/nvim/lua/sixfourtwelve/remap.lua
new file mode 100644
index 0000000..dd00385
--- /dev/null
+++ b/nvim/lua/sixfourtwelve/remap.lua
@@ -0,0 +1,22 @@
+vim.keymap.set("v", "J", ":m '>+1<CR>gv=gv")
+vim.keymap.set("v", "K", ":m '<-2<CR>gv=gv")
+
+vim.keymap.set("n", "<C-d>", "<C-d>zz")
+vim.keymap.set("n", "<C-u>", "<C-u>zz")
+
+vim.keymap.set("n", "n", "nzzzv")
+vim.keymap.set("n", "N", "Nzzzv")
+
+vim.keymap.set("x", "<leader>p", [["_dP]])
+vim.keymap.set("n", "<C-j>", "<cmd>cnext<CR>zz")
+vim.keymap.set("n", "<C-k>", "<cmd>cprev<CR>zz")
+vim.keymap.set("n", "<leader>k", "<cmd>lnext<CR>zz")
+
+vim.keymap.set("n", "<leader>j", "<cmd>lprev<CR>zz")
+vim.api.nvim_set_keymap('n', 's', 'xi', { noremap = true })
+
+
+vim.keymap.set("n", "<C-a>", "<cmd>:bprev<CR>zz")
+vim.keymap.set("n", "<C-s>", "<cmd>:bnext<CR>zz")
+-- vim.keymap.set("n", "<C-w>", "<cmd>:bdelete<CR>zz")
+vim.keymap.set("n", "<C-c>", "<cmd>:w<CR>zz")
diff --git a/nvim/lua/sixfourtwelve/set.lua b/nvim/lua/sixfourtwelve/set.lua
new file mode 100644
index 0000000..a69215d
--- /dev/null
+++ b/nvim/lua/sixfourtwelve/set.lua
@@ -0,0 +1,30 @@
+vim.o.number = true
+vim.o.laststatus = 2
+vim.o.numberwidth = 1
+vim.o.relativenumber = false
+vim.o.tabstop = 2
+vim.o.shiftwidth = 2
+vim.o.expandtab = true
+vim.o.shiftround = true
+vim.o.mouse = "a"
+vim.o.wrap = true
+
+vim.o.signcolumn = "yes"
+vim.o.syntax = "on"
+vim.o.termguicolors = true
+
+vim.opt.smartindent = false
+
+vim.opt.wrap = true
+
+vim.opt.hlsearch = false
+vim.opt.incsearch = true
+
+vim.opt.swapfile = false
+vim.opt.backup = false
+vim.opt.undodir = os.getenv("HOME") .. "/.nvim/undodir"
+vim.opt.undofile = true
+
+vim.opt.scrolloff = 8
+
+vim.opt.updatetime = 5