diff --git a/deploy.sh b/deploy.sh index 81d9897..56ee0f1 100755 --- a/deploy.sh +++ b/deploy.sh @@ -16,8 +16,7 @@ declare -A configs=( ["nvim/after"]="$HOME/.config/nvim/" ["nvim/snippets"]="$HOME/.config/nvim/" ["tmux.conf"]="$HOME/.tmux.conf" - ["wezterm.lua"]="$HOME/.config/wezterm/wezterm.lua" - # ["wezterm.local_linux.lua"]="$HOME/.config/wezterm/local.lua" # TODO: switch contents to elsewhere, be aware of OS, or refactor elsewise + ["wezterm/wezterm.lua"]="$HOME/.config/wezterm/wezterm.lua" ["npmrc"]="$HOME/.npmrc" ) diff --git a/nvim/after/lsp/gdscript.lua b/nvim/after/lsp/gdscript.lua index 6aeeb8e..ccef542 100644 --- a/nvim/after/lsp/gdscript.lua +++ b/nvim/after/lsp/gdscript.lua @@ -2,6 +2,6 @@ return { filetypes = { 'gd', 'gdscript', 'gdscript3' }, - root_markers = {'project.godot', '.git'}, + root_markers = { 'project.godot', '.git' }, cmd = vim.lsp.rpc.connect('127.0.0.1', 6005) } diff --git a/nvim/lua/autocmds.lua b/nvim/lua/autocmds.lua index 5a3b647..c9ee26f 100644 --- a/nvim/lua/autocmds.lua +++ b/nvim/lua/autocmds.lua @@ -1,10 +1,3 @@ --- Fix for treesitter folds, as folds are not recalculated upon buffer changes (especially when pasting text) --- vim.api.nvim_create_autocmd({ 'BufEnter', 'BufNew', 'BufWinEnter' }, { - -- pattern = '*', - -- group = vim.api.nvim_create_augroup('telescope_fold_workaround', { clear = true }), - -- command = 'set foldexpr=nvim_treesitter#foldexpr()', --- }) - -- Disables syntax, treesitter and folding on larger files vim.api.nvim_create_autocmd({ 'BufReadPre' }, { pattern = '*', diff --git a/nvim/lua/settings.lua b/nvim/lua/settings.lua index f74353b..94874f6 100644 --- a/nvim/lua/settings.lua +++ b/nvim/lua/settings.lua @@ -7,7 +7,7 @@ vim.opt.expandtab = true -- Expand ta vim.opt.fileformat = 'unix' -- Explicitly state that files should use the unix style EOL characters. vim.opt.fillchars = 'fold: ' -- Sets the character that fills in a fold line vim.opt.foldcolumn = '0' -- Disables the foldcolumn -vim.opt.foldexpr = 'nvim_treesitter#foldexpr()' -- Uses Treesitter to determine where code folding should occur +vim.opt.foldexpr = 'v:lua.vim.treesitter.foldexpr()' -- Uses Treesitter to determine where code folding should occur vim.opt.foldlevel = 10 -- Sets the initial level at which folds will be closed vim.opt.foldlevelstart = 4 -- Sets the initial fold level vim.opt.foldmethod = 'expr' -- Attempt to use the syntax of a file to set folds. diff --git a/wezterm.local_linux.lua b/wezterm.local_linux.lua deleted file mode 100644 index 1b5e38d..0000000 --- a/wezterm.local_linux.lua +++ /dev/null @@ -1,39 +0,0 @@ -local wezterm = require('wezterm') - -local function setup(config) - -- Fixing the cursor theme - local xcursor_size = nil - local xcursor_theme = nil - - local success, stdout, _ = wezterm.run_child_process({ - "gsettings", - "get", - "org.gnome.desktop.interface", - "cursor-theme" - }) - - if success then - xcursor_theme = stdout:gsub("'(.+)'\n", "%1") - end - - local success, _, _ = wezterm.run_child_process({ - "gsettings", - "get", - "org.gnome.desktop.interface", - "cursor-size" - }) - - if success then - xcursor_size = tonumber(stdout) - end - - config.xcursor_theme = xcursor_theme - config.xcursor_size = xcursor_size - -- end cursor theme - - return config -end - -return { - setup = setup, -} diff --git a/wezterm.lua b/wezterm.lua deleted file mode 100644 index 7918d85..0000000 --- a/wezterm.lua +++ /dev/null @@ -1,34 +0,0 @@ -local wezterm = require 'wezterm' - -local config = wezterm.config_builder() - --- Visual options -config.color_scheme = 's3r0 modified (terminal.sexy)' --- config.color_scheme = 'darkmatrix' --- config.color_scheme = 'Mashup Colors (terminal.sexy)' --- config.color_scheme = 'Gruvbox dark, pale (base16)' --- config.color_scheme = 'Gruvbox Material (Gogh)' - -config.font = wezterm.font 'Inconsolata Nerd Font Mono' -config.font_size = 12 -config.enable_tab_bar = false -config.window_close_confirmation = 'NeverPrompt' -config.window_padding = { - left = '0', - right = '0', - top = '0', - bottom = '0' -} --- config.window_background_opacity = 0.9 --- end visual options - -config.automatically_reload_config = true - -local local_config_filename = os.getenv('HOME') .. '/.config/wezterm/local.lua' -local local_config = io.open(local_config_filename, 'r') -if local_config~=nil then - local local_setup = require('local') - config = local_setup.setup(config) -end - -return config diff --git a/wezterm/wezterm.lua b/wezterm/wezterm.lua new file mode 100644 index 0000000..2a4a2e5 --- /dev/null +++ b/wezterm/wezterm.lua @@ -0,0 +1,65 @@ +local wezterm = require 'wezterm' + +local config = wezterm.config_builder() + +-- Visual options +config.color_scheme = 's3r0 modified (terminal.sexy)' +-- config.color_scheme = 'Mashup Colors (terminal.sexy)' + +config.font = wezterm.font 'Inconsolata Nerd Font Mono' +config.font_size = 12 +config.enable_tab_bar = false +config.window_close_confirmation = 'NeverPrompt' +config.window_padding = { + left = '0', + right = '0', + top = '0', + bottom = '0' +} + +config.window_background_opacity = 0.98 +-- end visual options + +config.automatically_reload_config = true + +-- Linux specific fixes +if wezterm.target_triple == 'x86_64-unknown-linux-gnu' then + -- Fixing the cursor theme + local xcursor_size = nil + local xcursor_theme = nil + + local theme_success, stdout, _ = wezterm.run_child_process({ + "gsettings", + "get", + "org.gnome.desktop.interface", + "cursor-theme" + }) + + if theme_success then + xcursor_theme = stdout:gsub("'(.+)'\n", "%1") + end + + local cursor_success, _, _ = wezterm.run_child_process({ + "gsettings", + "get", + "org.gnome.desktop.interface", + "cursor-size" + }) + + if cursor_success then + xcursor_size = tonumber(stdout) + end + + config.xcursor_theme = xcursor_theme + config.xcursor_size = xcursor_size + -- end cursor theme +end + +local local_config_filename = os.getenv('HOME') .. '/.config/wezterm/local.lua' +local local_config = io.open(local_config_filename, 'r') +if local_config ~= nil then + local local_setup = require('local') + config = local_setup.setup(config) +end + +return config