" Main configuration
set tabstop=2 softtabstop=2 shiftwidth=2 expandtab smarttab autoindent
set mouse=
set laststatus=2
set t_Co=256

" stop overriding terminal bg colour
highlight Normal guibg=none
highlight NonText guibg=none
highlight Normal ctermbg=none
highlight NonText ctermbg=none

source $HOME/.config/nvim/plugins.vim
source $HOME/.config/nvim/keymaps.vim

" Set custom glsl extensions
autocmd! BufNewFile,BufRead *.effect set ft=glsl

" Python plugins, needed for CodeStats
let g:python3_host_prog = '/usr/bin/python'

" CodeStats
let g:codestats_api_key = $CODESTATS_API_KEY

lua require('treesitter')
lua require('autocomplete')
lua require('lsp')

" disable dfraw for text files
if did_filetype()
  finish
endif
if getline(1) =~# '[a-z_]'
  setfiletype dfraw
endif