From db3a1827a48cca249c8366df49056059d39e8733 Mon Sep 17 00:00:00 2001 From: Rokas Puzonas Date: Thu, 11 May 2023 17:31:02 +0300 Subject: [PATCH] update config to work on windows --- lua/config/autosource.lua | 4 ++-- lua/config/treesitter.lua | 3 +++ lua/plugins.lua | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/lua/config/autosource.lua b/lua/config/autosource.lua index 5a7a6e3..0d38e58 100644 --- a/lua/config/autosource.lua +++ b/lua/config/autosource.lua @@ -1,7 +1,7 @@ return { 'jenterkin/vim-autosource', config = function() - local user = os.getenv("USER") - vim.g.autosource_hashdir = '/home/'..user..'/.cache/vim-autosource/hashes' + local data = vim.fn.stdpath("data") + vim.g.autosource_hashdir = data .. '/vim-autosource/hashes' end } diff --git a/lua/config/treesitter.lua b/lua/config/treesitter.lua index a35f111..72530d8 100644 --- a/lua/config/treesitter.lua +++ b/lua/config/treesitter.lua @@ -3,6 +3,9 @@ return { run = function() require('nvim-treesitter.install').update{ with_sync = true } end, config = function () local treesitter = require("nvim-treesitter.configs") + if vim.fn.has("win32") then + require('nvim-treesitter.install').compilers = { "clang" } + end treesitter.setup{ highlight = { enable = true }, diff --git a/lua/plugins.lua b/lua/plugins.lua index e70efc6..72c1935 100644 --- a/lua/plugins.lua +++ b/lua/plugins.lua @@ -42,7 +42,7 @@ return function(use) "nvim-treesitter/nvim-treesitter", "kyazdani42/nvim-web-devicons", "nvim-telescope/telescope-ui-select.nvim", - {"nvim-telescope/telescope-fzf-native.nvim", run = "make"} + {"nvim-telescope/telescope-fzf-native.nvim", run = "make", disable = vim.fn.has("win32")} }, load_config = true }