aboutsummaryrefslogtreecommitdiff
path: root/vim
diff options
context:
space:
mode:
authorgyoder <70408179+gyoder@users.noreply.github.com>2025-06-14 11:41:23 +0200
committergyoder <70408179+gyoder@users.noreply.github.com>2025-06-14 11:41:23 +0200
commitbdf3cdecda3d112b14e3ceb50ce4f88862813270 (patch)
treeaec5cd7764ff726740426dd9e4897e8cdcbf97b6 /vim
parentd6d6dab3806f88e27990936e83c7b74d08215a9d (diff)
added existing nvim config
Diffstat (limited to 'vim')
-rw-r--r--vim/.config/nvim/init.lua49
-rw-r--r--vim/.config/nvim/lsp/ccls.lua26
-rw-r--r--vim/.config/nvim/lsp/clangd.lua28
-rw-r--r--vim/.config/nvim/lsp/luals.lua5
-rw-r--r--vim/.config/nvim/lsp/pyright.lua4
-rw-r--r--vim/.config/nvim/lsp/rust_analyzer.lua9
-rw-r--r--vim/.config/nvim/lsp/superhtml.lua22
-rw-r--r--vim/.config/nvim/lsp/tailwind-ls.lua62
-rw-r--r--vim/.config/nvim/lsp/zls.lua10
-rw-r--r--vim/.config/nvim/lua/custom-lualine.lua4
-rw-r--r--vim/.config/nvim/lua/diagnostics.lua2
-rw-r--r--vim/.config/nvim/lua/native-lsp.lua48
-rw-r--r--vim/.config/nvim/lua/plugins/blink_config.lua11
-rw-r--r--vim/.config/nvim/lua/plugins/init.lua157
-rw-r--r--vim/.config/nvim/lua/plugins/lualine-config.lua4
-rw-r--r--vim/.config/nvim/lua/plugins/marks-config.lua36
-rw-r--r--vim/.config/nvim/lua/plugins/rust-config.lua30
-rw-r--r--vim/.config/nvim/lua/plugins/ts.lua41
-rw-r--r--vim/.config/nvim/lua/remap.lua77
-rw-r--r--vim/.config/nvim/lua/standard-lint.lua12
-rw-r--r--vim/.config/nvim/lua/westwood-lint.lua20
-rw-r--r--vim/.config/nvim/plugin/packer_compiled.lua299
-rw-r--r--vim/.vim/settings.vim30
-rw-r--r--vim/.vimrc10
24 files changed, 996 insertions, 0 deletions
diff --git a/vim/.config/nvim/init.lua b/vim/.config/nvim/init.lua
new file mode 100644
index 0000000..fe31933
--- /dev/null
+++ b/vim/.config/nvim/init.lua
@@ -0,0 +1,49 @@
+--
+-- nvim init script by grace
+--
+
+-- Get hostname
+local handle = io.popen("hostname")
+local hostname = handle:read("*a") or ""
+handle:close()
+hostname = hostname:gsub("%s+", "")
+vim.g.hostname = hostname
+if string.match(hostname, "cs.purdue.edu") then
+ vim.g.is_purdue = true
+else
+ vim.g.is_purdue = false
+end
+
+-- add required things to path
+if vim.g.is_purdue then
+ vim.env.PATH = vim.env.PATH .. ':' .. os.getenv("HOME") .. '/clangd/bin:/u/riker/u98/cs240/bin'
+end
+
+require("plugins")
+require("native-lsp")
+require("diagnostics")
+require("remap")
+
+
+if vim.g.is_purdue then
+ require("westwood-lint")
+end
+require("standard-lint")
+
+vim.cmd("source ~/.vim/settings.vim")
+
+vim.api.nvim_create_autocmd({ "BufWritePre" }, {
+ pattern = { "*" },
+ command = [[%s/\s\+$//e]],
+})
+
+
+-- File IO can be slow and this might help idk
+if vim.g.is_purdue then
+ vim.cmd("set noundofile") -- i forgor how to do this in lua so i didnt
+end
+
+
+
+
+
diff --git a/vim/.config/nvim/lsp/ccls.lua b/vim/.config/nvim/lsp/ccls.lua
new file mode 100644
index 0000000..f0a08c5
--- /dev/null
+++ b/vim/.config/nvim/lsp/ccls.lua
@@ -0,0 +1,26 @@
+return {
+ cmd = {
+ 'clangd',
+ -- '--clang-tidy',
+ -- '--background-index',
+ -- '--offset-encoding=utf-8',
+ },
+ filetypes = { 'arduino' },
+ root_markers = {
+ '.clangd',
+ '.ccls',
+ 'compile_commands.json',
+ 'compile_flags.txt',
+ 'configure.ac' -- AutoTools
+ },
+ single_file_support = true,
+ capabilities = {
+ textDocument = {
+ completion = {
+ editsNearCursor = true,
+ },
+ },
+ offsetEncoding = { 'utf-8', 'utf-16' },
+ },
+}
+
diff --git a/vim/.config/nvim/lsp/clangd.lua b/vim/.config/nvim/lsp/clangd.lua
new file mode 100644
index 0000000..ddbab4f
--- /dev/null
+++ b/vim/.config/nvim/lsp/clangd.lua
@@ -0,0 +1,28 @@
+return {
+ cmd = {
+ 'clangd',
+ -- '--clang-tidy',
+ '--background-index',
+ '--offset-encoding=utf-8',
+ '--query-driver=/Users/scie/.platformio/packages/toolchain-xtensa-esp32/**'
+ },
+ filetypes = { 'c', 'cpp', 'objc', 'objcpp', 'cuda', 'proto', 'arduino' },
+ root_markers = {
+ '.clangd',
+ '.clang-tidy',
+ '.clang-format',
+ 'compile_commands.json',
+ 'compile_flags.txt',
+ 'configure.ac' -- AutoTools
+ },
+ single_file_support = true,
+ capabilities = {
+ textDocument = {
+ completion = {
+ editsNearCursor = true,
+ },
+ },
+ offsetEncoding = { 'utf-8', 'utf-16' },
+ },
+}
+
diff --git a/vim/.config/nvim/lsp/luals.lua b/vim/.config/nvim/lsp/luals.lua
new file mode 100644
index 0000000..745f38a
--- /dev/null
+++ b/vim/.config/nvim/lsp/luals.lua
@@ -0,0 +1,5 @@
+return {
+ cmd = {'lua-language-server'},
+ filetypes = {'lua'},
+ root_markers = {'.luarc.json', '.luarc.jsonc'},
+}
diff --git a/vim/.config/nvim/lsp/pyright.lua b/vim/.config/nvim/lsp/pyright.lua
new file mode 100644
index 0000000..178bfde
--- /dev/null
+++ b/vim/.config/nvim/lsp/pyright.lua
@@ -0,0 +1,4 @@
+return {
+ cmd = { "pyright-langserver", "--stdio" },
+ filetypes = { "python" }
+}
diff --git a/vim/.config/nvim/lsp/rust_analyzer.lua b/vim/.config/nvim/lsp/rust_analyzer.lua
new file mode 100644
index 0000000..6187a15
--- /dev/null
+++ b/vim/.config/nvim/lsp/rust_analyzer.lua
@@ -0,0 +1,9 @@
+return {
+ cmd = { 'rust-analyzer' },
+ filetypes = { 'rust', 'rs' },
+ root_markers = {
+ 'cargo.toml',
+ '.git'
+ },
+}
+
diff --git a/vim/.config/nvim/lsp/superhtml.lua b/vim/.config/nvim/lsp/superhtml.lua
new file mode 100644
index 0000000..7e68b25
--- /dev/null
+++ b/vim/.config/nvim/lsp/superhtml.lua
@@ -0,0 +1,22 @@
+---@brief
+---
+--- https://github.com/kristoff-it/superhtml
+---
+--- HTML Language Server & Templating Language Library
+---
+--- This LSP is designed to tightly adhere to the HTML spec as well as enforcing
+--- some additional rules that ensure HTML clarity.
+---
+--- If you want to disable HTML support for another HTML LSP, add the following
+--- to your configuration:
+---
+--- ```lua
+--- vim.lsp.config('superhtml', {
+--- filetypes = { 'superhtml' }
+--- })
+--- ```
+return {
+ cmd = { 'superhtml', 'lsp' },
+ filetypes = { 'superhtml', 'html', "htmldjango" },
+ root_markers = { '.git' },
+}
diff --git a/vim/.config/nvim/lsp/tailwind-ls.lua b/vim/.config/nvim/lsp/tailwind-ls.lua
new file mode 100644
index 0000000..9ab35a8
--- /dev/null
+++ b/vim/.config/nvim/lsp/tailwind-ls.lua
@@ -0,0 +1,62 @@
+return {
+ cmd = { 'tailwindcss-language-server', '--stdio' },
+ filetypes = {
+ -- html
+ 'aspnetcorerazor',
+ 'astro',
+ 'astro-markdown',
+ 'blade',
+ 'clojure',
+ 'django-html',
+ 'htmldjango',
+ 'edge',
+ 'eelixir', -- vim ft
+ 'elixir',
+ 'ejs',
+ 'erb',
+ 'eruby', -- vim ft
+ 'gohtml',
+ 'gohtmltmpl',
+ 'haml',
+ 'handlebars',
+ 'hbs',
+ 'html',
+ 'htmlangular',
+ 'html-eex',
+ 'heex',
+ 'jade',
+ 'leaf',
+ 'liquid',
+ 'markdown',
+ 'mdx',
+ 'mustache',
+ 'njk',
+ 'nunjucks',
+ 'php',
+ 'razor',
+ 'slim',
+ 'twig',
+ -- css
+ 'css',
+ 'less',
+ 'postcss',
+ 'sass',
+ 'scss',
+ 'stylus',
+ 'sugarss',
+ -- js
+ 'javascript',
+ 'javascriptreact',
+ 'reason',
+ 'rescript',
+ 'typescript',
+ 'typescriptreact',
+ -- mixed
+ 'vue',
+ 'svelte',
+ 'templ',
+ },
+ root_markers = {
+ 'tailwind.config.js'
+ },
+}
diff --git a/vim/.config/nvim/lsp/zls.lua b/vim/.config/nvim/lsp/zls.lua
new file mode 100644
index 0000000..332c059
--- /dev/null
+++ b/vim/.config/nvim/lsp/zls.lua
@@ -0,0 +1,10 @@
+return {
+ cmd = { 'zls' },
+ filetypes = { 'zig' },
+ root_markers = {
+ 'zls.json',
+ 'build.zig',
+ '.git'
+ },
+}
+
diff --git a/vim/.config/nvim/lua/custom-lualine.lua b/vim/.config/nvim/lua/custom-lualine.lua
new file mode 100644
index 0000000..9bed3a6
--- /dev/null
+++ b/vim/.config/nvim/lua/custom-lualine.lua
@@ -0,0 +1,4 @@
+require('lualine').setup {
+ options = { theme = "solarized_dark" }
+}
+
diff --git a/vim/.config/nvim/lua/diagnostics.lua b/vim/.config/nvim/lua/diagnostics.lua
new file mode 100644
index 0000000..55dede6
--- /dev/null
+++ b/vim/.config/nvim/lua/diagnostics.lua
@@ -0,0 +1,2 @@
+vim.diagnostic.config({ virtual_text = true })
+
diff --git a/vim/.config/nvim/lua/native-lsp.lua b/vim/.config/nvim/lua/native-lsp.lua
new file mode 100644
index 0000000..9bc4856
--- /dev/null
+++ b/vim/.config/nvim/lua/native-lsp.lua
@@ -0,0 +1,48 @@
+vim.lsp.config('luals', {
+ on_attach = function()
+ print('luals is now active in this file')
+ end,
+})
+if not string.match(vim.g.hostname, "cs.purdue.edu") then
+ vim.lsp.enable("luals")
+end
+
+
+vim.lsp.config('pyright', {
+ on_attach = function()
+ print('pyright is now active in this file')
+ end,
+})
+
+vim.lsp.enable("pyright")
+
+
+vim.lsp.config('clangd', {
+ on_attach = function()
+ print('clangd is now active in this file')
+ end,
+})
+
+vim.lsp.enable("clangd")
+
+vim.lsp.config('tailwind-ls', {
+ on_attach = function()
+ print('tailwind-ls is now active in this file')
+ end,
+})
+
+vim.lsp.enable("tailwind-ls")
+
+vim.lsp.config('zls', {
+ on_attach = function()
+ print('zls is now active in this file')
+ end,
+})
+
+vim.lsp.enable("zls")
+
+-- https://lsp-zero.netlify.app/blog/lsp-client-features.html
+
+vim.opt.completeopt = {'menu', 'menuone', 'noselect', 'noinsert'}
+vim.opt.shortmess:append('c')
+
diff --git a/vim/.config/nvim/lua/plugins/blink_config.lua b/vim/.config/nvim/lua/plugins/blink_config.lua
new file mode 100644
index 0000000..3c8f4cb
--- /dev/null
+++ b/vim/.config/nvim/lua/plugins/blink_config.lua
@@ -0,0 +1,11 @@
+require("blink.cmp").setup({
+ fuzzy = {
+ implementation = "prefer_rust",
+ prebuilt_binaries = {
+ download = true,
+ force_version = 'v1.2.0',
+ },
+ },
+ keymap = { preset = "enter" },
+})
+
diff --git a/vim/.config/nvim/lua/plugins/init.lua b/vim/.config/nvim/lua/plugins/init.lua
new file mode 100644
index 0000000..c6a418d
--- /dev/null
+++ b/vim/.config/nvim/lua/plugins/init.lua
@@ -0,0 +1,157 @@
+vim.cmd [[packadd packer.nvim]]
+
+local ensure_packer = function()
+ local fn = vim.fn
+ local install_path = fn.stdpath('data')..'/site/pack/packer/start/packer.nvim'
+ if fn.empty(fn.glob(install_path)) > 0 then
+ fn.system({'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path})
+ vim.cmd [[packadd packer.nvim]]
+ return true
+ end
+ return false
+end
+
+local packer_bootstrap = ensure_packer()
+
+return require('packer').startup(function(use)
+ use 'wbthomason/packer.nvim'
+
+
+
+ use {
+ 'maxmx03/solarized.nvim',
+ config = function()
+ vim.o.background = 'dark'
+ ---@type solarized
+ local solarized = require('solarized')
+ vim.o.termguicolors = true
+ vim.o.background = 'dark'
+ solarized.setup({})
+ vim.cmd.colorscheme 'solarized'
+ end
+ }
+ use {
+ 'nvim-telescope/telescope.nvim', tag = '0.1.x',
+ requires = { {'nvim-lua/plenary.nvim'} }
+ }
+
+ use {
+ 'nvim-treesitter/nvim-treesitter',
+ config = function() require("plugins/ts") end
+ }
+
+ use 'mbbill/undotree'
+ use 'mfussenegger/nvim-lint'
+ use {
+ 'nvim-lualine/lualine.nvim',
+ requires = { 'nvim-tree/nvim-web-devicons', opt = true },
+ config = function() require('plugins/lualine-config') end
+ }
+ use {
+ 'm4xshen/autoclose.nvim',
+ config = function() require("autoclose").setup() end
+ }
+
+ use {
+ 'CRAG666/betterTerm.nvim',
+ config = function() require('betterTerm').setup() end
+ }
+
+ use {
+ 'anurag3301/nvim-platformio.lua',
+ requires = {
+ {'akinsho/nvim-toggleterm.lua'},
+ {'nvim-telescope/telescope.nvim'},
+ {'nvim-lua/plenary.nvim'},
+ },
+ config = function()
+ if not vim.g.is_purdue then
+ require('platformio').setup({
+ lsp = "clangd" --default: ccls, other option: clangd
+ -- If you pick clangd, it also creates compile_commands.json
+ })
+ end
+ end
+ }
+
+ use {
+ "chentoast/marks.nvim",
+ config = function() require('plugins/marks-config') end
+ }
+
+ use {
+ "nvim-neo-tree/neo-tree.nvim",
+ branch = "v3.x",
+ requires = {
+ "nvim-lua/plenary.nvim",
+ "nvim-tree/nvim-web-devicons", -- not strictly required, but recommended
+ "MunifTanjim/nui.nvim",
+ -- "3rd/image.nvim", -- Optional image support in preview window: See `# Preview Mode` for more information
+ }
+ }
+
+
+ use { "nvim-tree/nvim-web-devicons" }
+ use { "MunifTanjim/nui.nvim" }
+
+ use { 'rafamadriz/friendly-snippets' }
+ use {
+ 'saghen/blink.cmp',
+ run = 'cargo build --release',
+ config = function()
+ require("plugins/blink_config")
+ end
+ }
+
+ use {
+ 'f-person/git-blame.nvim',
+ config = function ()
+ require("gitblame").setup {
+ gitblame_delay = 1
+ }
+ end
+ }
+
+ use {
+ 'mrcjkb/rustaceanvim',
+ config = function() require('plugins/rust-config') end
+ }
+ use {
+ 'pwntester/octo.nvim',
+ requires = {
+ 'nvim-lua/plenary.nvim',
+ 'nvim-telescope/telescope.nvim',
+ -- OR 'ibhagwan/fzf-lua',
+ -- OR 'folke/snacks.nvim',
+ 'nvim-tree/nvim-web-devicons',
+ },
+ config = function ()
+ require"octo".setup()
+ end
+ }
+
+ use {
+ "NeogitOrg/neogit",
+ config = function ()
+ require("neogit").setup {}
+ end
+ }
+
+ use "mfussenegger/nvim-dap"
+ use 'theHamsta/nvim-dap-virtual-text'
+ use { "rcarriga/nvim-dap-ui", requires = {"mfussenegger/nvim-dap", "nvim-neotest/nvim-nio"} }
+
+ use 'wakatime/vim-wakatime'
+
+ use { "geigerzaehler/tree-sitter-jinja2" }
+
+ use "echasnovski/mini.base16"
+
+
+ ------------------------
+
+ if packer_bootstrap then
+ require('packer').sync()
+ end
+end)
+
diff --git a/vim/.config/nvim/lua/plugins/lualine-config.lua b/vim/.config/nvim/lua/plugins/lualine-config.lua
new file mode 100644
index 0000000..f8a6442
--- /dev/null
+++ b/vim/.config/nvim/lua/plugins/lualine-config.lua
@@ -0,0 +1,4 @@
+require('lualine').setup {
+ options = { theme = "solarized" }
+}
+
diff --git a/vim/.config/nvim/lua/plugins/marks-config.lua b/vim/.config/nvim/lua/plugins/marks-config.lua
new file mode 100644
index 0000000..d1b4c82
--- /dev/null
+++ b/vim/.config/nvim/lua/plugins/marks-config.lua
@@ -0,0 +1,36 @@
+require'marks'.setup {
+ -- whether to map keybinds or not. default true
+ default_mappings = true,
+ -- which builtin marks to show. default {}
+ builtin_marks = { ".", "<", ">", "^" },
+ -- whether movements cycle back to the beginning/end of buffer. default true
+ cyclic = true,
+ -- whether the shada file is updated after modifying uppercase marks. default false
+ force_write_shada = false,
+ -- how often (in ms) to redraw signs/recompute mark positions.
+ -- higher values will have better performance but may cause visual lag,
+ -- while lower values may cause performance penalties. default 150.
+ refresh_interval = 250,
+ -- sign priorities for each type of mark - builtin marks, uppercase marks, lowercase
+ -- marks, and bookmarks.
+ -- can be either a table with all/none of the keys, or a single number, in which case
+ -- the priority applies to all marks.
+ -- default 10.
+ sign_priority = { lower=10, upper=15, builtin=8, bookmark=20 },
+ -- disables mark tracking for specific filetypes. default {}
+ excluded_filetypes = {},
+ -- disables mark tracking for specific buftypes. default {}
+ excluded_buftypes = {},
+ -- marks.nvim allows you to configure up to 10 bookmark groups, each with its own
+ -- sign/virttext. Bookmarks can be used to group together positions and quickly move
+ -- across multiple buffers. default sign is '!@#$%^&*()' (from 0 to 9), and
+ -- default virt_text is "".
+ bookmark_0 = {
+ sign = "âš‘",
+ virt_text = "hello world",
+ -- explicitly prompt for a virtual line annotation when setting a bookmark from this group.
+ -- defaults to false.
+ annotate = false,
+ },
+ mappings = {}
+}
diff --git a/vim/.config/nvim/lua/plugins/rust-config.lua b/vim/.config/nvim/lua/plugins/rust-config.lua
new file mode 100644
index 0000000..e83007c
--- /dev/null
+++ b/vim/.config/nvim/lua/plugins/rust-config.lua
@@ -0,0 +1,30 @@
+local bufnr = vim.api.nvim_get_current_buf()
+vim.keymap.set(
+ "n",
+ "<leader>a",
+ function()
+ vim.cmd.RustLsp('codeAction') -- supports rust-analyzer's grouping
+ -- or vim.lsp.buf.codeAction() if you don't want grouping.
+ end,
+ { silent = true, buffer = bufnr }
+)
+vim.keymap.set(
+ "n",
+ "K", -- Override Neovim's built-in hover keymap with rustaceanvim's hover actions
+ function()
+ vim.cmd.RustLsp({'hover', 'actions'})
+ end,
+ { silent = true, buffer = bufnr }
+)
+
+vim.g.rustaceanvim = {
+ server = {
+ settings = {
+ ["rust-analyzer"] = {
+ checkOnSave = {
+ command = "clippy",
+ },
+ },
+ },
+ },
+}
diff --git a/vim/.config/nvim/lua/plugins/ts.lua b/vim/.config/nvim/lua/plugins/ts.lua
new file mode 100644
index 0000000..5f1b8b0
--- /dev/null
+++ b/vim/.config/nvim/lua/plugins/ts.lua
@@ -0,0 +1,41 @@
+require'nvim-treesitter.configs'.setup {
+ -- A list of parser names, or "all" (the listed parsers MUST always be installed)
+ ensure_installed = { "c", "lua", "vim", "vimdoc", "query", "markdown", "markdown_inline" },
+
+ -- Install parsers synchronously (only applied to `ensure_installed`)
+ sync_install = false,
+
+ -- Automatically install missing parsers when entering buffer
+ -- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally
+ auto_install = true,
+
+ -- List of parsers to ignore installing (or "all")
+ -- ignore_install = { "javascript" },
+
+ ---- If you need to change the installation directory of the parsers (see -> Advanced Setup)
+ -- parser_install_dir = "/some/path/to/store/parsers", -- Remember to run vim.opt.runtimepath:append("/some/path/to/store/parsers")!
+
+ highlight = {
+ enable = true,
+
+ -- NOTE: these are the names of the parsers and not the filetype. (for example if you want to
+ -- disable highlighting for the `tex` filetype, you need to include `latex` in this list as this is
+ -- the name of the parser)
+ -- list of language that will be disabled
+ -- disable = { "c", "rust" },
+ -- Or use a function for more flexibility, e.g. to disable slow treesitter highlight for large files
+ disable = function(lang, buf)
+ local max_filesize = 100 * 1024 -- 100 KB
+ local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf))
+ if ok and stats and stats.size > max_filesize then
+ return true
+ end
+ end,
+
+ -- Setting this to true will run `:h syntax` and tree-sitter at the same time.
+ -- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
+ -- Using this option may slow down your editor, and you may see some duplicate highlights.
+ -- Instead of true it can also be a list of languages
+ additional_vim_regex_highlighting = false,
+ },
+}
diff --git a/vim/.config/nvim/lua/remap.lua b/vim/.config/nvim/lua/remap.lua
new file mode 100644
index 0000000..c2cefa7
--- /dev/null
+++ b/vim/.config/nvim/lua/remap.lua
@@ -0,0 +1,77 @@
+vim.g.mapleader = "\\"
+vim.keymap.set("n", "<leader>\\", ":nohlsearch<CR>")
+
+vim.keymap.set("n", "<leader>vv", ":vsplit<CR>")
+vim.keymap.set("n", "<leader>vt", ":tabnew<CR>")
+
+-- easier to move windows
+vim.keymap.set("n", "`h", "<C-w>h")
+vim.keymap.set("n", "`j", "<C-w>j")
+vim.keymap.set("n", "`k", "<C-w>k")
+vim.keymap.set("n", "`l", "<C-w>l")
+
+vim.keymap.set("n", "<leader>qr", vim.lsp.buf.rename)
+vim.keymap.set("n", "<leader>qf", vim.lsp.buf.format)
+vim.keymap.set("n", "<leader>dd", vim.diagnostic.open_float)
+
+-------- PLUGINS -------
+
+-- Telescope
+local ts_builtins = require('telescope.builtin')
+vim.keymap.set('n', '<leader>ff', ts_builtins.find_files, { desc = 'Telescope find files' })
+vim.keymap.set('n', '<leader>fg', ts_builtins.git_files, { desc = 'Telescope find git files' })
+vim.keymap.set('n', '<leader>fb', ts_builtins.buffers, { desc = 'Telescope buffers' })
+vim.keymap.set('n', '<leader>fh', ts_builtins.help_tags, { desc = 'Telescope help tags' })
+vim.keymap.set('n', '<leader>fs', ts_builtins.lsp_workspace_symbols, { desc = 'Telescope find symbols' })
+vim.keymap.set('n', '<leader>fts', ts_builtins.treesitter, { desc = 'Telescope find treesitter' })
+vim.keymap.set('n', '<leader>fd', ts_builtins.lsp_definitions, { desc = 'Telescope find definition' })
+vim.keymap.set('n', '<leader>ftd', ts_builtins.lsp_type_definitions, { desc = 'Telescope find type definition' })
+
+-- Undo Tree
+vim.keymap.set('n', '<leader>u', vim.cmd.UndotreeToggle)
+
+-- Better Term
+
+local betterTerm = require('betterTerm')
+-- toggle firts term
+vim.keymap.set({"n", "t"}, "<leader>tt", betterTerm.open, { desc = "Open terminal"})
+-- Select term focus
+-- vim.keymap.set({"n"}, "<leader>tf", betterTerm.select, { desc = "Select terminal"})
+-- Create new term
+local current = 2
+vim.keymap.set(
+ {"n"}, "<leader>tn",
+ function()
+ betterTerm.open(current)
+ current = current + 1
+ end,
+ { desc = "New terminal"}
+)
+
+-- Neotree
+
+local ntc = require('neo-tree.command')
+vim.keymap.set('n', '<C-b>', function()
+ local reveal_file = vim.fn.expand('%:p')
+ if (reveal_file == '') then
+ reveal_file = vim.fn.getcwd()
+ else
+ local f = io.open(reveal_file, "r")
+ if (f) then
+ f.close(f)
+ else
+ reveal_file = vim.fn.getcwd()
+ end
+ end
+ ntc.execute({
+ action = "focus", -- OPTIONAL, this is the default value
+ source = "filesystem", -- OPTIONAL, this is the default value
+ position = "right", -- OPTIONAL, this is the default value
+ reveal_file = reveal_file, -- path to file or folder to reveal
+ reveal_force_cwd = true, -- change cwd without asking if needed
+ toggle = true,
+ }) end,
+ { desc = "Show Sidebar" }
+)
+
+
diff --git a/vim/.config/nvim/lua/standard-lint.lua b/vim/.config/nvim/lua/standard-lint.lua
new file mode 100644
index 0000000..b46004e
--- /dev/null
+++ b/vim/.config/nvim/lua/standard-lint.lua
@@ -0,0 +1,12 @@
+vim.api.nvim_create_autocmd({ "BufEnter", "BufWritePost", "InsertLeave", "TextChanged" }, {
+ callback = function()
+
+ -- try_lint without arguments runs the linters defined in `linters_by_ft`
+ -- for the current filetype
+ require("lint").try_lint()
+
+ -- You can call `try_lint` with a linter name or a list of names to always
+ -- run specific linters, independent of the `linters_by_ft` configuration
+ -- require("lint").try_lint("cspell")
+ end,
+})
diff --git a/vim/.config/nvim/lua/westwood-lint.lua b/vim/.config/nvim/lua/westwood-lint.lua
new file mode 100644
index 0000000..0ffc8d8
--- /dev/null
+++ b/vim/.config/nvim/lua/westwood-lint.lua
@@ -0,0 +1,20 @@
+local lint = require("lint")
+
+local errorformat = "%WWARNING: %m,%Z%\\s%\\s%\\s%\\s%\\s%\\s%\\s%\\s%\\sat (stdin) from line %l column %c to line %e column %k"
+lint.linters.westwood = {
+ cmd = '/homes/kkasad/share/westwood',
+ stdin = true,
+ args = {'-f', 'machine', '-'},
+ stream = both,
+ ignore_exitcode = false,
+ env = nil,
+ parser = require('lint.parser').from_errorformat(errorformat)
+}
+
+lint.linters_by_ft.c = {"westwood", "clangtidy"}
+lint.linters_by_ft.cpp = {"westwood"}
+vim.list_extend(lint.linters_by_ft.c, { "westwood", "clangtidy" })
+vim.list_extend(lint.linters_by_ft.cpp, { "westwood" })
+
+local ns = lint.get_namespace("westwood")
+vim.diagnostic.config({ virtual_text = true }, ns)
diff --git a/vim/.config/nvim/plugin/packer_compiled.lua b/vim/.config/nvim/plugin/packer_compiled.lua
new file mode 100644
index 0000000..24e191b
--- /dev/null
+++ b/vim/.config/nvim/plugin/packer_compiled.lua
@@ -0,0 +1,299 @@
+-- Automatically generated packer.nvim plugin loader code
+
+if vim.api.nvim_call_function('has', {'nvim-0.5'}) ~= 1 then
+ vim.api.nvim_command('echohl WarningMsg | echom "Invalid Neovim version for packer.nvim! | echohl None"')
+ return
+end
+
+vim.api.nvim_command('packadd packer.nvim')
+
+local no_errors, error_msg = pcall(function()
+
+_G._packer = _G._packer or {}
+_G._packer.inside_compile = true
+
+local time
+local profile_info
+local should_profile = false
+if should_profile then
+ local hrtime = vim.loop.hrtime
+ profile_info = {}
+ time = function(chunk, start)
+ if start then
+ profile_info[chunk] = hrtime()
+ else
+ profile_info[chunk] = (hrtime() - profile_info[chunk]) / 1e6
+ end
+ end
+else
+ time = function(chunk, start) end
+end
+
+local function save_profiles(threshold)
+ local sorted_times = {}
+ for chunk_name, time_taken in pairs(profile_info) do
+ sorted_times[#sorted_times + 1] = {chunk_name, time_taken}
+ end
+ table.sort(sorted_times, function(a, b) return a[2] > b[2] end)
+ local results = {}
+ for i, elem in ipairs(sorted_times) do
+ if not threshold or threshold and elem[2] > threshold then
+ results[i] = elem[1] .. ' took ' .. elem[2] .. 'ms'
+ end
+ end
+ if threshold then
+ table.insert(results, '(Only showing plugins that took longer than ' .. threshold .. ' ms ' .. 'to load)')
+ end
+
+ _G._packer.profile_output = results
+end
+
+time([[Luarocks path setup]], true)
+local package_path_str = "/Users/scie/.cache/nvim/packer_hererocks/2.1.1741730670/share/lua/5.1/?.lua;/Users/scie/.cache/nvim/packer_hererocks/2.1.1741730670/share/lua/5.1/?/init.lua;/Users/scie/.cache/nvim/packer_hererocks/2.1.1741730670/lib/luarocks/rocks-5.1/?.lua;/Users/scie/.cache/nvim/packer_hererocks/2.1.1741730670/lib/luarocks/rocks-5.1/?/init.lua"
+local install_cpath_pattern = "/Users/scie/.cache/nvim/packer_hererocks/2.1.1741730670/lib/lua/5.1/?.so"
+if not string.find(package.path, package_path_str, 1, true) then
+ package.path = package.path .. ';' .. package_path_str
+end
+
+if not string.find(package.cpath, install_cpath_pattern, 1, true) then
+ package.cpath = package.cpath .. ';' .. install_cpath_pattern
+end
+
+time([[Luarocks path setup]], false)
+time([[try_loadstring definition]], true)
+local function try_loadstring(s, component, name)
+ local success, result = pcall(loadstring(s), name, _G.packer_plugins[name])
+ if not success then
+ vim.schedule(function()
+ vim.api.nvim_notify('packer.nvim: Error running ' .. component .. ' for ' .. name .. ': ' .. result, vim.log.levels.ERROR, {})
+ end)
+ end
+ return result
+end
+
+time([[try_loadstring definition]], false)
+time([[Defining packer_plugins]], true)
+_G.packer_plugins = {
+ ["autoclose.nvim"] = {
+ config = { "\27LJ\2\n7\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\14autoclose\frequire\0" },
+ loaded = true,
+ path = "/Users/scie/.local/share/nvim/site/pack/packer/start/autoclose.nvim",
+ url = "https://github.com/m4xshen/autoclose.nvim"
+ },
+ ["betterTerm.nvim"] = {
+ config = { "\27LJ\2\n8\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\15betterTerm\frequire\0" },
+ loaded = true,
+ path = "/Users/scie/.local/share/nvim/site/pack/packer/start/betterTerm.nvim",
+ url = "https://github.com/CRAG666/betterTerm.nvim"
+ },
+ ["blink.cmp"] = {
+ config = { "\27LJ\2\n4\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\25plugins/blink_config\frequire\0" },
+ loaded = true,
+ path = "/Users/scie/.local/share/nvim/site/pack/packer/start/blink.cmp",
+ url = "https://github.com/saghen/blink.cmp"
+ },
+ ["friendly-snippets"] = {
+ loaded = true,
+ path = "/Users/scie/.local/share/nvim/site/pack/packer/start/friendly-snippets",
+ url = "https://github.com/rafamadriz/friendly-snippets"
+ },
+ ["git-blame.nvim"] = {
+ config = { "\27LJ\2\nN\0\0\3\0\4\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0005\2\3\0B\0\2\1K\0\1\0\1\0\1\19gitblame_delay\3\1\nsetup\rgitblame\frequire\0" },
+ loaded = true,
+ path = "/Users/scie/.local/share/nvim/site/pack/packer/start/git-blame.nvim",
+ url = "https://github.com/f-person/git-blame.nvim"
+ },
+ ["lualine.nvim"] = {
+ config = { "\27LJ\2\n6\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\27plugins/lualine-config\frequire\0" },
+ loaded = true,
+ path = "/Users/scie/.local/share/nvim/site/pack/packer/start/lualine.nvim",
+ url = "https://github.com/nvim-lualine/lualine.nvim"
+ },
+ ["marks.nvim"] = {
+ config = { "\27LJ\2\n4\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\25plugins/marks-config\frequire\0" },
+ loaded = true,
+ path = "/Users/scie/.local/share/nvim/site/pack/packer/start/marks.nvim",
+ url = "https://github.com/chentoast/marks.nvim"
+ },
+ ["mini.base16"] = {
+ loaded = true,
+ path = "/Users/scie/.local/share/nvim/site/pack/packer/start/mini.base16",
+ url = "https://github.com/echasnovski/mini.base16"
+ },
+ ["neo-tree.nvim"] = {
+ loaded = true,
+ path = "/Users/scie/.local/share/nvim/site/pack/packer/start/neo-tree.nvim",
+ url = "https://github.com/nvim-neo-tree/neo-tree.nvim"
+ },
+ neogit = {
+ config = { "\27LJ\2\n8\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\vneogit\frequire\0" },
+ loaded = true,
+ path = "/Users/scie/.local/share/nvim/site/pack/packer/start/neogit",
+ url = "https://github.com/NeogitOrg/neogit"
+ },
+ ["nui.nvim"] = {
+ loaded = true,
+ path = "/Users/scie/.local/share/nvim/site/pack/packer/start/nui.nvim",
+ url = "https://github.com/MunifTanjim/nui.nvim"
+ },
+ ["nvim-dap"] = {
+ loaded = true,
+ path = "/Users/scie/.local/share/nvim/site/pack/packer/start/nvim-dap",
+ url = "https://github.com/mfussenegger/nvim-dap"
+ },
+ ["nvim-dap-ui"] = {
+ loaded = true,
+ path = "/Users/scie/.local/share/nvim/site/pack/packer/start/nvim-dap-ui",
+ url = "https://github.com/rcarriga/nvim-dap-ui"
+ },
+ ["nvim-dap-virtual-text"] = {
+ loaded = true,
+ path = "/Users/scie/.local/share/nvim/site/pack/packer/start/nvim-dap-virtual-text",
+ url = "https://github.com/theHamsta/nvim-dap-virtual-text"
+ },
+ ["nvim-lint"] = {
+ loaded = true,
+ path = "/Users/scie/.local/share/nvim/site/pack/packer/start/nvim-lint",
+ url = "https://github.com/mfussenegger/nvim-lint"
+ },
+ ["nvim-nio"] = {
+ loaded = true,
+ path = "/Users/scie/.local/share/nvim/site/pack/packer/start/nvim-nio",
+ url = "https://github.com/nvim-neotest/nvim-nio"
+ },
+ ["nvim-platformio.lua"] = {
+ config = { "\27LJ\2\nn\0\0\3\0\a\0\f6\0\0\0009\0\1\0009\0\2\0\14\0\0\0X\0\6€6\0\3\0'\2\4\0B\0\2\0029\0\5\0005\2\6\0B\0\2\1K\0\1\0\1\0\1\blsp\vclangd\nsetup\15platformio\frequire\14is_purdue\6g\bvim\0" },
+ loaded = true,
+ path = "/Users/scie/.local/share/nvim/site/pack/packer/start/nvim-platformio.lua",
+ url = "https://github.com/anurag3301/nvim-platformio.lua"
+ },
+ ["nvim-toggleterm.lua"] = {
+ loaded = true,
+ path = "/Users/scie/.local/share/nvim/site/pack/packer/start/nvim-toggleterm.lua",
+ url = "https://github.com/akinsho/nvim-toggleterm.lua"
+ },
+ ["nvim-treesitter"] = {
+ config = { "\27LJ\2\n*\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\15plugins/ts\frequire\0" },
+ loaded = true,
+ path = "/Users/scie/.local/share/nvim/site/pack/packer/start/nvim-treesitter",
+ url = "https://github.com/nvim-treesitter/nvim-treesitter"
+ },
+ ["nvim-web-devicons"] = {
+ loaded = true,
+ path = "/Users/scie/.local/share/nvim/site/pack/packer/start/nvim-web-devicons",
+ url = "https://github.com/nvim-tree/nvim-web-devicons"
+ },
+ ["octo.nvim"] = {
+ config = { "\27LJ\2\n2\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\tocto\frequire\0" },
+ loaded = true,
+ path = "/Users/scie/.local/share/nvim/site/pack/packer/start/octo.nvim",
+ url = "https://github.com/pwntester/octo.nvim"
+ },
+ ["packer.nvim"] = {
+ loaded = true,
+ path = "/Users/scie/.local/share/nvim/site/pack/packer/start/packer.nvim",
+ url = "https://github.com/wbthomason/packer.nvim"
+ },
+ ["plenary.nvim"] = {
+ loaded = true,
+ path = "/Users/scie/.local/share/nvim/site/pack/packer/start/plenary.nvim",
+ url = "https://github.com/nvim-lua/plenary.nvim"
+ },
+ rustaceanvim = {
+ config = { "\27LJ\2\n3\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\24plugins/rust-config\frequire\0" },
+ loaded = true,
+ path = "/Users/scie/.local/share/nvim/site/pack/packer/start/rustaceanvim",
+ url = "https://github.com/mrcjkb/rustaceanvim"
+ },
+ ["solarized.nvim"] = {
+ config = { "\27LJ\2\n³\1\0\0\4\0\n\0\0246\0\0\0009\0\1\0'\1\3\0=\1\2\0006\0\4\0'\2\5\0B\0\2\0026\1\0\0009\1\1\1+\2\2\0=\2\6\0016\1\0\0009\1\1\1'\2\3\0=\2\2\0019\1\a\0004\3\0\0B\1\2\0016\1\0\0009\1\b\0019\1\t\1'\3\5\0B\1\2\1K\0\1\0\16colorscheme\bcmd\nsetup\18termguicolors\14solarized\frequire\tdark\15background\6o\bvim\0" },
+ loaded = true,
+ path = "/Users/scie/.local/share/nvim/site/pack/packer/start/solarized.nvim",
+ url = "https://github.com/maxmx03/solarized.nvim"
+ },
+ ["telescope.nvim"] = {
+ loaded = true,
+ path = "/Users/scie/.local/share/nvim/site/pack/packer/start/telescope.nvim",
+ url = "https://github.com/nvim-telescope/telescope.nvim"
+ },
+ ["tree-sitter-jinja2"] = {
+ loaded = true,
+ path = "/Users/scie/.local/share/nvim/site/pack/packer/start/tree-sitter-jinja2",
+ url = "https://github.com/geigerzaehler/tree-sitter-jinja2"
+ },
+ undotree = {
+ loaded = true,
+ path = "/Users/scie/.local/share/nvim/site/pack/packer/start/undotree",
+ url = "https://github.com/mbbill/undotree"
+ },
+ ["vim-wakatime"] = {
+ loaded = true,
+ path = "/Users/scie/.local/share/nvim/site/pack/packer/start/vim-wakatime",
+ url = "https://github.com/wakatime/vim-wakatime"
+ }
+}
+
+time([[Defining packer_plugins]], false)
+-- Config for: nvim-platformio.lua
+time([[Config for nvim-platformio.lua]], true)
+try_loadstring("\27LJ\2\nn\0\0\3\0\a\0\f6\0\0\0009\0\1\0009\0\2\0\14\0\0\0X\0\6€6\0\3\0'\2\4\0B\0\2\0029\0\5\0005\2\6\0B\0\2\1K\0\1\0\1\0\1\blsp\vclangd\nsetup\15platformio\frequire\14is_purdue\6g\bvim\0", "config", "nvim-platformio.lua")
+time([[Config for nvim-platformio.lua]], false)
+-- Config for: neogit
+time([[Config for neogit]], true)
+try_loadstring("\27LJ\2\n8\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\vneogit\frequire\0", "config", "neogit")
+time([[Config for neogit]], false)
+-- Config for: lualine.nvim
+time([[Config for lualine.nvim]], true)
+try_loadstring("\27LJ\2\n6\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\27plugins/lualine-config\frequire\0", "config", "lualine.nvim")
+time([[Config for lualine.nvim]], false)
+-- Config for: betterTerm.nvim
+time([[Config for betterTerm.nvim]], true)
+try_loadstring("\27LJ\2\n8\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\15betterTerm\frequire\0", "config", "betterTerm.nvim")
+time([[Config for betterTerm.nvim]], false)
+-- Config for: marks.nvim
+time([[Config for marks.nvim]], true)
+try_loadstring("\27LJ\2\n4\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\25plugins/marks-config\frequire\0", "config", "marks.nvim")
+time([[Config for marks.nvim]], false)
+-- Config for: blink.cmp
+time([[Config for blink.cmp]], true)
+try_loadstring("\27LJ\2\n4\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\25plugins/blink_config\frequire\0", "config", "blink.cmp")
+time([[Config for blink.cmp]], false)
+-- Config for: octo.nvim
+time([[Config for octo.nvim]], true)
+try_loadstring("\27LJ\2\n2\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\tocto\frequire\0", "config", "octo.nvim")
+time([[Config for octo.nvim]], false)
+-- Config for: solarized.nvim
+time([[Config for solarized.nvim]], true)
+try_loadstring("\27LJ\2\n³\1\0\0\4\0\n\0\0246\0\0\0009\0\1\0'\1\3\0=\1\2\0006\0\4\0'\2\5\0B\0\2\0026\1\0\0009\1\1\1+\2\2\0=\2\6\0016\1\0\0009\1\1\1'\2\3\0=\2\2\0019\1\a\0004\3\0\0B\1\2\0016\1\0\0009\1\b\0019\1\t\1'\3\5\0B\1\2\1K\0\1\0\16colorscheme\bcmd\nsetup\18termguicolors\14solarized\frequire\tdark\15background\6o\bvim\0", "config", "solarized.nvim")
+time([[Config for solarized.nvim]], false)
+-- Config for: rustaceanvim
+time([[Config for rustaceanvim]], true)
+try_loadstring("\27LJ\2\n3\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\24plugins/rust-config\frequire\0", "config", "rustaceanvim")
+time([[Config for rustaceanvim]], false)
+-- Config for: nvim-treesitter
+time([[Config for nvim-treesitter]], true)
+try_loadstring("\27LJ\2\n*\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\15plugins/ts\frequire\0", "config", "nvim-treesitter")
+time([[Config for nvim-treesitter]], false)
+-- Config for: git-blame.nvim
+time([[Config for git-blame.nvim]], true)
+try_loadstring("\27LJ\2\nN\0\0\3\0\4\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0005\2\3\0B\0\2\1K\0\1\0\1\0\1\19gitblame_delay\3\1\nsetup\rgitblame\frequire\0", "config", "git-blame.nvim")
+time([[Config for git-blame.nvim]], false)
+-- Config for: autoclose.nvim
+time([[Config for autoclose.nvim]], true)
+try_loadstring("\27LJ\2\n7\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\14autoclose\frequire\0", "config", "autoclose.nvim")
+time([[Config for autoclose.nvim]], false)
+
+_G._packer.inside_compile = false
+if _G._packer.needs_bufread == true then
+ vim.cmd("doautocmd BufRead")
+end
+_G._packer.needs_bufread = false
+
+if should_profile then save_profiles() end
+
+end)
+
+if not no_errors then
+ error_msg = error_msg:gsub('"', '\\"')
+ vim.api.nvim_command('echohl ErrorMsg | echom "Error in packer_compiled: '..error_msg..'" | echom "Please check your config for correctness" | echohl None')
+end
diff --git a/vim/.vim/settings.vim b/vim/.vim/settings.vim
new file mode 100644
index 0000000..9faceda
--- /dev/null
+++ b/vim/.vim/settings.vim
@@ -0,0 +1,30 @@
+filetype on
+filetype plugin on
+filetype indent on
+syntax on
+set number
+set cursorline
+set cursorcolumn
+set clipboard=unnamedplus
+set tabstop=2
+set expandtab
+set softtabstop=2
+set shiftwidth=2
+set cc=120
+set scrolloff=10
+set nowrap
+set incsearch
+set ignorecase
+set smartcase
+set showcmd
+set showmode
+set showmatch
+set hlsearch
+set history=1000
+set splitright
+
+if version >= 703
+ set undodir=~/.vim/backup
+ set undofile
+ set undoreload=10000
+endif
diff --git a/vim/.vimrc b/vim/.vimrc
new file mode 100644
index 0000000..83af16a
--- /dev/null
+++ b/vim/.vimrc
@@ -0,0 +1,10 @@
+" Basic vimrc if i ever need compatibility with normal vim
+
+source ~/.vim/settings.vim
+
+
+if version >= 703
+ set undodir=~/.vim/backup/vimundo
+ set undofile
+ set undoreload=10000
+endif