nvim-astro/lua/polish.lua
2025-04-01 21:36:21 +02:00

102 lines
3.1 KiB
Lua

-- if true then return end -- WARN: REMOVE THIS LINE TO ACTIVATE THIS FILE
-- This will run last in the setup process and is a good place to configure
-- things like custom filetypes. This is just pure lua so anything that doesn't
-- fit in the normal config locations above can go here
-- ─< options.lua >─────────────────────────────────────────────────────────────────────
vim.cmd "let g:netrw_liststyle = 3"
local o = vim.opt
o.relativenumber = true
o.number = true
-- Minimal number of screen lines to keep above and below the cursor.
o.scrolloff = 8
-- tabs & indentation
o.tabstop = 2 -- 2 spaces for tabs (prettier default)
o.shiftwidth = 2 -- 2 spaces for indent width
o.softtabstop = 2
-- o.tabstop = 4 -- for TitusWorkings
-- o.shiftwidth = 4 -- for TitusWorkings
-- o.softtabstop = 4 -- for TitusWorkings
o.expandtab = true -- expand tab to spaces
o.autoindent = true -- copy indent from current line when starting new one
o.mouse = "a"
o.mousemoveevent = true
o.wrap = false
-- search settings
o.ignorecase = true -- ignore case when searching
o.smartcase = true -- if you include mixed case in your search, assumes you want case-sensitive
o.cursorline = true
-- Don't show the mode, since it's already in the status line
o.showmode = false
-- turn on termguicolors for tokyonight colorscheme to work
-- (have to use iterm2 or any other true color terminal)
o.termguicolors = true
o.background = "dark" -- colorschemes that can be light or dark will be made dark
o.signcolumn = "yes" -- show sign column so that text doesn't shift
-- backspace
o.backspace = "indent,eol,start" -- allow backspace on indent, end of line or insert mode start position
-- clipboard
o.clipboard:append "unnamedplus" -- use system clipboard as default register
-- split windows
o.splitright = true -- split vertical window to the right
o.splitbelow = true -- split horizontal window to the bottom
o.splitkeep = "screen"
o.laststatus = 3
-- turn off swapfile
o.swapfile = false
-- Disable the tilde on empty lines
o.fillchars = { eob = " " }
-- SudaRead automatic if file is inaccessible
vim.g.suda_smart_edit = 1
vim.api.nvim_create_autocmd("TextYankPost", {
desc = "Highlight when yanking (copying) text",
group = vim.api.nvim_create_augroup("kickstart-highlight-yank", { clear = true }),
callback = function() vim.highlight.on_yank() end,
})
-- Set cursor to beam when entering Neovim
vim.cmd [[
augroup ChangeCursorShape
autocmd!
autocmd VimEnter * set guicursor=n-v-c-sm:block,i-ci-ve:ver25,r-cr-o:hor20
autocmd VimLeave * set guicursor=a:ver25
augroup END
]]
if vim.g.neovide then
-- vim.g.neovide_transparency = 0.35
vim.g.neovide_transparency = 1
vim.g.neovide_theme = "dark"
vim.g.neovide_refresh_rate = 90
vim.g.neovide_cursor_vfx_mode = "torpedo"
vim.g.neovide_cursor_smooth_blink = true
end
-- Set up custom filetypes
-- vim.filetype.add {
-- extension = {
-- foo = "fooscript",
-- },
-- filename = {
-- ["Foofile"] = "fooscript",
-- },
-- pattern = {
-- ["~/%.config/foo/.*"] = "fooscript",
-- },
-- }