mirror of
https://github.com/davegallant/nix-config
synced 2025-08-06 07:13:40 +00:00
Add nvim-treesitter configs
This commit is contained in:
@@ -180,6 +180,7 @@ in
|
||||
audio-recorder
|
||||
calibre
|
||||
cryptsetup
|
||||
firejail
|
||||
glibcLocales
|
||||
gnome3.gnome-tweaks
|
||||
gnomeExtensions.appindicator
|
||||
|
12
flake.lock
generated
12
flake.lock
generated
@@ -27,11 +27,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1626073055,
|
||||
"narHash": "sha256-vocByfpVu6m9zvtJugDvmd6/9iT2HJuG4tmDICKd0lI=",
|
||||
"lastModified": 1626356862,
|
||||
"narHash": "sha256-4ONLWH4UygF4pI0XBej8+2OMUrdb8HsUUFsiRDFmjrk=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "775cb20bd4af7781fbf336fb201df02ee3d544bb",
|
||||
"rev": "c476cc61b2dd8c7f868b213b7757b565bdf2bb7d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -58,11 +58,11 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1626046891,
|
||||
"narHash": "sha256-Zt8saH+hAehXskW0iFAzk+iMillYoFBxvLReYNqGT9E=",
|
||||
"lastModified": 1626464457,
|
||||
"narHash": "sha256-u2PCh/+8vQSLwf0mPpKHKQ8hAPB3l4uNZR3r0TdK2Lg=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "d8f8f31af9d77a48220e4e8a301d1e79774cb7d2",
|
||||
"rev": "c6c4a3d45ab200f17805d2d86a1ff1cc7ca2b186",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@@ -296,9 +296,13 @@ in
|
||||
plugins = with pkgs.vimPlugins; [
|
||||
completion-nvim
|
||||
gruvbox
|
||||
# gruvbox-nvim # TODO: Not working for some reason?
|
||||
# lush-nvim # required by gruvbox-nvim
|
||||
lualine-nvim
|
||||
nerdtree
|
||||
nvim-lspconfig
|
||||
nvim-treesitter
|
||||
nvim-ts-rainbow
|
||||
rust-vim
|
||||
supertab
|
||||
syntastic
|
||||
@@ -316,6 +320,7 @@ in
|
||||
vim-repeat
|
||||
vim-sneak
|
||||
vim-surround
|
||||
vim-signify
|
||||
vim-terraform
|
||||
];
|
||||
|
||||
@@ -329,6 +334,6 @@ in
|
||||
|
||||
};
|
||||
|
||||
home.file.".config/srv/config.yml".source = ./srv/config.yml;
|
||||
home.file.".config/nvim/init2.lua".source = ./nvim/init2.lua;
|
||||
|
||||
}
|
||||
|
@@ -2,8 +2,6 @@ set autoread
|
||||
set cursorline
|
||||
set encoding=utf-8
|
||||
set expandtab
|
||||
set foldlevel=99
|
||||
set foldmethod=indent
|
||||
set hlsearch
|
||||
set ignorecase
|
||||
set incsearch
|
||||
@@ -58,7 +56,8 @@ au FileType yaml setlocal ts=2 sts=2 sw=2 expandtab
|
||||
" Python indentation
|
||||
au BufNewFile,BufRead *.py set tabstop=4 softtabstop=4 shiftwidth=4 textwidth=79 expandtab autoindent fileformat=unix
|
||||
let python_highlight_all=1
|
||||
syntax on
|
||||
|
||||
set background=dark
|
||||
colorscheme gruvbox
|
||||
|
||||
" Highlight whitespace
|
||||
@@ -150,17 +149,4 @@ set completeopt=menuone,noinsert,noselect
|
||||
" Avoid showing message extra message when using completion
|
||||
set shortmess+=c
|
||||
|
||||
lua << EOF
|
||||
require('lualine').setup()
|
||||
|
||||
require'lspconfig'.bashls.setup{}
|
||||
require'lspconfig'.gopls.setup{}
|
||||
require'lspconfig'.pyright.setup{}
|
||||
require'lspconfig'.rls.setup{}
|
||||
require'lspconfig'.rnix.setup{}
|
||||
require'lspconfig'.solargraph.setup{}
|
||||
require'lspconfig'.terraformls.setup{}
|
||||
require'lspconfig'.tflint.setup{}
|
||||
require'lspconfig'.yamlls.setup{}
|
||||
EOF
|
||||
|
||||
luafile ~/.config/nvim/init2.lua
|
||||
|
43
home/nvim/init2.lua
Normal file
43
home/nvim/init2.lua
Normal file
@@ -0,0 +1,43 @@
|
||||
-- status line
|
||||
require('lualine').setup()
|
||||
|
||||
-- lsp
|
||||
require'lspconfig'.bashls.setup{}
|
||||
require'lspconfig'.gopls.setup{}
|
||||
require'lspconfig'.pyright.setup{}
|
||||
require'lspconfig'.rls.setup{}
|
||||
require'lspconfig'.rnix.setup{}
|
||||
require'lspconfig'.solargraph.setup{}
|
||||
require'lspconfig'.terraformls.setup{}
|
||||
require'lspconfig'.tflint.setup{}
|
||||
require'lspconfig'.yamlls.setup{}
|
||||
|
||||
-- treesitter
|
||||
require('nvim-treesitter.configs').setup({
|
||||
ensure_installed = "all",
|
||||
|
||||
highlight = {
|
||||
enable = true,
|
||||
custom_captures = {
|
||||
-- ["<capture group>"] = "<highlight group>",
|
||||
-- ["keyword"] = "TSString",
|
||||
},
|
||||
},
|
||||
|
||||
indent = {
|
||||
enable = true
|
||||
},
|
||||
|
||||
rainbow = {
|
||||
enable = true,
|
||||
extended_mode = true
|
||||
},
|
||||
})
|
||||
|
||||
vim.api.nvim_exec([[
|
||||
set foldmethod=expr
|
||||
set foldlevel=20
|
||||
set nofoldenable
|
||||
set foldexpr=nvim_treesitter#foldexpr()
|
||||
]], true)
|
||||
|
Reference in New Issue
Block a user