From 897bb45853cf6e557997872aceec35f879b94643 Mon Sep 17 00:00:00 2001 From: Mark Eaton Date: Wed, 28 May 2025 16:16:24 -0400 Subject: [PATCH] initial commit --- after/ftplugin/html.lua | 5 +++++ after/ftplugin/javascript.lua | 5 +++++ after/ftplugin/markdown.lua | 18 ++++++++++++++++++ after/ftplugin/python.lua | 8 ++++++++ after/ftplugin/text.lua | 14 ++++++++++++++ after/ftplugin/vue.lua | 5 +++++ after/ftplugin/xml.lua | 5 +++++ init.lua | 28 ++++++++++++++++++++++++++++ 8 files changed, 88 insertions(+) create mode 100644 after/ftplugin/html.lua create mode 100644 after/ftplugin/javascript.lua create mode 100644 after/ftplugin/markdown.lua create mode 100644 after/ftplugin/python.lua create mode 100644 after/ftplugin/text.lua create mode 100644 after/ftplugin/vue.lua create mode 100644 after/ftplugin/xml.lua create mode 100644 init.lua diff --git a/after/ftplugin/html.lua b/after/ftplugin/html.lua new file mode 100644 index 0000000..ee85806 --- /dev/null +++ b/after/ftplugin/html.lua @@ -0,0 +1,5 @@ +vim.opt_local.expandtab = false +vim.opt_local.autoindent = true +vim.opt_local.smarttab = true +vim.opt_local.tabstop = 2 +vim.opt_local.shiftwidth = 2 diff --git a/after/ftplugin/javascript.lua b/after/ftplugin/javascript.lua new file mode 100644 index 0000000..ee85806 --- /dev/null +++ b/after/ftplugin/javascript.lua @@ -0,0 +1,5 @@ +vim.opt_local.expandtab = false +vim.opt_local.autoindent = true +vim.opt_local.smarttab = true +vim.opt_local.tabstop = 2 +vim.opt_local.shiftwidth = 2 diff --git a/after/ftplugin/markdown.lua b/after/ftplugin/markdown.lua new file mode 100644 index 0000000..d3dfed1 --- /dev/null +++ b/after/ftplugin/markdown.lua @@ -0,0 +1,18 @@ +-- txt specific settings +vim.opt.wrap = true -- Wrap text +vim.opt.breakindent = true -- Match indent on line break +vim.opt.linebreak = true -- Line break on whole words + +-- Spell check +vim.opt.spelllang = 'en_us' +vim.opt.spell = true + +-- alter up and down arrows for better text navigation +vim.keymap.set("n", "", "gj") +vim.keymap.set("n", "", "gk") + +-- also in insert mode +-- vim.keymap.set("i", "", "gj") +-- vim.keymap.set("i", "", "gk") + +vim.cmd(':Copilot disable') diff --git a/after/ftplugin/python.lua b/after/ftplugin/python.lua new file mode 100644 index 0000000..08ebe80 --- /dev/null +++ b/after/ftplugin/python.lua @@ -0,0 +1,8 @@ +vim.opt_local.expandtab = true +vim.opt_local.autoindent = true +vim.opt_local.smarttab = true +vim.opt_local.tabstop = 4 +vim.opt_local.textwidth = 80 + +-- Set the indent after opening parenthesis +vim.g.pyindent_open_paren = vim.bo.shiftwidth diff --git a/after/ftplugin/text.lua b/after/ftplugin/text.lua new file mode 100644 index 0000000..1b1a29c --- /dev/null +++ b/after/ftplugin/text.lua @@ -0,0 +1,14 @@ +-- txt specific settings +vim.opt.wrap = true -- Wrap text +vim.opt.breakindent = true -- Match indent on line break +vim.opt.linebreak = true -- Line break on whole words + +-- Spell check +vim.opt.spelllang = 'en_us' +vim.opt.spell = true + +-- alter up and down arrows for better text navigation +vim.keymap.set("n", "", "gj") +vim.keymap.set("n", "", "gk") + +vim.cmd(':Copilot disable') diff --git a/after/ftplugin/vue.lua b/after/ftplugin/vue.lua new file mode 100644 index 0000000..ee85806 --- /dev/null +++ b/after/ftplugin/vue.lua @@ -0,0 +1,5 @@ +vim.opt_local.expandtab = false +vim.opt_local.autoindent = true +vim.opt_local.smarttab = true +vim.opt_local.tabstop = 2 +vim.opt_local.shiftwidth = 2 diff --git a/after/ftplugin/xml.lua b/after/ftplugin/xml.lua new file mode 100644 index 0000000..ee85806 --- /dev/null +++ b/after/ftplugin/xml.lua @@ -0,0 +1,5 @@ +vim.opt_local.expandtab = false +vim.opt_local.autoindent = true +vim.opt_local.smarttab = true +vim.opt_local.tabstop = 2 +vim.opt_local.shiftwidth = 2 diff --git a/init.lua b/init.lua new file mode 100644 index 0000000..8a0c46d --- /dev/null +++ b/init.lua @@ -0,0 +1,28 @@ +-- load plugins +local Plug = vim.fn['plug#'] +vim.call('plug#begin') +Plug 'github/copilot.vim' +Plug 'vim-airline/vim-airline' +Plug 'vim-airline/vim-airline-themes' +Plug('ms-jpq/chadtree', {branch = 'chad', ['do'] = 'python3 -m chadtree deps'}) +Plug 'ryanoasis/vim-devicons' +vim.call('plug#end') + +-- set line numbers +vim.opt.number = true + +-- start chadtree +require('chadtree') +vim.cmd.CHADopen('--nofocus') + +-- set airline theme +vim.g.airline_theme = 'base16_classic_dark' + +-- make comments italic and grey +vim.api.nvim_set_hl(0, 'Comment', { italic=true, fg='#7c7c7c' }) + +-- make :hoff into a command +vim.cmd('cnoreabbrev hoff nohlsearch') + +-- set nerd font +vim.g.have_nerd_font = true