nvim config cleanup, i3 now uses xresources

This commit is contained in:
Tiago Sousa 2024-02-15 14:12:44 +00:00
parent 4515999f0b
commit 83ae9b72b7
27 changed files with 46 additions and 717 deletions

View file

@ -1,3 +1,3 @@
#include ".Xresources.d/catppuccin-macchiato"
!#include ".Xresources.d/gruvbox-dark"
! #include ".Xresources.d/gruvbox-dark"
!#include ".Xresources.d/gruvbox-light"

View file

@ -9,7 +9,7 @@
*.color2: #A6DA95
*.color10: #A6DA95
*.color3: #EED49F
*.color11: #EED49F
*.color11: #F4DBD6
*.color4: #8AADF4
*.color12: #8AADF4
*.color5: #F5BDE6

View file

@ -181,38 +181,47 @@ bindsym $mod+Shift+c reload
bindsym $mod+Shift+r restart
# set colorscheme
set $red #ed8796
set $rosewater #f4dbd6
set $flamingo #f0c6c6
set $pink #f5bde6
set $mauve #c6a0f6
set $maroon #ee99a0
set $peach #f5a97f
set $green #a6da95
set $teal #8bd5ca
set $sky #91d7e3
set $sapphire #7dc4e4
set $blue #8aadf4
set $lavender #b7bdf8
set $text #cad3f5
set $subtext1 #b8c0e0
set $subtext0 #a5adcb
set $overlay2 #939ab7
set $overlay1 #8087a2
set $overlay0 #6e738d
set $surface2 #5b6078
set $surface1 #494d64
set $surface0 #363a4f
set $base #24273a
set $mantle #1e2030
set $crust #181926
# target title bg text indicator border
client.focused $lavender $base $text $rosewater $lavender
client.focused_inactive $overlay0 $base $text $rosewater $overlay0
client.unfocused $overlay0 $base $text $rosewater $overlay0
client.urgent $peach $base $peach $overlay0 $peach
client.placeholder $overlay0 $base $text $overlay0 $overlay0
client.background $base
# set $red #ed8796
# set $rosewater #f4dbd6
# set $flamingo #f0c6c6
# set $pink #f5bde6
# set $mauve #c6a0f6
# set $maroon #ee99a0
# set $peach #f5a97f
# set $green #a6da95
# set $teal #8bd5ca
# set $sky #91d7e3
# set $sapphire #7dc4e4
# set $blue #8aadf4
# set $lavender #b7bdf8
# set $fg #cad3f5
# set $subtext1 #b8c0e0
# set $subtext0 #a5adcb
# set $overlay2 #939ab7
# set $overlay1 #8087a2
# set $overlay0 #6e738d
# set $surface2 #5b6078
# set $surface1 #494d64
# set $surface0 #363a4f
# set $bg #24273a
# set $mantle #1e2030
# set $crust #181926
set_from_resource $bg i3wm.background #24273A
set_from_resource $fg i3wm.foreground #CAD3F5
set_from_resource $red i3wm.color1 #ED8796
set_from_resource $lightgrey i3wm.color7 #B8C0E0
set_from_resource $grey i3wm.color8 #5B6078
set_from_resource $lightyellow i3wm.color11 #F4DBD6
set_from_resource $white i3wm.color15 #A5ADCB
set_from_resource $black i3wm.color0 #181926
# target title bg fg indicator border
client.focused $lavender $bg $fg $lightyellow $lightgrey
client.focused_inactive $white $bg $fg $lightyellow $black
client.unfocused $white $bg $fg $lightyellow $black
client.urgent $red $bg $fg $white $red
client.placeholder $white $bg $fg $white $white
client.background $bg
# resize window (you can also use the mouse for that)
bindsym $mod2+Shift+h resize shrink width 10 px or 10 ppt

View file

@ -6,7 +6,7 @@
#: individual font faces and even specify special fonts for particular
#: characters.
font_family FiraCode Nerd Font Mono Regular
font_family FiraCodeNF-Reg
# bold_font auto
# italic_font auto
# bold_italic_font auto

View file

