commit 74e728cc0cd957b85d754d38fc5aabfbbeb7aa57 Author: Evan Date: Thu Nov 20 23:37:46 2025 -0600 initial neovim config diff --git a/init.lua b/init.lua new file mode 100644 index 0000000..7d86b80 --- /dev/null +++ b/init.lua @@ -0,0 +1,49 @@ +vim.cmd("set ww=<,>,[,],h,l") +vim.cmd("colorscheme slate") +vim.cmd("set number") +vim.cmd("set ruler") + +vim.deprecate = function() end + +-- Bootstrap lazy.nvim +local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" +if not vim.loop.fs_stat(lazypath) then + vim.fn.system({ + "git", + "clone", + "--filter=blob:none", + "https://github.com/folke/lazy.nvim.git", + lazypath, + }) +end +vim.opt.rtp:prepend(lazypath) + +require("lazy").setup({ + -- Better syntax highlighting + { + "nvim-treesitter/nvim-treesitter", + build = ":TSUpdate", + }, + + -- Easy LSP config (works with pyright) + { + "neovim/nvim-lspconfig", + }, +}) + +local lspconfig = require("lspconfig") +lspconfig.pyright.setup({}) + +require("nvim-treesitter.configs").setup({ + auto_install = true, + highlight = { + enable = true, + }, +}) + +vim.keymap.set('n', ' ', vim.lsp.buf.hover, {}) +vim.keymap.set('n', 'gd', vim.lsp.buf.definition, {}) +vim.keymap.set('n', 'cd', vim.lsp.buf.rename, {}) +vim.keymap.set('n', 'g.', vim.lsp.buf.code_action, {}) +vim.keymap.set("n", "e", vim.diagnostic.open_float) + diff --git a/lazy-lock.json b/lazy-lock.json new file mode 100644 index 0000000..79448dc --- /dev/null +++ b/lazy-lock.json @@ -0,0 +1,5 @@ +{ + "lazy.nvim": { "branch": "main", "commit": "85c7ff3711b730b4030d03144f6db6375044ae82" }, + "nvim-lspconfig": { "branch": "master", "commit": "e0fae251f8459940331960106d4bd9457cec23de" }, + "nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" } +} diff --git a/pack/nvim/start/nvim-lspconfig b/pack/nvim/start/nvim-lspconfig new file mode 160000 index 0000000..03bc581 --- /dev/null +++ b/pack/nvim/start/nvim-lspconfig @@ -0,0 +1 @@ +Subproject commit 03bc581e05e81d33808b42b2d7e76d70adb3b595