aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/home/.config/nvim/lua/cfg
diff options
context:
space:
mode:
Diffstat (limited to 'home/.config/nvim/lua/cfg')
-rw-r--r--home/.config/nvim/lua/cfg/options.lua103
-rw-r--r--home/.config/nvim/lua/cfg/utils.lua29
2 files changed, 0 insertions, 132 deletions
diff --git a/home/.config/nvim/lua/cfg/options.lua b/home/.config/nvim/lua/cfg/options.lua
deleted file mode 100644
index 4b6d588..0000000
--- a/home/.config/nvim/lua/cfg/options.lua
+++ /dev/null
@@ -1,103 +0,0 @@
-local opt = vim.o
-
-opt.undofile = true
-opt.swapfile = false
-opt.shadafile = "NONE"
-
-opt.number = true
-opt.cursorline = true
-opt.signcolumn = "auto:2"
-opt.laststatus = 3
-
-opt.expandtab = true
-opt.shiftround = true
-opt.shiftwidth = 0
-opt.softtabstop = -1
-opt.tabstop = 4
-
-opt.gdefault = true
-opt.ignorecase = true
-opt.smartcase = true
-
-opt.splitbelow = true
-opt.splitright = true
-opt.splitkeep = "screen"
-
-opt.linebreak = true
-opt.breakindent = true
-opt.textwidth = 80
-opt.colorcolumn = "+1"
-vim.opt.formatoptions:remove("t")
-
-opt.messagesopt = "wait:5000,history:500"
-
-vim.opt.shortmess:append({ a = true })
-
-opt.updatetime = 250
-opt.timeoutlen = 300
-
-vim.opt.completeopt = { "menuone", "noselect", "popup", "fuzzy", "nearest" }
-opt.scrolloff = 999
-opt.sidescrolloff = 5
-
-vim.schedule(function()
- opt.clipboard = vim.env.SSH_TTY and "" or "unnamedplus"
-end)
-
-opt.mouse = "a"
-
-vim.opt.wildmode = { "longest", "full" }
-
-vim.opt.cpoptions:remove({ "_" })
-
-vim.opt.listchars = {
- tab = "> ",
- space = "ยท",
- extends = ">",
- precedes = "<",
- nbsp = "+",
-}
-opt.list = true
-
-opt.confirm = true
-
-opt.virtualedit = "block"
-opt.spelloptions = "camel"
-
-vim.g.loaded_node_provider = 0
-vim.g.loaded_perl_provider = 0
-vim.g.loaded_python3_provider = 0
-
-vim.opt.diffopt:append({
- hiddenoff = true,
- iblank = true,
- iwhiteall = true,
- algorithm = "histogram",
-})
-
-if vim.fn.executable("rg") then
- opt.grepprg = "rg\\ --vimgrep"
- opt.grepformat = "%f:%l:%c:%m"
-end
-
-opt.pumblend = 20
-opt.pumborder = "rounded"
-
-opt.winborder = "rounded"
-
-vim.o.foldmethod = "expr"
-vim.o.foldenable = false
-
-vim.g.mapleader = " "
-vim.g.maplocalleader = ","
-
-vim.diagnostic.config({
- virtual_text = false,
- virtual_lines = false,
-})
-
-opt.sessionoptions =
- "blank,buffers,curdir,help,tabpages,winsize,winpos,terminal,localoptions"
-
-vim.o.exrc = true
-
diff --git a/home/.config/nvim/lua/cfg/utils.lua b/home/.config/nvim/lua/cfg/utils.lua
deleted file mode 100644
index 300d7a7..0000000
--- a/home/.config/nvim/lua/cfg/utils.lua
+++ /dev/null
@@ -1,29 +0,0 @@
-local M = {}
-local gitsigns = require("gitsigns")
-local conform = require("conform")
-
-function M.format_hunks(options)
- local hunks = gitsigns.get_hunks()
- if not hunks or vim.tbl_isempty(hunks) then
- return
- end
- for _, hunk in ipairs(hunks) do
- if hunk and hunk.added then
- local start = hunk.added.start
- local last = start + hunk.added.count
- -- nvim_buf_get_lines uses zero-based indexing -> subtract from last
- local last_hunk_line =
- vim.api.nvim_buf_get_lines(0, last - 2, last - 1, true)[1]
- local range =
- { start = { start, 0 }, ["end"] = { last - 1, last_hunk_line:len() } }
- options = vim.tbl_extend(
- "force",
- { range = range, lsp_fallback = true, quiet = true },
- options or {}
- )
- conform.format(options)
- end
- end
-end
-
-return M