diff --git a/gitignore b/gitignore new file mode 100644 index 0000000..f8b390e --- /dev/null +++ b/gitignore @@ -0,0 +1,2 @@ +.unison_backups +.gdb_history diff --git a/kitty/kitty.conf b/kitty/kitty.conf index 046e864..d47fcaf 100644 --- a/kitty/kitty.conf +++ b/kitty/kitty.conf @@ -1,5 +1,8 @@ # vim:fileencoding=utf-8:ft=conf +draw_minimal_borders yes +hide_window_decorations yes + # Font family. You can also specify different fonts for the # bold/italic/bold-italic variants. By default they are derived automatically, # by the OSes font system. Setting them manually is useful for font families diff --git a/nvim/init.vim b/nvim/init.vim index cfe7393..b564f90 100644 --- a/nvim/init.vim +++ b/nvim/init.vim @@ -11,7 +11,6 @@ nnoremap p :lua vim.diagnostic.goto_prev() nnoremap e :lua vim.diagnostic.open_float() " vim-plug config - call plug#begin() " Plug 'williamboman/mason.nvim' " Plug 'williamboman/mason-lspconfig.nvim' @@ -47,7 +46,13 @@ Plug 'iamcco/markdown-preview.nvim' Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'} -" Plug 'voldikss/vim-floaterm' " Floating terminal window (useless) +Plug 'vimwiki/vimwiki' + +let g:vimwiki_list = [{'path': '~/files/notes', 'syntax': 'markdown', 'ext': 'md'}] +let g:vimwiki_global_ext = 0 +let g:vimwiki_ext2syntax = {} +let g:vimwiki_folding = 'expr' +set foldlevelstart=1 call plug#end() diff --git a/nvim/config.lua b/nvim/lua/config.lua similarity index 96% rename from nvim/config.lua rename to nvim/lua/config.lua index b46c00c..251ffa0 100644 --- a/nvim/config.lua +++ b/nvim/lua/config.lua @@ -34,7 +34,7 @@ require'nvim-treesitter.configs'.setup { --}) vim.api.nvim_create_autocmd("FileType", { - pattern = "tex", + pattern = { "tex", "scilab" }, callback = function() vim.bo.tabstop = 4 vim.bo.shiftwidth = 4 diff --git a/nvim/nvim-cmp.lua b/nvim/lua/nvim-cmp.lua similarity index 57% rename from nvim/nvim-cmp.lua rename to nvim/lua/nvim-cmp.lua index 6c3fd09..e9973bf 100644 --- a/nvim/nvim-cmp.lua +++ b/nvim/lua/nvim-cmp.lua @@ -4,7 +4,8 @@ local cmp = require'cmp' cmp.setup({ snippet = { expand = function(args) - vim.fn["UltiSnips#Anon"](args.body) + -- vim.fn["UltiSnips#ExpandSnippet"]() + vim.fn["UltiSnips#Anon"](args.body) -- previous one mostly works end, }, mapping = cmp.mapping.preset.insert({ @@ -49,31 +50,33 @@ cmp.setup.cmdline(':', { local capabilities = require('cmp_nvim_lsp').default_capabilities() local lsp = require('lspconfig') -lsp.ccls.setup{ - capabilities = capabilities, - init_options = { - cache = { - directory = vim.fn.expand("~/.cache/ccls") -- Store index globally - }, - compilationDatabaseDirectory = "build", -- Uses 'build/compile_commands.json' if present - highlight = { lsRanges = true }, -- Improves semantic highlighting - index = { - threads = 4, -- Adjust based on your CPU (more threads = faster indexing) - initialBlacklist = { ".*_test.cpp", ".*_unittest.cpp" } -- Avoid indexing test files - }, - completion = { - detailedLabel = true -- Better completion info - }, - diagnostics = { - onChange = 300 -- Delay diagnostics updates for better performance - } - } -} +-- lsp.ccls.setup{ +-- capabilities = capabilities, +-- init_options = { +-- cache = { +-- directory = vim.fn.expand("~/.cache/ccls") -- Store index globally +-- }, +-- compilationDatabaseDirectory = "build", -- Uses 'build/compile_commands.json' if present +-- highlight = { lsRanges = true }, -- Improves semantic highlighting +-- index = { +-- threads = 4, -- Adjust based on your CPU (more threads = faster indexing) +-- initialBlacklist = { ".*_test.cpp", ".*_unittest.cpp" } +-- -- initialBlacklist = { ".*_test.cpp", ".*_unittest.cpp", "/home/furtest/linux_bidouille/.*" } -- Avoid indexing test files +-- }, +-- completion = { +-- detailedLabel = true -- Better completion info +-- }, +-- diagnostics = { +-- onChange = 300 -- Delay diagnostics updates for better performance +-- } +-- } +-- } -- clangd and ccls are both C and C++ language servers -- having them both active at the same time is useless --- lsp.clangd.setup { --- capabilities = capabilities, --- } +lsp.clangd.setup { + capabilities = capabilities, + cmd = { "clangd", "--enable-config" }, +} diff --git a/tmux.conf b/tmux.conf deleted file mode 100644 index 6b83f08..0000000 --- a/tmux.conf +++ /dev/null @@ -1,52 +0,0 @@ -unbind C-b -set-option -g prefix C-f -bind r source-file ~/.tmux.conf -bind h select-pane -L -bind l select-pane -R -bind k select-pane -U -bind j select-pane -D -bind g copy-mode - -setw -g mode-keys vi -# don't rename windows automatically -#set-option -g allow-rename off - - -# DESIGN TWEAKS - -# don't do anything when a 'bell' rings -set -g visual-activity off -set -g visual-bell off -set -g visual-silence off -setw -g monitor-activity off -set -g bell-action none - -# clock mode -setw -g clock-mode-colour colour1 - -# copy mode -setw -g mode-style 'fg=colour2 bg=colour18 bold' - -# pane borders -set -g pane-border-style 'fg=colour2' -set -g pane-active-border-style 'fg=colour3' - -# statusbar -set -g status-position bottom -set -g status-justify left -set -g status-style 'fg=colour2' -set -g status-left '' -set -g status-right '%Y-%m-%d %H:%M ' -set -g status-right-length 50 -set -g status-left-length 10 - -setw -g window-status-current-style 'fg=colour0 bg=colour2 bold' -setw -g window-status-current-format ' #I #W #F ' - -setw -g window-status-style 'fg=colour2 dim' -setw -g window-status-format ' #I #[fg=colour7]#W #[fg=colour2]#F ' - -setw -g window-status-bell-style 'fg=colour2 bg=colour1 bold' - -# messages -set -g message-style 'fg=colour2 bg=colour0 bold' diff --git a/tmux/theme.conf b/tmux/theme.conf new file mode 100644 index 0000000..8d89f74 --- /dev/null +++ b/tmux/theme.conf @@ -0,0 +1,22 @@ +bg="default" +default_fg="#D8DEE9" +session_fg="#A3BE8C" +session_selection_fg="#3B4252" +session_selection_bg="#81A1C1" +active_window_fg="#88C0D0" +active_pane_border="#abb2bf" + +set -g status-left-length 200 # default: 10 +set -g status-right-length 200 # default: 10 +set -g status-left "#[fg=${session_fg},bold,bg=${bg}]#[fg=${default_fg},nobold,bg=${bg}]" +set -g status-right '%H:%M ' +set -g status-justify left +set -g status-style "bg=${bg}" +set -g window-status-format "#[fg=${default_fg},bg=default] #I:#W" +set -g window-status-current-format "#[fg=${active_window_fg},bold,bg=default]  #[underscore]#I:#W" +set -g window-status-last-style "fg=${default_fg},bg=default" +set -g message-command-style "bg=default,fg=${default_fg}" +set -g message-style "bg=default,fg=${default_fg}" +set -g mode-style "bg=${session_selection_bg},fg=${session_selection_fg}" +set -g pane-active-border-style "fg=${active_pane_border},bg=default" +set -g pane-border-style "fg=brightblack,bg=default" diff --git a/tmux/tmux.conf b/tmux/tmux.conf new file mode 100644 index 0000000..a5af9fc --- /dev/null +++ b/tmux/tmux.conf @@ -0,0 +1,49 @@ +# List of plugins +set -g @plugin 'tmux-plugins/tpm' +set -g @plugin 'tmux-plugins/tmux-sensible' +set -g @plugin 'noscript/tmux-mighty-scroll' +set -g @plugin 'tmux-plugins/tmux-resurrect' +set -g @plugin 'tmux-plugins/tmux-yank' +set -g @plugin 'schasse/tmux-jump' + +# Use zsh as default +set -g default-shell /bin/zsh + +# Enable 256-color and true-color (24-bit) support in tmux +set -g default-terminal "screen-256color" +set -ga terminal-overrides ",*256col*:Tc" + +# Prefix to Ctrl+f +unbind C-b +set-option -g prefix C-f + +# Reload config +unbind r +bind r source-file ~/.tmux.conf + +# New window in same path +bind c new-window -c "#{pane_current_path}" + +# Move between panes with vim keys +bind h select-pane -L +bind l select-pane -R +bind k select-pane -U +bind j select-pane -D + +bind g copy-mode + +# Move with vi keys +setw -g mode-keys vi + +# Theme +source-file ~/files/scripts/config_files/tmux/theme.conf + +# don't do anything when a 'bell' rings +set -g visual-activity off +set -g visual-bell off +set -g visual-silence off +setw -g monitor-activity off +set -g bell-action none + +# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) +run '~/.tmux/plugins/tpm/tpm' diff --git a/zsh_aliases b/zsh_aliases index 649cce8..5d8f63d 100644 --- a/zsh_aliases +++ b/zsh_aliases @@ -16,7 +16,7 @@ alias szsh='source ~/.zshrc' alias checksec='/home/furtest/application/checksec/checksec' alias leave='tmux detach' alias sudo='sudo -E' -if [ "$(hostnamectl | sed -n 's/Operating System: //p')" = 'Arch Linux' ];then +if [[ "$(hostnamectl | sed -n 's/Operating System: //p')" == *"Arch Linux"* ]];then alias vim='nvim' else alias vim='/home/furtest/application/nvim/bin/nvim' diff --git a/zshrc b/zshrc index 9ad4c1b..49c3736 100644 --- a/zshrc +++ b/zshrc @@ -17,7 +17,18 @@ DISABLE_AUTO_TITLE="true" # Caution: this setting can cause issues with multiline prompts in zsh < 5.7.1 (see #5765) COMPLETION_WAITING_DOTS="true" -plugins=(git common-aliases zsh-autosuggestions sudo colored-man-pages zoxide tmux safe-paste colorize vi-mode) +plugins=(git + common-aliases + zsh-autosuggestions + sudo + colored-man-pages + zoxide + tmux + safe-paste + colorize + vi-mode + poetry +) source $ZSH/oh-my-zsh.sh