dotfiles/config/nvim/init.vim

66 lines
1.4 KiB
VimL
Raw Normal View History

2023-01-17 12:25:23 +02:00
" Load plugins
call plug#begin()
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
Plug 'https://gitlab.com/code-stats/code-stats-vim.git', {'do': ':TSUpdate'}
Plug 'vim-airline/vim-airline', {'do': ':TSUpdate'}
2024-02-09 13:43:57 +02:00
Plug 'catppuccin/nvim', {'as': 'catpputccin'}
2023-01-17 12:25:23 +02:00
call plug#end()
" Python plugins, needed for CodeStats
let g:python3_host_prog = '/usr/bin/python'
2023-01-17 12:25:23 +02:00
" CodeStats
let g:codestats_api_key = $CODESTATS_API_KEY
" Main configuration
2023-01-07 16:12:59 +02:00
set tabstop=2 softtabstop=2 shiftwidth=2 expandtab smarttab autoindent
2023-01-17 12:25:23 +02:00
set mouse=
2023-01-07 16:12:59 +02:00
set laststatus=2
set t_Co=256
2023-01-17 12:25:23 +02:00
lua <<EOF
require 'nvim-treesitter.configs'.setup {
ensure_installed = {
"bash", "vim", "regex",
"cpp", "go", "rust",
"diff", "make",
"dockerfile",
"elixir", "erlang",
"godot_resource", "gdscript",
"git_rebase", "gitattributes", "gitcommit", "gitignore",
"html", "scss",
"http", "sql",
"javascript", "jsdoc", "typescript", "vue",
"json", "json5", "jq",
"lua", "php", "phpdoc",
"markdown", "markdown_inline",
"rst", "yaml",
},
highlight = {
enable = true
}
}
local parser_config = require'nvim-treesitter.parsers'.get_parser_configs()
parser_config.dfraw = {
install_info = {
2024-04-01 07:27:41 +03:00
url = 'https://code.criminallycute.fi/mirrors/tree-sitter-dfraw',
2023-01-17 12:25:23 +02:00
files = { 'src/parser.c' },
branch = 'main'
},
filetype = 'text',
used_by = { 'dfraw' }
}
EOF
" disable dfraw for text files
if did_filetype()
finish
endif
if getline(1) =~# '[a-z_]'
setfiletype dfraw
endif