Skip to content

Instantly share code, notes, and snippets.

@hpcdisrespecter
Created March 17, 2025 16:28
Show Gist options
  • Save hpcdisrespecter/d5ba6dfbbf7101144675e70807c6fe07 to your computer and use it in GitHub Desktop.
Save hpcdisrespecter/d5ba6dfbbf7101144675e70807c6fe07 to your computer and use it in GitHub Desktop.
idk famalam neovim init.lua it's not really hard
-- -*- lua -*-
-- We use Packer for package management
local function bootstrap_pckr()
local pckr_path = vim.fn.stdpath("data") .. "/pckr/pckr.nvim"
if not vim.uv.fs_stat(pckr_path) then
vim.fn.system({
'git',
'clone',
'--filter=blob:none',
'https://github.com/lewis6991/pckr.nvim',
pckr_path
})
end
vim.opt.rtp:prepend(pckr_path)
end
bootstrap_pckr()
require('pckr').add{
'Tsuzat/NeoSolarized.nvim',
'tpope/vim-surround',
'preservim/nerdtree',
'junegunn/goyo.vim',
'jreybert/vimagit',
'lukesmithxyz/vimling',
'vimwiki/vimwiki',
'bling/vim-airline',
'tpope/vim-commentary',
'ap/vim-css-color',
'quarto-dev/quarto-nvim',
'jmbuhr/otter.nvim',
'hrsh7th/nvim-cmp',
'neovim/nvim-lspconfig',
'nvim-treesitter/nvim-treesitter',
}
-- Neosolarized
local ok_status, NeoSolarized = pcall(require, "NeoSolarized")
if not ok_status then
return
end
-- Default Setting for NeoSolarized to show options
NeoSolarized.setup {
style = "light",
transparent = false,
terminal_colors = true,
enable_italics = true,
styles = {
-- Style to be applied to different syntax groups
comments = { italic = true },
keywords = { italic = true },
functions = { bold = true },
variables = {},
string = { italic = true },
underline = true, -- true/false; for global underline
undercurl = true, -- true/false; for global undercurl
},
on_highlights = function(highlights, colors)
-- highlights.Include.fg = colors.red -- Using `red` foreground for Includes
end,
}
-- you can just set things like vim, too
vim.cmd.colorscheme('NeoSolarized')
vim.cmd("autocmd!")
vim.scriptencoding = "utf-8"
vim.opt.encoding = "utf-8"
vim.opt.fileencoding = "utf-8"
vim.wo.number = true
vim.opt.title = true
vim.opt.autoindent = true
vim.opt.smartindent = true
vim.opt.hlsearch = true
vim.opt.backup = false
vim.opt.showcmd = true
vim.opt.cmdheight = 1
vim.opt.laststatus = 2
vim.opt.expandtab = true
vim.opt.scrolloff = 10
vim.opt.shell = 'zsh'
vim.opt.backupskip = { '/tmp/*', '/private/tmp/*' }
vim.opt.inccommand = 'split'
vim.opt.ignorecase = true -- Case insensitive searching UNLESS /C or capital in search
--vim.opt.smarttab = true
vim.opt.breakindent = true
vim.opt.shiftwidth = 4
vim.opt.tabstop = 4
vim.opt.wrap = true
vim.opt.backspace = { 'start', 'eol', 'indent' }
vim.opt.path:append { '**' } -- Finding files - subfolder search
vim.opt.wildignore:append { '*/node_modules/*' }
vim.opt.termguicolors = true
-- experimental
vim.opt.wildmode="longest,list,full"
vim.opt.number=true
vim.opt.clipboard="unnamedplus"
-- if filetype is markdown, text, html, latex, etc. then set spell
-- assuming your dictionary file is there
vim.opt.spell = false
vim.opt.spelllang = 'en_us'
vim.spellfile = '~/.config/nvim/en.utf-8.spl'
vim.api.nvim_create_autocmd("FileType", {
pattern = 'markdown,text,html,latex',
command = "setlocal spell"
})
-- Turn off paste mode when leaving insert
vim.api.nvim_create_autocmd("InsertLeave", {
pattern = '*',
command = "set nopaste"
})
-- Add asterisks in block comments
vim.opt.formatoptions:append { 'r' }
-- Quarto Setup
local quarto = require('quarto').setup({
debug = false,
closePreviewOnExit = true,
lspFeatures = {
enabled = true,
chunks = "curly",
langages = {
"r",
"python",
"julia",
"bash",
"html"
},
diagnostics = {
enabled = true,
triggers = { "BufWritePost" },
},
completion = { enabled = true },
},
codeRunner = {
enabled = true,
default_method = "slime", -- "molten", "slime", "iron" or <function>
ft_runners = {}, -- filetype to runnner mappings
never_run = { 'yaml' }, -- filetypes to never run
},
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment