From 1fbaff0fa6714a81a97fa8add356e970998f2c84 Mon Sep 17 00:00:00 2001 From: Bobby Bingham Date: Tue, 4 Jan 2022 20:49:42 -0600 Subject: nvim: import simple config --- nvim/.config/nvim/init.vim | 22 ++++++++++++++++++++++ nvim/.config/nvim/lua/plugins.lua | 24 ++++++++++++++++++++++++ nvim/.config/nvim/lua/treesitter.lua | 24 ++++++++++++++++++++++++ 3 files changed, 70 insertions(+) create mode 100644 nvim/.config/nvim/init.vim create mode 100644 nvim/.config/nvim/lua/plugins.lua create mode 100644 nvim/.config/nvim/lua/treesitter.lua (limited to 'nvim/.config/nvim') diff --git a/nvim/.config/nvim/init.vim b/nvim/.config/nvim/init.vim new file mode 100644 index 0000000..53f5590 --- /dev/null +++ b/nvim/.config/nvim/init.vim @@ -0,0 +1,22 @@ +lua require('plugins') +lua require('treesitter') + +set nocompatible " disable compatibility to old-time vi +set showmatch " show matching brackets. +set ignorecase " case insensitive matching +set mouse=v " middle-click paste with mouse +set hlsearch " highlight search results +set tabstop=4 " number of columns occupied by a tab character +set softtabstop=4 " see multiple spaces as tabstops so does the right thing +set shiftwidth=4 " width for autoindents +set autoindent " indent a new line the same amount as the line just typed +set number " add line numbers +set wildmode=longest,list " get bash-like tab completions +set cc=120 " set an 120 column border for good coding style +filetype plugin indent on " allows auto-indenting depending on file type +syntax on " syntax highlighting +colorscheme slate " color scheme + +" display whitespace +set listchars=eol:↵,trail:⋅,tab:▷\ ,extends:◣,precedes:◢,nbsp:○ +set list diff --git a/nvim/.config/nvim/lua/plugins.lua b/nvim/.config/nvim/lua/plugins.lua new file mode 100644 index 0000000..849b1fc --- /dev/null +++ b/nvim/.config/nvim/lua/plugins.lua @@ -0,0 +1,24 @@ +-- This file can be loaded by calling `lua require('plugins')` from your init.vim + +-- Only required if you have packer configured as `opt` +vim.cmd [[packadd packer.nvim]] + +-- Recompile packer config after editing this file +vim.cmd([[ + augroup packer_user_config + autocmd! + autocmd BufWritePost plugins.lua source | PackerCompile + augroup end +]]) + +return require('packer').startup(function() + -- Packer can manage itself + use 'wbthomason/packer.nvim' + + -- Tree Sitter + use { + 'nvim-treesitter/nvim-treesitter', + run = ':TSUpdate' + } +end) + diff --git a/nvim/.config/nvim/lua/treesitter.lua b/nvim/.config/nvim/lua/treesitter.lua new file mode 100644 index 0000000..8e4d4a8 --- /dev/null +++ b/nvim/.config/nvim/lua/treesitter.lua @@ -0,0 +1,24 @@ +require("nvim-treesitter.configs").setup { + -- one of "all", "maintained" (parsers with maintainers), or a list of languages + ensure_installed = "maintained", + + -- install languages synchronously (only applied to `ensure_installed`) + sync_install = false, + + -- List of parsers to ignore installing + -- ignore_install = { "javascript" }, + + highlight = { + -- false will disable the whole extension + enable = true, + + -- list of language that will be disabled + -- disable = { "c", "rust" }, + + -- Setting this to true will run `:h syntax` and tree-sitter at the same time. + -- Set this to `true` if you depend on 'syntax' being enabled (like for indentation). + -- Using this option may slow down your editor, and you may see some duplicate highlights. + -- Instead of true it can also be a list of languages + additional_vim_regex_highlighting = false, + }, +} -- cgit v1.2.3