@ -1,179 +0,0 @@
local cmp_status_ok, cmp = pcall(require, "cmp")
if not cmp_status_ok then
return
end
local snip_status_ok, luasnip = pcall(require, "luasnip")
if not snip_status_ok then
return
end
require("luasnip/loaders/from_vscode").lazy_load()
local check_backspace = function()
local col = vim.fn.col "." - 1
return col == 0 or vim.fn.getline("."):sub(col, col):match "%s"
end
-- 󰃐 󰆩 󰙅 󰛡  󰅲 some other good icons
local kind_icons = {
Text = "󰉿",
Method = "m",
Function = "󰊕",
Constructor = "",
Field = "",
Variable = "󰆧",
Class = "󰌗",
Interface = "",
Module = "",
Property = "",
Unit = "",
Value = "󰎠",
Enum = "",
Keyword = "󰌋",
Snippet = "",
Color = "󰏘",
File = "󰈙",
Reference = "",
Folder = "󰉋",
EnumMember = "",
Constant = "󰇽",
Struct = "",
Event = "",
Operator = "󰆕",
TypeParameter = "󰊄",
}
-- find more here: https://www.nerdfonts.com/cheat-sheet
cmp.setup {
snippet = {
expand = function(args)
luasnip.lsp_expand(args.body) -- For `luasnip` users.
end,
},
mapping = {
["<C-b>"] = cmp.mapping(cmp.mapping.scroll_docs(-1), { "i", "c" }),
["<C-f>"] = cmp.mapping(cmp.mapping.scroll_docs(1), { "i", "c" }),
["<C-Space>"] = cmp.mapping(cmp.mapping.complete(), { "i", "c" }),
["<C-y>"] = cmp.config.disable, -- Specify `cmp.config.disable` if you want to remove the default `<C-y>` mapping.
["<C-e>"] = cmp.mapping {
i = cmp.mapping.abort(),
c = cmp.mapping.close(),
},
-- Accept currently selected item. If none selected, do nothing.
["<CR>"] = cmp.mapping.confirm { select = false },
["<C-k>"] = cmp.mapping(function(fallback)
if luasnip.expandable() then
luasnip.expand()
elseif luasnip.expand_or_jumpable() then
luasnip.expand_or_jump()
elseif check_backspace() then
fallback()
else
fallback()
end
end),
["<C-j>"] = cmp.mapping(function(fallback)
if luasnip.jumpable(-1) then
luasnip.jump(-1)
else
fallback()
end
end
),
["<Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_next_item()
else
fallback()
end
end, {
"i",
"s",
}),
["<S-Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_prev_item()
else
fallback()
end
end, {
"i",
"s",
}),
},
formatting = {
fields = { "kind", "abbr", "menu" },
format = function(entry, vim_item)
-- Kind icons
vim_item.kind = string.format("%s", kind_icons[vim_item.kind])
-- vim_item.kind = string.format('%s %s', kind_icons[vim_item.kind], vim_item.kind) -- This concatonates the icons with the name of the item kind
vim_item.menu = ({
nvim_lsp = "(LSP)",
luasnip = "(Snippet)",
buffer = "(Text)",
nvim_lsp_signature_help = "(Signature)",
nvim_lua = "(Nvim LSP)",
path = "(Path)",
})[entry.source.name]
return vim_item
end,
},
sorting = {
comparators = {
cmp.config.compare.exact,
cmp.config.compare.offset,
cmp.config.compare.recently_used,
}
},
sources = cmp.config.sources(
{
{ name = "nvim_lsp",
entry_filter = function(entry, context)
local kind = entry:get_kind()
local line = context.cursor_line
local col = context.cursor.col
local char_before_cursor = string.sub(line, col - 1, col - 1)
if char_before_cursor == "." then
if kind == 2 or kind == 5 then
return true
else return false end
elseif string.match(line, "^%s*%w*$") then
if kind == 3 or kind == 6 then
return true
else
return false
end
end
return true
end
},
{ name = 'nvim_lua' },
{ name = 'luasnip' },
{ name = 'nvim_lsp_signature_help' },
{ name = 'path' },
{ name = 'orgmode' }
},
{
--This sources will only show up if there aren't any sources from the other list
{ name = "buffer", keyword_length = 3 },
}
),
confirm_opts = {
behavior = cmp.ConfirmBehavior.Replace,
select = false,
},
window = {
documentation = cmp.config.window.bordered(),
completion = cmp.config.window.bordered({
winhighlight = "Normal:Pmenu,FloatBorder:Pmenu,CursorLine:PmenuSel,Search:None"
})
},
experimental = {
ghost_text = true,
native_menu = false,
},
}

View file

@ -1,6 +0,0 @@
require 'colorizer'.setup({
'dosini';
'css';
'javascript';
html = { mode = 'background' };
})

View file

