Files
neovim-config/init.lua
2025-11-20 23:37:46 -06:00

50 lines
1.1 KiB
Lua

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", "<leader>e", vim.diagnostic.open_float)