+/config

my dotfiles and nix configuration

git clone https://git.julia.blue/+/config

Julia RyanFix nvim home-manager config setup8082579

main
1.4 KiB60 linesraw
1vim.loader.enable()
2vim.g.mapleader = " "
3vim.g.loaded_perl_provider = 0
4vim.diagnostic.config { virtual_text = false, severity_sort = true }
5local o = vim.opt
6o.gdefault = true
7o.ignorecase = true
8o.smartcase = true
9o.termguicolors = true
10o.expandtab = true
11o.tabstop = 4
12o.shiftwidth = 4
13o.foldlevel = 99
14o.foldlevelstart = 99
15o.foldmethod = "expr"
16o.foldexpr = "nvim_treesitter#foldexpr()"
17o.updatetime = 500
18o.timeoutlen = 300
19o.mouse = "a"
20o.mousemodel = "extend"
21o.scrolloff = 7
22o.wildignore = { "*.o", "*.obj", "*.pyc" }
23o.shortmess:append "cI"
24
25require "util"
26require "pretty"
27require "statusline"
28
29require "plugins"
30require "completion"
31require "lsp"
32require "debugger"
33
34require "keybinds"
35
36vim.filetype.add {
37    extension = { nasm = "nasm", nbt = "numbat", vasm = "vasm" },
38}
39
40vim.api.nvim_create_autocmd({ "FileType" }, {
41    pattern = { "markdown", "gitcommit" },
42    callback = function()
43        o.spell = true
44        o.shiftwidth = 2
45        o.conceallevel = 2
46    end,
47})
48
49require("osc52").setup { silent = true, trim = true, max_length = 2 ^ 16 }
50if vim.env.SSH_TTY then
51    local function copy(lines, _) require("osc52").copy(table.concat(lines, "\n")) end
52    local function paste()
53        return { vim.fn.split(vim.fn.getreg "", "\n"), vim.fn.getregtype "" }
54    end
55    vim.g.clipboard = {
56        name = "osc52",
57        copy = { ["+"] = copy, ["*"] = copy },
58        paste = { ["+"] = paste, ["*"] = paste },
59    }
60end