summaryrefslogtreecommitdiff
path: root/nvim/.config
diff options
context:
space:
mode:
authorBobby Bingham <koorogi@koorogi.info>2022-01-04 20:49:42 -0600
committerBobby Bingham <koorogi@koorogi.info>2022-01-04 20:49:42 -0600
commit1fbaff0fa6714a81a97fa8add356e970998f2c84 (patch)
treeab170b5064fd389604c51985ccbafd7c135c357c /nvim/.config
parent37c69c397fc719b80311f9c130badc7a034fa5a4 (diff)
nvim: import simple config
Diffstat (limited to 'nvim/.config')
-rw-r--r--nvim/.config/nvim/init.vim22
-rw-r--r--nvim/.config/nvim/lua/plugins.lua24
-rw-r--r--nvim/.config/nvim/lua/treesitter.lua24
3 files changed, 70 insertions, 0 deletions
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 <BS> 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 <afile> | 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,
+ },
+}