@ -1,54 +0,0 @@
require("catppuccin").setup({
flavour = "macchiato", -- latte, frappe, macchiato, mocha
transparent_background = true,
term_colors = false,
no_italic = false, -- Force no italic
no_bold = false, -- Force no bold
styles = {
comments = {"italic"},
conditionals = {"italic"},
loops = {},
functions = {},
keywords = {},
strings = {},
variables = {},
numbers = {},
booleans = {},
properties = {},
types = {},
operators = {},
},
integrations = {
cmp = true,
gitsigns = true,
telescope = true,
},
})
require("gruvbox").setup({
undercurl = true,
underline = true,
bold = true,
italic = {
strings = false,
comments = true,
operators = false,
folds = true,
},
strikethrough = true,
invert_selection = false,
invert_signs = false,
invert_tabline = false,
invert_intend_guides = false,
inverse = true, -- invert background for search, diffs, statuslines and errors
contrast = "", -- can be "hard", "soft" or empty string
palette_overrides = {},
overrides = {},
dim_inactive = false,
transparent_mode = true,
})
vim.o.background = "dark"
vim.cmd.colorscheme("catppuccin")

View file

@ -1 +0,0 @@
require("fidget").setup()

View file

@ -1 +0,0 @@
vim.keymap.set("n", "<leader>gs", vim.cmd.Git)

View file

@ -1,10 +0,0 @@
local mark = require("harpoon.mark")
local ui = require("harpoon.ui")
vim.keymap.set("n", "<leader>a", mark.add_file)
vim.keymap.set("n", "<C-e>", ui.toggle_quick_menu)
vim.keymap.set("n", "<C-j>", function () ui.nav_file(1) end)
vim.keymap.set("n", "<C-k>", function () ui.nav_file(2) end)
vim.keymap.set("n", "<C-l>", function () ui.nav_file(3) end)
vim.keymap.set("n", "<C-;>", function () ui.nav_file(4) end)

View file

@ -1,97 +0,0 @@
local present, mason = pcall(require, "mason")
vim.api.nvim_create_augroup("_mason", { clear = true })
local options = {
PATH = "skip",
ui = {
icons = {
package_installed = "",
package_pending = "",
package_uninstalled = ""
},
keymaps = {
toggle_server_expand = "<CR>",
install_server = "i",
update_server = "u",
check_server_version = "c",
update_all_servers = "U",
check_outdated_servers = "C",
uninstall_server = "X",
cancel_installation = "<C-c>",
},
},
max_concurrent_installers = 10,
}
mason.setup(options)
local mason_lspconfig = require "mason-lspconfig"
mason_lspconfig.setup({
ensure_installed = {},
automatic_installation = true
})
local opts = { noremap = true, silent = true }
vim.keymap.set('n', '<space>e', vim.diagnostic.open_float, opts)
vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, opts)
vim.keymap.set('n', ']d', vim.diagnostic.goto_next, opts)
vim.keymap.set('n', '<space>q', vim.diagnostic.setloclist, opts)
-- Use an on_attach function to only map the following keys
-- after the language server attaches to the current buffer
local on_attach = function(client, bufnr)
-- Enable completion triggered by <c-x><c-o>
vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc')
-- Mappings.
-- See `:help vim.lsp.*` for documentation on any of the below functions
local bufopts = { noremap = true, silent = true, buffer = bufnr }
vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, bufopts)
vim.keymap.set('n', 'gd', vim.lsp.buf.definition, bufopts)
vim.keymap.set('n', 'K', vim.lsp.buf.hover, bufopts)
vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, bufopts)
-- vim.keymap.set('n', '<C-k>', vim.lsp.buf.signature_help, bufopts)
vim.keymap.set('n', '<space>wa', vim.lsp.buf.add_workspace_folder, bufopts)
vim.keymap.set('n', '<space>wr', vim.lsp.buf.remove_workspace_folder, bufopts)
vim.keymap.set('n', '<space>wl', function()
print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
end, bufopts)
vim.keymap.set('n', '<space>D', vim.lsp.buf.type_definition, bufopts)
vim.keymap.set('n', '<space>rn', vim.lsp.buf.rename, bufopts)
vim.keymap.set('n', '<space>ca', vim.lsp.buf.code_action, bufopts)
vim.keymap.set('n', 'gr', vim.lsp.buf.references, bufopts)
vim.keymap.set('n', '<space>ge', function() vim.diagnostic.goto_next() end, bufopts)
vim.keymap.set('n', '<space>gE', function() vim.diagnostic.goto_prev() end, bufopts)
vim.keymap.set('n', '<space>fo', function() vim.lsp.buf.format { async = true } end, bufopts)
end
local lspconfig = require "lspconfig"
-- ADD NVIM CMP AS A CAPABILITY
local lsp_defaults = lspconfig.util.default_config
local capabilities = vim.tbl_deep_extend(
'force',
lsp_defaults.capabilities,
require('cmp_nvim_lsp').default_capabilities()
)
mason_lspconfig.setup_handlers {
-- This is a default handler that will be called for each installed server (also for new servers that are installed during a session)
function(server_name)
lspconfig[server_name].setup {
on_attach = on_attach,
on_init = on_init,
flags = lsp_flags,
capabilities = capabilities,
}
end,
}

