69 lines
1.5 KiB
Lua
69 lines
1.5 KiB
Lua
-- disable netrw at the very start of your init.lua (strongly advised)
|
|
vim.g.loaded_netrw = 1
|
|
vim.g.loaded_netrwPlugin = 1
|
|
----------------------
|
|
-- general settings --
|
|
----------------------
|
|
local set = vim.opt
|
|
|
|
set.foldmethod = 'marker'
|
|
|
|
set.wrap = true
|
|
set.linebreak = true
|
|
set.breakindent = true
|
|
set.breakindentopt = {'shift:2', 'sbr'}
|
|
set.showbreak = ' >'
|
|
|
|
set.number = true
|
|
set.relativenumber = true
|
|
set.encoding = "utf-8"
|
|
|
|
-- search
|
|
set.hlsearch = true
|
|
set.ignorecase = true
|
|
set.smartcase = true
|
|
|
|
-- indentation
|
|
set.smarttab = true
|
|
set.expandtab = false
|
|
set.copyindent = true
|
|
set.preserveindent = true
|
|
set.tabstop = 4
|
|
set.shiftwidth = 4
|
|
set.softtabstop = 0
|
|
|
|
local mdgroup = vim.api.nvim_create_augroup("WrapMarkdown", { clear = true })
|
|
vim.api.nvim_create_autocmd("FileType", {
|
|
pattern = "markdown,txt",
|
|
callback = function()
|
|
vim.opt_local.colorcolumn = "85"
|
|
vim.opt_local.textwidth = 85
|
|
end,
|
|
group = WrapMarkdown,
|
|
})
|
|
vim.api.nvim_create_autocmd("FileType", {
|
|
pattern = "latex,tex",
|
|
callback = function()
|
|
vim.opt_local.shiftwidth = 2
|
|
vim.opt_local.tabstop = 2
|
|
end,
|
|
})
|
|
vim.api.nvim_create_autocmd("TextYankPost", {
|
|
command = "silent! lua vim.highlight.on_yank()",
|
|
})
|
|
|
|
vim.cmd [[
|
|
let g:vim_markdown_folding_disabled=1
|
|
]]
|
|
|
|
-- removes the background color to have it transparent
|
|
vim.api.nvim_create_autocmd({"ColorScheme"}, {
|
|
pattern = {"*"},
|
|
command = "hi Normal ctermbg=none guibg=none",
|
|
})
|
|
vim.cmd("colorscheme kanagawa")
|
|
|
|
require('plugins')
|
|
--require('core.colors')
|
|
require('core.mappings')
|
|
|