From c233e93c2552940d228be7adb077da47ef42761f Mon Sep 17 00:00:00 2001 From: philw Date: Mon, 13 Jan 2025 15:52:11 +0100 Subject: Update config --- lua/config/editor.lua | 86 --------------------------------------------------- 1 file changed, 86 deletions(-) (limited to 'lua/config/editor.lua') diff --git a/lua/config/editor.lua b/lua/config/editor.lua index 0649006..e69de29 100644 --- a/lua/config/editor.lua +++ b/lua/config/editor.lua @@ -1,86 +0,0 @@ -local option = vim.opt -local keymap = vim.keymap - ---Basic Editor Setup -option.nu = true -option.tabstop = 2 -option.softtabstop = 2 -option.shiftwidth = 2 -option.expandtab = true -option.smartindent = true -option.wrap = false -option.swapfile = false -option.hlsearch = false -option.incsearch = true -option.updatetime = 50 -option.laststatus = 0 -option.signcolumn = "number" -option.autoindent = true -option.clipboard = "unnamedplus" -option.termguicolors = false -option.fillchars = 'eob: ' - --- Setup Editor Theme -vim.cmd([[ -highlight GitGutterAdd ctermbg=none -highlight GitGutterAdd guibg=none -highlight NonText guifg=none -highlight EndOfBuffer ctermfg=none ctermbg=none -highlight Normal ctermbg=none -highlight Normal guibg=none -highlight signcolumn ctermbg=none -highlight signcolumn guibg=none -highlight StatusLine ctermbg=none -highlight StatusLine guibg=none -highlight DiagnosticError ctermbg=none -highlight DiagnosticError guibg=none -highlight DiagnosticWarn ctermbg=none -highlight DiagnosticWarn guibg=none -highlight DiagnosticInfo ctermbg=none -highlight DiagnosticInfo guibg=none -highlight DiagnosticHint ctermbg=none -highlight DiagnosticHint guibg=none - -highlight DiagnosticVirtualError ctermbg=none -highlight DiagnosticVirtualError guibg=none -highlight DiagnosticVirtualWarn ctermbg=none -highlight DiagnosticVirtualWarn guibg=none -highlight DiagnosticVirtualInfo ctermbg=none -highlight DiagnosticVirtualInfo guibg=none -highlight DiagnosticVirtualHint ctermbg=none -highlight DiagnosticVirtualHint guibg=none - -highlight DiagnosticVirtualTextError ctermbg=none -highlight DiagnosticVirtualTextError guibg=none -highlight DiagnosticVirtualTextWarn ctermbg=none -highlight DiagnosticVirtualTextWarn guibg=none -highlight DiagnosticVirtualTextInfo ctermbg=none -highlight DiagnosticVirtualTextInfo guibg=none -highlight DiagnosticVirtualTextHint ctermbg=none -highlight DiagnosticVirtualTextHint guibg=none -]]) - --- run specific commands after different file extensions -vim.cmd([[ -augroup RunPfOnSave -autocmd! -autocmd BufWritePost *.js,*.ts,*.jsx,*json,*.tsx,*.css,*.html,*.yaml,*.md silent! !prettier --write % -autocmd BufWritePost *.tex silent! :VimtexCompile -autocmd BufWritePost *.md silent! :MarkdownPreview -autocmd BufWritePost *.php silent! !php-cs-fixer fix % -augroup END -]]) - --- Gui options -vim.o.guifont = "Fira Code:h7" -vim.g.vimtex_view_method = "zathura" -vim.g.vimtex_compiler_method = "latexrun" -vim.g.gitgutter_set_sign_backgrounds = 1 - ---Keybinds -vim.g.mapleader = " " -keymap.set("n", "e", vim.cmd.Ex) -keymap.set("n", "s", [[:%s/\<\>//gI]]) -keymap.set("n", "a", "ggVG") -keymap.set("v", "J", ":m '>+1gv=gv") -keymap.set("v", "K", ":m '<-2gv=gv") -- cgit v1.2.3