View file

@ -1,12 +0,0 @@
local null_ls = require("null-ls")
null_ls.setup({
sources = {
null_ls.builtins.formatting.rustfmt,
null_ls.builtins.formatting.black,
null_ls.builtins.formatting.shfmt,
null_ls.builtins.formatting.prettierd.with({
filetypes = { "html", "json", "yaml", "markdown" },
}),
}
})

View file

@ -1,21 +0,0 @@
-- -- Load custom treesitter grammar for org filetype
require('orgmode').setup_ts_grammar()
-- Treesitter configuration
require('nvim-treesitter.configs').setup {
-- If TS highlights are not enabled at all, or disabled via `disable` prop,
-- highlighting will fallback to default Vim syntax highlighting
highlight = {
enable = true,
-- Required for spellcheck, some LaTex highlights and
-- code block highlights that do not have ts grammar
additional_vim_regex_highlighting = { 'org' },
},
ensure_installed = { 'org' }, -- Or run :TSUpdate org
}
require('orgmode').setup({
org_agenda_files = { '~/Nextcloud/org/**/*'},
org_default_notes_file = '~/Nextcloud/org/refile.org',
})

View file

@ -1,40 +0,0 @@
require('lualine').setup {
options = {
icons_enabled = true,
theme = 'auto',
component_separators = { left = '|', right = '|'},
section_separators = { left = '', right = ''},
disabled_filetypes = {
statusline = {},
winbar = {},
},
ignore_focus = {},
always_divide_middle = true,
globalstatus = false,
refresh = {
statusline = 1000,
tabline = 1000,
winbar = 1000,
}
},
sections = {
lualine_a = {'mode'},
lualine_b = {'branch', 'diff', 'diagnostics'},
lualine_c = {'filename'},
lualine_x = {'encoding', 'filetype'},
lualine_y = {'progress'},
lualine_z = {'location'}
},
inactive_sections = {
lualine_a = {},
lualine_b = {},
lualine_c = {'filename'},
lualine_x = {'location'},
lualine_y = {},
lualine_z = {}
},
tabline = {},
winbar = {},
inactive_winbar = {},
extensions = {}
}

View file

@ -1,5 +0,0 @@
local builtin = require('telescope.builtin')
vim.keymap.set('n', '<leader>ff', builtin.find_files, {})
vim.keymap.set('n', '<leader>fg', builtin.live_grep, {})
vim.keymap.set('n', '<leader>fb', builtin.buffers, {})
vim.keymap.set('n', '<leader>fh', builtin.help_tags, {})

View file

