vitorpy's Dotfiles
1-- Bootstrap lazy.nvim
2local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
3if not vim.loop.fs_stat(lazypath) then
4 vim.fn.system({
5 "git",
6 "clone",
7 "--filter=blob:none",
8 "https://github.com/folke/lazy.nvim.git",
9 "--branch=stable",
10 lazypath,
11 })
12end
13vim.opt.rtp:prepend(lazypath)
14
15-- Basic settings
16vim.g.mapleader = " "
17vim.g.maplocalleader = " "
18
19vim.opt.number = true
20vim.opt.relativenumber = true
21vim.opt.mouse = "a"
22vim.opt.ignorecase = true
23vim.opt.smartcase = true
24vim.opt.hlsearch = false
25vim.opt.wrap = false
26vim.opt.tabstop = 2
27vim.opt.shiftwidth = 2
28vim.opt.expandtab = true
29vim.opt.termguicolors = true
30
31-- Use Fish shell
32vim.opt.shell = "/usr/bin/fish"
33
34-- Enable word wrap for markdown files
35vim.api.nvim_create_autocmd("FileType", {
36 pattern = "markdown",
37 callback = function()
38 vim.opt_local.wrap = true
39 vim.opt_local.linebreak = true
40 end,
41})
42
43-- Only load plugins if not in VS Code
44if not vim.g.vscode then
45 -- Load plugins
46 require("lazy").setup("plugins")
47
48 -- Load IDE layout command
49 require("ide-layout")
50end