From f49f85207e8a31625cdd2ccbfd97db90042e6853 Mon Sep 17 00:00:00 2001 From: afranco Date: Sun, 29 Jan 2023 02:08:14 +0000 Subject: [PATCH] chore: Some small updates to dotfiles , getting ready for arch-config --- .config/nvim/ftplugin/haskell.lua | 1 + .config/nvim/lua/core/variables.lua | 3 +++ .config/nvim/lua/plugins/bufferline.lua | 1 - .config/nvim/lua/plugins/catppuccin.lua | 24 +++++++++++++++++++++--- .config/nvim/lua/plugins/cmp.lua | 4 +++- .config/nvim/lua/plugins/lazy.lua | 23 +++++++++++++++-------- .config/nvim/lua/plugins/lualine.lua | 2 +- .config/nvim/lua/plugins/treesitter.lua | 5 ++--- .config/xmonad/xmonad.lhs | 2 +- scripts/projects | 3 +++ 10 files changed, 50 insertions(+), 18 deletions(-) create mode 100644 .config/nvim/ftplugin/haskell.lua create mode 100644 scripts/projects diff --git a/.config/nvim/ftplugin/haskell.lua b/.config/nvim/ftplugin/haskell.lua new file mode 100644 index 0000000..2533b92 --- /dev/null +++ b/.config/nvim/ftplugin/haskell.lua @@ -0,0 +1 @@ +vim.opt_local.formatprg = "floskell --style chris-done" diff --git a/.config/nvim/lua/core/variables.lua b/.config/nvim/lua/core/variables.lua index fa8198f..9b7c44e 100644 --- a/.config/nvim/lua/core/variables.lua +++ b/.config/nvim/lua/core/variables.lua @@ -27,3 +27,6 @@ vim.keymap.set("n", "", "cprevzz") --Undo dir vim.opt.undodir = os.getenv("HOME") .. "/.vim/undodir" vim.opt.undofile = true +--Org mode hide links +vim.opt.conceallevel = 2 +vim.opt.concealcursor = 'nc' diff --git a/.config/nvim/lua/plugins/bufferline.lua b/.config/nvim/lua/plugins/bufferline.lua index c1a93fd..ca37d4f 100644 --- a/.config/nvim/lua/plugins/bufferline.lua +++ b/.config/nvim/lua/plugins/bufferline.lua @@ -67,7 +67,6 @@ require("bufferline").setup({ sort_by = 'insert_after_current', custom_filter = function(buf_number, buf_numbers) -- filter out filetypes you don't want to see - print(vim.bo[buf_number].filetype) if vim.bo[buf_number].filetype ~= "" then return true end diff --git a/.config/nvim/lua/plugins/catppuccin.lua b/.config/nvim/lua/plugins/catppuccin.lua index f7e58b3..b2f8e34 100644 --- a/.config/nvim/lua/plugins/catppuccin.lua +++ b/.config/nvim/lua/plugins/catppuccin.lua @@ -1,4 +1,3 @@ - --local colorscheme = "onedark" require("catppuccin").setup({ @@ -9,8 +8,27 @@ require("catppuccin").setup({ }, integrations = { cmp = true, - nvimtree = true, + treesitter = true, + treesitter_context = true, + fidget = true, telescope = true, + leap = true, + mason = true, + native_lsp = { + enabled = true, + virtual_text = { + errors = { "italic" }, + hints = { "italic" }, + warnings = { "italic" }, + information = { "italic" }, + }, + underlines = { + errors = { "underline" }, + hints = { "underline" }, + warnings = { "underline" }, + information = { "underline" }, + }, + }, }, }) @@ -19,5 +37,5 @@ local colorscheme = "catppuccin" local status_ok, _ = pcall(vim.cmd, "colorscheme " .. colorscheme) if not status_ok then - return + return end diff --git a/.config/nvim/lua/plugins/cmp.lua b/.config/nvim/lua/plugins/cmp.lua index 262a018..115991c 100644 --- a/.config/nvim/lua/plugins/cmp.lua +++ b/.config/nvim/lua/plugins/cmp.lua @@ -135,7 +135,6 @@ cmp.setup { local col = context.cursor.col local char_before_cursor = string.sub(line, col - 1, col - 1) - if char_before_cursor == "." then if kind == 2 or kind == 5 then return true @@ -159,6 +158,9 @@ cmp.setup { { --This sources will only show up if there aren't any sources from the other list { name = "buffer", keyword_length = 5 }, + }, + { + { name = "orgmode" } } ), confirm_opts = { diff --git a/.config/nvim/lua/plugins/lazy.lua b/.config/nvim/lua/plugins/lazy.lua index 7c320df..741df44 100644 --- a/.config/nvim/lua/plugins/lazy.lua +++ b/.config/nvim/lua/plugins/lazy.lua @@ -9,7 +9,7 @@ lazy.setup({ { 'catppuccin/nvim', lazy = false, priority = 1000, - config = function () + config = function() require('plugins.catppuccin') end }, @@ -21,6 +21,14 @@ lazy.setup({ end }, + { 'folke/zen-mode.nvim', + config = function() + require("zen-mode").setup { + vim.keymap.set('n', 'z', ' ZenMode ',{noremap=true,silent=true}) + } + end + }, + --Change add and remove surroundings from words 'tpope/vim-surround', @@ -63,7 +71,11 @@ lazy.setup({ --LSP Status { 'j-hui/fidget.nvim', config = function() - require('fidget').setup {} + require('fidget').setup { + window = { + blend = 0, + } + } end }, @@ -115,12 +127,6 @@ lazy.setup({ require("plugins.bufferline") end }, - --{ 'romgrk/barbar.nvim', - -- dependencies = 'nvim-tree/nvim-web-devicons', - -- config = function() - -- require 'plugins.barbar' - -- end - --}, --does so much { @@ -139,4 +145,5 @@ lazy.setup({ end, }, + }) diff --git a/.config/nvim/lua/plugins/lualine.lua b/.config/nvim/lua/plugins/lualine.lua index da876dd..f842f56 100644 --- a/.config/nvim/lua/plugins/lualine.lua +++ b/.config/nvim/lua/plugins/lualine.lua @@ -1,7 +1,7 @@ require('lualine').setup { options = { icons_enabled = true, - theme = 'auto', + theme = 'catppuccin', component_separators = { left = '', right = ''}, section_separators = { left = '', right = ''}, disabled_filetypes = { diff --git a/.config/nvim/lua/plugins/treesitter.lua b/.config/nvim/lua/plugins/treesitter.lua index 3a7a443..accacbc 100644 --- a/.config/nvim/lua/plugins/treesitter.lua +++ b/.config/nvim/lua/plugins/treesitter.lua @@ -8,14 +8,13 @@ if not present then end local options = { - ensure_installed = { "lua", "haskell", "rust", "markdown", "markdown_inline" }, + ensure_installed = { "c", "lua", "haskell", "rust", "markdown", "markdown_inline" , "org"}, highlight = { enable = true, use_languagetree = true, - additional_vim_regex_highlighting = { "markdown" }, + additional_vim_regex_highlighting = { "markdown" , "org"}, }, - indent = { enable = true, }, diff --git a/.config/xmonad/xmonad.lhs b/.config/xmonad/xmonad.lhs index a9443ea..fc591a4 100644 --- a/.config/xmonad/xmonad.lhs +++ b/.config/xmonad/xmonad.lhs @@ -81,7 +81,7 @@ launch rofi > , ("M-p", spawn "rofi -show drun") -> , ("M-s", spawn "selected=$(ls ~/.config/rofi/scripts/|rofi -dmenu -p \"Run: \") && bash ~/.config/rofi/scripts/$selected") +> , ("M-s", spawn "selected=$(ls ~/scripts/|rofi -dmenu -p \"Run: \") && bash ~/.config/rofi/scripts/$selected") launch web browser diff --git a/scripts/projects b/scripts/projects new file mode 100644 index 0000000..500f83b --- /dev/null +++ b/scripts/projects @@ -0,0 +1,3 @@ +#!/bin/bash +selected=$(ls ~/projects/ | rofi -dmenu -p "Open: ") +alacritty -e fish -c "cd ~/projects/$selected && nvim . && fish"