@ -1,66 +0,0 @@
local config = {
signs = true, -- show icons in the signs column
sign_priority = 8, -- sign priority
-- keywords recognized as todo comments
keywords = {
FIX = {
icon = "", -- icon used for the sign, and in search results
color = "error", -- can be a hex color, or a named color (see below)
alt = { "FIXME", "BUG", "FIXIT", "ISSUE","fix" }, -- a set of other keywords that all map to this FIX keywords
-- signs = false, -- configure signs for some keywords individually
},
TODO = { icon = "", color = "info", alt = { "todo" } },
HACK = { icon = "", color = "warning", alt = { "hack" } },
WARN = { icon = "", color = "warning", alt = { "WARNING", "XXX", "warn" } },
PERF = { icon = "", alt = { "OPTIM", "PERFORMANCE", "OPTIMIZE", "perf" } },
NOTE = { icon = "", color = "hint", alt = { "INFO", "info", "note" } },
TEST = { icon = "", color = "test", alt = { "TESTING", "PASSED", "FAILED", "test" } },
},
gui_style = {
fg = "NONE", -- The gui style to use for the fg highlight group.
bg = "BOLD", -- The gui style to use for the bg highlight group.
},
merge_keywords = true, -- when true, custom keywords will be merged with the defaults
-- highlighting of the line containing the todo comment
-- * before: highlights before the keyword (typically comment characters)
-- * keyword: highlights of the keyword
-- * after: highlights after the keyword (todo text)
highlight = {
multiline = true, -- enable multine todo comments
multiline_pattern = "^.", -- lua pattern to match the next multiline from the start of the matched keyword
multiline_context = 10, -- extra lines that will be re-evaluated when changing a line
before = "", -- "fg" or "bg" or empty
keyword = "wide", -- "fg", "bg", "wide", "wide_bg", "wide_fg" or empty. (wide and wide_bg is the same as bg, but will also highlight surrounding characters, wide_fg acts accordingly but with fg)
after = "fg", -- "fg" or "bg" or empty
pattern = [[.*<(KEYWORDS)\s*:]], -- pattern or table of patterns, used for highlighting (vim regex)
comments_only = true, -- uses treesitter to match keywords in comments only
max_line_len = 400, -- ignore lines longer than this
exclude = {}, -- list of file types to exclude highlighting
},
-- list of named colors where we try to extract the guifg from the
-- list of highlight groups or use the hex color if hl not found as a fallback
colors = {
error = { "DiagnosticError", "ErrorMsg", "#DC2626" },
warning = { "DiagnosticWarn", "WarningMsg", "#FBBF24" },
info = { "DiagnosticInfo", "#2563EB" },
hint = { "DiagnosticHint", "#10B981" },
default = { "Identifier", "#7C3AED" },
test = { "Identifier", "#FF00FF" }
},
search = {
command = "rg",
args = {
"--color=never",
"--no-heading",
"--with-filename",
"--line-number",
"--column",
},
-- regex that will be used to match keywords.
-- don't replace the (KEYWORDS) placeholder
pattern = [[\b(KEYWORDS):]], -- ripgrep regex
-- pattern = [[\b(KEYWORDS)\b]], -- match without the extra colon. You'll likely get false positives
},
}
require("todo-comments").setup(config)

View file

@ -1,36 +0,0 @@
function ContextSetup(show_all_context)
require("treesitter-context").setup({
enable = true, -- Enable this plugin (Can be enabled/disabled later via commands)
throttle = true, -- Throttles plugin updates (may improve performance)
max_lines = 0, -- How many lines the window should span. Values <= 0 mean no limit.
show_all_context = show_all_context,
patterns = { -- Match patterns for TS nodes. These get wrapped to match at word boundaries.
-- For all filetypes
-- Note that setting an entry here replaces all other patterns for this entry.
-- By setting the 'default' entry below, you can control which nodes you want to
-- appear in the context window.
default = {
"function",
"method",
"for",
"while",
"if",
"switch",
"case",
},
rust = {
"loop_expression",
"impl_item",
},
typescript = {
"class_declaration",
"abstract_class_declaration",
"else_clause",
},
},
})
end
ContextSetup(false)

View file

@ -1,9 +0,0 @@
require'nvim-treesitter.configs'.setup {
ensure_installed = {"lua","vim","python","rust","haskell","c","java", "bash","go"},
sync_install = false,
highlight = {
enable = true,
additional_vim_regex_highlighting = false,
},
}

View file

@ -1 +0,0 @@
vim.keymap.set("n", "<leader>u", vim.cmd.UndotreeToggle)

View file

@ -1,2 +0,0 @@
vim.g.vimtex_view_method = 'zathura'
vim.g.vimtex_compiler_methor = 'latexmk'

View file

@ -1,3 +0,0 @@
require("tsousa.packer")
require("tsousa.set")
require("tsousa.remap")

View file

