dotfiles

[ACTIVE] managed with chezmoi
git clone git://git.figbert.com/dotfiles.git
Log | Files | Refs

commit 9ea8c33a1a2d3712cb95576b28aff9cbdcbb237d
parent 0466f1d578a1c9337c703a59d1643adcfd3bab92
Author: FIGBERT <figbert@figbert.com>
Date:   Thu,  1 Jul 2021 01:46:25 -0700

Update NeoVim config to Lua for version 0.5

Diffstat:
Adot_config/nvim/colors/apple.vim | 75+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adot_config/nvim/colors/tomorrow-night-burns.vim | 75+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adot_config/nvim/init.lua.tmpl | 88+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Ddot_config/nvim/init.vim.tmpl | 76----------------------------------------------------------------------------
4 files changed, 238 insertions(+), 76 deletions(-)

diff --git a/dot_config/nvim/colors/apple.vim b/dot_config/nvim/colors/apple.vim @@ -0,0 +1,75 @@ +hi clear +syntax reset +let g:colors_name = "apple" +set background=dark +set t_Co=256 +hi Normal guifg=#c6c6c4 ctermbg=NONE guibg=#10100e gui=NONE + +hi DiffText guifg=#c40233 guibg=NONE +hi ErrorMsg guifg=#c40233 guibg=NONE +hi WarningMsg guifg=#c40233 guibg=NONE +hi PreProc guifg=#c40233 guibg=NONE +hi Exception guifg=#c40233 guibg=NONE +hi Error guifg=#c40233 guibg=NONE +hi DiffDelete guifg=#c40233 guibg=NONE +hi GitGutterDelete guifg=#c40233 guibg=NONE +hi GitGutterChangeDelete guifg=#c40233 guibg=NONE +hi cssIdentifier guifg=#c40233 guibg=NONE +hi cssImportant guifg=#c40233 guibg=NONE +hi Type guifg=#c40233 guibg=NONE +hi Identifier guifg=#c40233 guibg=NONE +hi PMenuSel guifg=#009f6b guibg=NONE +hi Constant guifg=#009f6b guibg=NONE +hi Repeat guifg=#009f6b guibg=NONE +hi DiffAdd guifg=#009f6b guibg=NONE +hi GitGutterAdd guifg=#009f6b guibg=NONE +hi cssIncludeKeyword guifg=#009f6b guibg=NONE +hi Keyword guifg=#009f6b guibg=NONE +hi IncSearch guifg=#ffd700 guibg=NONE +hi Title guifg=#ffd700 guibg=NONE +hi PreCondit guifg=#ffd700 guibg=NONE +hi Debug guifg=#ffd700 guibg=NONE +hi SpecialChar guifg=#ffd700 guibg=NONE +hi Conditional guifg=#ffd700 guibg=NONE +hi Todo guifg=#ffd700 guibg=NONE +hi Special guifg=#ffd700 guibg=NONE +hi Label guifg=#ffd700 guibg=NONE +hi Delimiter guifg=#ffd700 guibg=NONE +hi Number guifg=#ffd700 guibg=NONE +hi CursorLineNR guifg=#ffd700 guibg=NONE +hi Define guifg=#ffd700 guibg=NONE +hi MoreMsg guifg=#ffd700 guibg=NONE +hi Tag guifg=#ffd700 guibg=NONE +hi String guifg=#ffd700 guibg=NONE +hi MatchParen guifg=#ffd700 guibg=NONE +hi Macro guifg=#ffd700 guibg=NONE +hi DiffChange guifg=#ffd700 guibg=NONE +hi GitGutterChange guifg=#ffd700 guibg=NONE +hi cssColor guifg=#ffd700 guibg=NONE +hi Function guifg=#0087bd guibg=NONE +hi Directory guifg=#9a4eae guibg=NONE +hi markdownLinkText guifg=#9a4eae guibg=NONE +hi javaScriptBoolean guifg=#9a4eae guibg=NONE +hi Include guifg=#9a4eae guibg=NONE +hi Storage guifg=#9a4eae guibg=NONE +hi cssClassName guifg=#9a4eae guibg=NONE +hi cssClassNameDot guifg=#9a4eae guibg=NONE +hi Statement guifg=#20b2aa guibg=NONE +hi Operator guifg=#20b2aa guibg=NONE +hi cssAttr guifg=#20b2aa guibg=NONE + +hi Pmenu guifg=#c6c6c4 guibg=#454545 +hi SignColumn guibg=#10100e +hi Title guifg=#c6c6c4 +hi LineNr guifg=#61615d guibg=#10100e +hi NonText guifg=#c481ff guibg=#10100e +hi Comment guifg=#c481ff gui=italic +hi SpecialComment guifg=#c481ff gui=italic guibg=NONE +hi CursorLine guibg=#454545 +hi TabLineFill gui=NONE guibg=#454545 +hi TabLine guifg=#61615d guibg=#454545 gui=NONE +hi StatusLine gui=bold guibg=#454545 guifg=#c6c6c4 +hi StatusLineNC gui=NONE guibg=#10100e guifg=#c6c6c4 +hi Search guibg=#c481ff guifg=#c6c6c4 +hi VertSplit gui=NONE guifg=#454545 guibg=NONE +hi Visual gui=NONE guibg=#454545 diff --git a/dot_config/nvim/colors/tomorrow-night-burns.vim b/dot_config/nvim/colors/tomorrow-night-burns.vim @@ -0,0 +1,75 @@ +hi clear +syntax reset +let g:colors_name = "tomorrow-night-burns" +set background=dark +set t_Co=256 +hi Normal guifg=#f5f5f5 ctermbg=NONE guibg=#151515 gui=NONE + +hi DiffText guifg=#832e31 guibg=NONE +hi ErrorMsg guifg=#832e31 guibg=NONE +hi WarningMsg guifg=#832e31 guibg=NONE +hi PreProc guifg=#832e31 guibg=NONE +hi Exception guifg=#832e31 guibg=NONE +hi Error guifg=#832e31 guibg=NONE +hi DiffDelete guifg=#832e31 guibg=NONE +hi GitGutterDelete guifg=#832e31 guibg=NONE +hi GitGutterChangeDelete guifg=#832e31 guibg=NONE +hi cssIdentifier guifg=#832e31 guibg=NONE +hi cssImportant guifg=#832e31 guibg=NONE +hi Type guifg=#832e31 guibg=NONE +hi Identifier guifg=#832e31 guibg=NONE +hi PMenuSel guifg=#a63c40 guibg=NONE +hi Constant guifg=#a63c40 guibg=NONE +hi Repeat guifg=#a63c40 guibg=NONE +hi DiffAdd guifg=#a63c40 guibg=NONE +hi GitGutterAdd guifg=#a63c40 guibg=NONE +hi cssIncludeKeyword guifg=#a63c40 guibg=NONE +hi Keyword guifg=#a63c40 guibg=NONE +hi IncSearch guifg=#d3494e guibg=NONE +hi Title guifg=#d3494e guibg=NONE +hi PreCondit guifg=#d3494e guibg=NONE +hi Debug guifg=#d3494e guibg=NONE +hi SpecialChar guifg=#d3494e guibg=NONE +hi Conditional guifg=#d3494e guibg=NONE +hi Todo guifg=#d3494e guibg=NONE +hi Special guifg=#d3494e guibg=NONE +hi Label guifg=#d3494e guibg=NONE +hi Delimiter guifg=#d3494e guibg=NONE +hi Number guifg=#d3494e guibg=NONE +hi CursorLineNR guifg=#d3494e guibg=NONE +hi Define guifg=#d3494e guibg=NONE +hi MoreMsg guifg=#d3494e guibg=NONE +hi Tag guifg=#d3494e guibg=NONE +hi String guifg=#d3494e guibg=NONE +hi MatchParen guifg=#d3494e guibg=NONE +hi Macro guifg=#d3494e guibg=NONE +hi DiffChange guifg=#d3494e guibg=NONE +hi GitGutterChange guifg=#d3494e guibg=NONE +hi cssColor guifg=#d3494e guibg=NONE +hi Function guifg=#fc595f guibg=NONE +hi Directory guifg=#df9395 guibg=NONE +hi markdownLinkText guifg=#df9395 guibg=NONE +hi javaScriptBoolean guifg=#df9395 guibg=NONE +hi Include guifg=#df9395 guibg=NONE +hi Storage guifg=#df9395 guibg=NONE +hi cssClassName guifg=#df9395 guibg=NONE +hi cssClassNameDot guifg=#df9395 guibg=NONE +hi Statement guifg=#ba8586 guibg=NONE +hi Operator guifg=#ba8586 guibg=NONE +hi cssAttr guifg=#ba8586 guibg=NONE + +hi Pmenu guifg=#f5f5f5 guibg=#454545 +hi SignColumn guibg=#151515 +hi Title guifg=#f5f5f5 +hi LineNr guifg=#8f8f8f guibg=#151515 +hi NonText guifg=#df9395 guibg=#151515 +hi Comment guifg=#df9395 gui=italic +hi SpecialComment guifg=#df9395 gui=italic guibg=NONE +hi CursorLine guibg=#454545 +hi TabLineFill gui=NONE guibg=#454545 +hi TabLine guifg=#8f8f8f guibg=#454545 gui=NONE +hi StatusLine gui=bold guibg=#454545 guifg=#f5f5f5 +hi StatusLineNC gui=NONE guibg=#151515 guifg=#f5f5f5 +hi Search guibg=#df9395 guifg=#f5f5f5 +hi VertSplit gui=NONE guifg=#454545 guibg=NONE +hi Visual gui=NONE guibg=#454545 diff --git a/dot_config/nvim/init.lua.tmpl b/dot_config/nvim/init.lua.tmpl @@ -0,0 +1,88 @@ +----- HELPERS ----- +local function map(mode, lhs, rhs, opts) + local options = { noremap = true } + if opts then options = vim.tbl_extend("force", options, opts) end + vim.api.nvim_set_keymap(mode, lhs, rhs, options) +end + +----- CUSTOMIZE EDITOR ----- +vim.opt.number = true +vim.opt.tabstop = 2 +vim.opt.softtabstop = 2 +vim.opt.shiftwidth = 2 +vim.opt.textwidth = 72 +vim.opt.autoindent = true +vim.opt.expandtab = true +vim.opt.wrap = true +vim.opt.showmode = true +vim.opt.showcmd = true +vim.opt.hlsearch = true +vim.opt.incsearch = true +vim.opt.termguicolors = true +vim.opt.guicursor = "" +vim.opt.completeopt = "menuone,noinsert,noselect" +vim.cmd("colorscheme apple") + +----- VIMWIKI ----- +vim.g.vimwiki_list = { { path = "~/workspace/wiki/" } } +vim.g.vimwiki_global_ext = 1 +vim.g.vimwiki_conceallevel = 0 + +----- CONTROLS ----- +map("", "<Up>", "<Nop>") +map("", "<Down>", "<Nop>") +map("", "<Left>", "<Nop>") +map("", "<Right>", "<Nop>") +map("", "<C-p>", ":Files<cr>") +map("t", "<esc>", "<C-\\><C-N>") +map("n", "glt", ":VimwikiToggleListItem<cr>") +map("", "<C-n>", ":NvimTreeToggle<cr>") +map("", "<leader>r", ":NvimTreeRefresh<cr>") +map("", "<leader>n", ":NvimTreeFindFile<cr>") +map("", "<leader>ff", ":Telescope find_files<cr>") +map("", "<leader>fg", ":Telescope live_grep<cr>") +map("", "<leader>fb", ":Telescope buffers<cr>") +map("", "<leader>fh", ":Telescope help_tags<cr>") + +{{ if eq .chezmoi.os "darwin" -}} +----- PROVIDERS ----- +vim.g.python3_host_prog = "{{ .chezmoi.homeDir }}/.pyenv/versions/py3nvim/bin/python" +{{- end }} + +----- PLUGINS ----- +require "paq-nvim" { + "savq/paq-nvim"; + { "nvim-treesitter/nvim-treesitter", run = ":TSUpdate" }; + "neovim/nvim-lspconfig"; + "nvim-lua/plenary.nvim"; + "nvim-lua/popup.nvim"; + "nvim-lua/completion-nvim"; + "TimUntersberger/neogit"; + "vimwiki/vimwiki"; + "kyazdani42/nvim-web-devicons"; + "kyazdani42/nvim-tree.lua"; + "nvim-telescope/telescope.nvim"; + "folke/zen-mode.nvim"; + "hoob3rt/lualine.nvim"; + "pirmd/gemini.vim"; +} +require("zen-mode").setup { + window = { + height = 0.8, + options = { + number = false + } + } +} +require('lualine').setup { options = { theme = "horizon" } } + +----- LANGUAGE SERVERS ----- +vim.cmd("autocmd BufEnter * lua require'completion'.on_attach()") + +local ts = require "nvim-treesitter.configs" +ts.setup { ensure_installed = "maintained", highlight = { enable = true }} + +require'lspconfig'.gdscript.setup{} +require'lspconfig'.denols.setup{} +require'lspconfig'.sourcekit.setup{} +require'lspconfig'.html.setup{} diff --git a/dot_config/nvim/init.vim.tmpl b/dot_config/nvim/init.vim.tmpl @@ -1,76 +0,0 @@ -" customize editor -set number -set tabstop=2 -set softtabstop=2 -set shiftwidth=2 -set autoindent -set expandtab -set wrap -set showmode -set showcmd -set hlsearch -set incsearch -set guicursor= - -" customize file browser -let g:netrw_liststyle = 3 -let g:netrw_browse_split = 4 -let g:netrw_winsize = 30 -let g:netrw_banner = 0 - -" customize vimwiki -let g:vimwiki_list = [{'path': '~/workspace/wiki/'}] -let g:vimwiki_global_ext = 1 -"" set glt to toggle todos -noremap glt :VimwikiToggleListItem<Cr> -"" automatically update links on read diary -command! Diary VimwikiDiaryIndex -augroup vimwikigroup - autocmd! - autocmd BufRead,BufNewFile diary.wiki VimwikiDiaryGenerateLinks -augroup end - -" customize controls -noremap <Up> <Nop> -noremap <Down> <Nop> -noremap <Left> <Nop> -noremap <Right> <Nop> -nnoremap <C-p> :Files<Cr> -tnoremap <esc> <C-\><C-N> - -{{ if eq .chezmoi.os "darwin" -}} -" provider configs -let g:python3_host_prog = '{{ .chezmoi.homeDir }}/.pyenv/versions/py3nvim/bin/python' -{{- end }} - -" fzf vim integration -set rtp+=/usr/local/opt/fzf - -" limelight.vim config -let g:limelight_conceal_ctermfg = 240 -autocmd! User GoyoEnter Limelight -autocmd! User GoyoLeave Limelight! - -" vim-plug setup -call plug#begin() - -" syntax highlighting -Plug 'chr4/nginx.vim' -Plug 'evanleck/vim-svelte' -Plug 'cespare/vim-toml' -Plug 'zah/nim.vim' -Plug 'pirmd/gemini.vim' -Plug 'keith/swift.vim' -Plug 'habamax/vim-godot' -" tools -Plug 'junegunn/fzf', { 'do': { -> fzf#install() } } -Plug 'junegunn/fzf.vim' -Plug 'tpope/vim-fugitive' -Plug 'vim-scripts/netrw.vim' -Plug 'vimwiki/vimwiki' -" aesthetics -Plug 'vim-airline/vim-airline' -Plug 'junegunn/goyo.vim' -Plug 'junegunn/limelight.vim' - -call plug#end()