From 20614d8bd13973e2d22ecf39b28ad4d209d4cb9e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Lukas=20H=C3=A4gele?= Date: Sun, 22 Mar 2026 14:33:05 +0100 Subject: [PATCH] integrate different OSes into the config (currently linux / freebsd) --- lua/config/lazy.lua | 1 - lua/config/plugins/completion.lua | 10 +++++++++- lua/config/plugins/telescope.lua | 8 +++++++- lua/config/plugins/theme.lua | 5 +++++ 4 files changed, 21 insertions(+), 3 deletions(-) create mode 100644 lua/config/plugins/theme.lua diff --git a/lua/config/lazy.lua b/lua/config/lazy.lua index b949579..3f46891 100644 --- a/lua/config/lazy.lua +++ b/lua/config/lazy.lua @@ -25,7 +25,6 @@ vim.g.maplocalleader = "\\" -- Setup lazy.nvim require("lazy").setup({ spec = { - { "folke/tokyonight.nvim", config = function() vim.cmd.colorscheme "tokyonight" end }, { import = "config.plugins" }, } }) diff --git a/lua/config/plugins/completion.lua b/lua/config/plugins/completion.lua index 3f2e98b..a0e6551 100644 --- a/lua/config/plugins/completion.lua +++ b/lua/config/plugins/completion.lua @@ -1,3 +1,10 @@ +if jit.os == "Linux" then + implementation = "prefer_rust_with_warning" +elseif jit.os == "BSD" then + implementation = "lua" +end + + return { { 'saghen/blink.cmp', @@ -13,7 +20,8 @@ return { nerd_font_variant = 'mono' }, - signature = { enabled = true } + signature = { enabled = true }, + fuzzy = { implementation = implementation } }, }, } diff --git a/lua/config/plugins/telescope.lua b/lua/config/plugins/telescope.lua index 79d35d8..7e141b4 100644 --- a/lua/config/plugins/telescope.lua +++ b/lua/config/plugins/telescope.lua @@ -1,9 +1,15 @@ +if jit.os == "Linux" then + build = 'make' +elseif jit.os == "BSD" then + build = 'gmake' +end + return { 'nvim-telescope/telescope.nvim', tag = '0.1.8', dependencies = { 'nvim-lua/plenary.nvim', - { 'nvim-telescope/telescope-fzf-native.nvim', build = 'make' } + { 'nvim-telescope/telescope-fzf-native.nvim', build = build } }, config = function() require('telescope').setup { diff --git a/lua/config/plugins/theme.lua b/lua/config/plugins/theme.lua new file mode 100644 index 0000000..e49d575 --- /dev/null +++ b/lua/config/plugins/theme.lua @@ -0,0 +1,5 @@ +if jit.os == "Linux" then + return { "folke/tokyonight.nvim", config = function() vim.cmd.colorscheme "tokyonight" end } +elseif jit.os == "BSD" then + return { "shaunsingh/nord.nvim", config = function() vim.cmd.colorscheme "nord" end } +end -- 2.39.5