Merge branch 'updates' into 'main'

Neovim - treesitter only on workstation.

See merge request sagidayan/linux-config!21
This commit is contained in:
Sagi Dayan 2023-02-21 16:41:45 +00:00
commit 60a740f94a
4 changed files with 21 additions and 4 deletions

View file

@ -1,3 +1,5 @@
local treesitter_extention_exists, _ = pcall(require, 'user.packer_extention_treesitter')
return require("packer").startup(function(use)
-- Packer can manage itself
use 'wbthomason/packer.nvim'
@ -60,10 +62,12 @@ return require("packer").startup(function(use)
requires = { { 'nvim-lua/plenary.nvim' } }
}
use {
'nvim-treesitter/nvim-treesitter',
run = ':TSUpdate'
}
if treesitter_extention_exists then
use {
'nvim-treesitter/nvim-treesitter',
run = ':TSUpdate'
}
end
-- Beacon
use 'danilamihailov/beacon.nvim'

View file

@ -5,6 +5,8 @@
theme: gruvbox
# The running user
running_user: "{{ ansible_user_id }}"
# for nvim - workstation should install extentions
nvim_extention_treesitter: true
roles:
- base
- fonts

View file

@ -0,0 +1,2 @@
---
nvim_extention_treesitter: false

View file

@ -22,3 +22,12 @@
copy:
src: dotfiles/nvim/
dest: ~/.config/nvim/
- name: Debug extentions
debug:
msg: "TreeSitter: {{ nvim_extention_treesitter }}"
- name: nvim extention treesitter
shell: |
echo "return {}" > ~/.config/nvim/lua/user/packer_extention_treesitter.lua
when: nvim_extention_treesitter