@ -1,63 +0,0 @@
return require('packer').startup(function(use)
-- Packer can manage itself
use("wbthomason/packer.nvim")
use("nvim-lua/plenary.nvim")
use("nvim-lua/popup.nvim")
use("nvim-telescope/telescope.nvim")
use("tpope/vim-surround")
use("tpope/vim-fugitive")
use("theprimeagen/harpoon")
use("mbbill/undotree")
use("stevearc/dressing.nvim")
use({
"folke/todo-comments.nvim",
requires = { "nvim-lua/plenary.nvim" }
})
-- fidget change when rewrite version comes out
use("j-hui/fidget.nvim")
use("norcalli/nvim-colorizer.lua")
use("lervag/vimtex")
use({
"hrsh7th/nvim-cmp",
requires = {
'hrsh7th/cmp-nvim-lsp', -- lsp
'hrsh7th/cmp-nvim-lua', -- Nvim API completions
'hrsh7th/cmp-nvim-lsp-signature-help', -- Show function signatures
'hrsh7th/cmp-buffer', --buffer completions
'hrsh7th/cmp-path', --path completions
'hrsh7th/cmp-cmdline', --cmdline completions
'L3MON4D3/LuaSnip',
'rafamadriz/friendly-snippets',
'saadparwaiz1/cmp_luasnip',
},
})
use("williamboman/mason.nvim")
use("williamboman/mason-lspconfig.nvim")
use("neovim/nvim-lspconfig")
use("nvimtools/none-ls.nvim")
use("nvim-treesitter/nvim-treesitter", {
run = ":TSUpdate"
})
use("nvim-orgmode/orgmode")
use({
"nvim-lualine/lualine.nvim",
requires = { "nvim-tree/nvim-web-devicons" }
})
use("nvim-treesitter/playground")
use("romgrk/nvim-treesitter-context")
use("runoshun/vim-alloy")
-- Colorscheme section
use("catppuccin/nvim")
use("ellisonleao/gruvbox.nvim")
end)

View file

@ -1,27 +0,0 @@
vim.g.mapleader = " "
vim.keymap.set("n", "<leader>pv", vim.cmd.Ex)
vim.keymap.set("v", "J", ":m '>+1<CR>gv=gv")
vim.keymap.set("v", "K", ":m '<-2<CR>gv=gv")
vim.keymap.set("n", "J", "mzJ`z")
vim.keymap.set("n", "<C-d>", "<C-d>zz")
vim.keymap.set("n", "<C-u>", "<C-u>zz")
vim.keymap.set("n", "n", "nzzzv")
vim.keymap.set("n", "N", "Nzzzv")
-- greatest remap ever
vim.keymap.set("x", "<leader>p", "\"_dP")
-- next greatest remap ever : asbjornHaland
vim.keymap.set("n", "<leader>y", "\"+y")
vim.keymap.set("v", "<leader>y", "\"+y")
vim.keymap.set("n", "<leader>Y", "\"+Y")
vim.keymap.set("n", "<leader>d", "\"_d")
vim.keymap.set("v", "<leader>d", "\"_d")
-- This is going to get me cancelled
vim.keymap.set("n", "Q", "<nop>")
vim.keymap.set("n", "<leader>s", ":%s/\\<<C-r><C-w>\\>/<C-r><C-w>/gI<Left><Left><Left>")

View file

@ -1,44 +0,0 @@
vim.opt.guicursor=""
vim.opt.nu = true
vim.opt.relativenumber = true
vim.opt.errorbells = false
vim.opt.tabstop = 4
vim.opt.softtabstop = 4
vim.opt.shiftwidth = 4
vim.opt.expandtab = true
vim.opt.smartindent = true
vim.opt.wrap = false
vim.opt.swapfile = false
vim.opt.backup = false
vim.opt.undodir = os.getenv("HOME") .. "/.vim/undodir"
vim.opt.undofile = true
vim.opt.showmode = false
vim.opt.hlsearch = false
vim.opt.incsearch = true
vim.opt.termguicolors = true
vim.opt.scrolloff = 8
vim.opt.signcolumn = "yes"
vim.opt.isfname:append("@-@")
-- Give more space for displaying messages.
vim.opt.cmdheight = 1
-- Having longer updatetime (default is 4000 ms = 4 s) leads to noticeable
-- delays and poor user experience.
vim.opt.updatetime = 50
-- Don't pass messages to |ins-completion-menu|.
vim.opt.shortmess:append("c")
vim.opt.colorcolumn="80"
vim.g.mapleader = " "

View file

@ -8,10 +8,6 @@ local TsousaGroup = augroup('TsousaGroup', {})
local autocmd = vim.api.nvim_create_autocmd
local yank_group = augroup('HighlightYank', {})
function R(name)
require("plenary.reload").reload_module(name)
end
autocmd('BufWinEnter',{
group= TsousaGroup,
pattern = '*',

View file

@ -1,6 +1,8 @@
local color = "catppuccin"
local background = "dark"
function SetColor()
vim.cmd.colorscheme(color)
vim.opt.background = background
end
return {

View file

@ -26,7 +26,6 @@ vim.opt.showmode = false
vim.opt.hlsearch = false
vim.opt.incsearch = true
vim.opt.showmatch = true
vim.opt.termguicolors = true
vim.opt.scrolloff = 8