From 60f4592f8a98e2d463f75c1e6afe9d5b4875887f Mon Sep 17 00:00:00 2001 From: afonsofrancof Date: Fri, 9 Dec 2022 09:41:34 +0000 Subject: [PATCH 1/2] Removed unused plugins, and added treesitter-context --- .config/nvim/lua/plugins/packer.lua | 20 ++++++------------- .../nvim/lua/plugins/treesitter-context.lua | 8 ++++++++ 2 files changed, 14 insertions(+), 14 deletions(-) create mode 100644 .config/nvim/lua/plugins/treesitter-context.lua diff --git a/.config/nvim/lua/plugins/packer.lua b/.config/nvim/lua/plugins/packer.lua index d237ba3..2bc4a53 100644 --- a/.config/nvim/lua/plugins/packer.lua +++ b/.config/nvim/lua/plugins/packer.lua @@ -105,6 +105,12 @@ local plugins = packer.startup({function(use) end } + use {"nvim-treesitter/nvim-treesitter-context", + config = function() + require "plugins.treesitter-context" + end + } + --Tabs use {'romgrk/barbar.nvim', requires = 'kyazdani42/nvim-web-devicons', @@ -120,20 +126,6 @@ local plugins = packer.startup({function(use) requires = { {'nvim-lua/plenary.nvim'} }, config = function() require('plugins.telescope') end } - --live share like functionality - use {"jbyuki/instant.nvim"} - - use {"narutoxy/silicon.lua", - requires = { "nvim-lua/plenary.nvim" }, - config = function() - require('silicon').setup({ - font = "FiraCode Nerd Font Mono", - output = "~/Pictures/SILICON_${year}-${month}-${date}.png", - debug = true - }) - require "plugins.silicon" - end - } use {"tpope/vim-surround"} diff --git a/.config/nvim/lua/plugins/treesitter-context.lua b/.config/nvim/lua/plugins/treesitter-context.lua new file mode 100644 index 0000000..97a406d --- /dev/null +++ b/.config/nvim/lua/plugins/treesitter-context.lua @@ -0,0 +1,8 @@ +require'treesitter-context'.setup{ + patterns = { + rust = { + 'impl_item', + 'match', + }, + } +} From 48d63444b61216c22b92c4b39cfed97a58e57154 Mon Sep 17 00:00:00 2001 From: afonsofrancof Date: Fri, 9 Dec 2022 10:52:00 +0000 Subject: [PATCH 2/2] lualine --- .config/nvim/lua/plugins/lualine.lua | 40 ++++++++++++++++++++++++++++ .config/nvim/lua/plugins/packer.lua | 30 +++++++++------------ .config/nvim/lua/plugins/theme.lua | 19 ++++++++++++- 3 files changed, 71 insertions(+), 18 deletions(-) create mode 100644 .config/nvim/lua/plugins/lualine.lua diff --git a/.config/nvim/lua/plugins/lualine.lua b/.config/nvim/lua/plugins/lualine.lua new file mode 100644 index 0000000..56c426a --- /dev/null +++ b/.config/nvim/lua/plugins/lualine.lua @@ -0,0 +1,40 @@ +require('lualine').setup { + options = { + icons_enabled = true, + theme = 'auto', + component_separators = { left = '', right = ''}, + section_separators = { left = '', right = ''}, + disabled_filetypes = { + statusline = {}, + winbar = {}, + }, + ignore_focus = {}, + always_divide_middle = true, + globalstatus = false, + refresh = { + statusline = 1000, + tabline = 1000, + winbar = 1000, + } + }, + sections = { + lualine_a = {'mode'}, + lualine_b = {'branch', 'diff', 'diagnostics'}, + lualine_c = {'filename'}, + lualine_x = {'encoding', 'fileformat', 'filetype'}, + lualine_y = {'progress'}, + lualine_z = {'location'} + }, + inactive_sections = { + lualine_a = {}, + lualine_b = {}, + lualine_c = {'filename'}, + lualine_x = {'location'}, + lualine_y = {}, + lualine_z = {} + }, + tabline = {}, + winbar = {}, + inactive_winbar = {}, + extensions = {} +} diff --git a/.config/nvim/lua/plugins/packer.lua b/.config/nvim/lua/plugins/packer.lua index 2bc4a53..414aaf7 100644 --- a/.config/nvim/lua/plugins/packer.lua +++ b/.config/nvim/lua/plugins/packer.lua @@ -31,6 +31,16 @@ local plugins = packer.startup({function(use) config = function() require("nvim-autopairs").setup {} end } + + use {'kyazdani42/nvim-web-devicons'} + + use { + 'nvim-lualine/lualine.nvim', + requires = { 'kyazdani42/nvim-web-devicons', opt = true }, + config = function () + require 'plugins.lualine' + end + } -------------------------------------------------------LSP---------------------------------------------- use { "williamboman/mason.nvim", @@ -70,22 +80,6 @@ local plugins = packer.startup({function(use) end } - --- use {"ms-jpq/coq_nvim", - --- branch = 'coq', - --- config = function () - --- vim.g.coq_settings = { auto_start = 'shut-up'} - --- end - --- - --- } - --- - -- use {"ms-jpq/coq_nvim", - -- branch = 'artifacts', - -- } - ------------------------------------------------------------------------------------------- - - - - use {'nvim-tree/nvim-tree.lua', requires = { @@ -96,9 +90,11 @@ local plugins = packer.startup({function(use) end } use { "feline-nvim/feline.nvim" } + -------------------------------------------THEMES------------------------------------------ use {"joshdick/onedark.vim" } - + use {"catppuccin/nvim"} + ------------------------------------------------------------------------------------------- use {"nvim-treesitter/nvim-treesitter", config = function() require "plugins.treesitter" diff --git a/.config/nvim/lua/plugins/theme.lua b/.config/nvim/lua/plugins/theme.lua index 1c7b190..f7e58b3 100644 --- a/.config/nvim/lua/plugins/theme.lua +++ b/.config/nvim/lua/plugins/theme.lua @@ -1,4 +1,21 @@ -local colorscheme = "onedark" + +--local colorscheme = "onedark" + +require("catppuccin").setup({ + flavour = "frappe", -- latte, frappe, macchiato, mocha + styles = { + comments = { "italic" }, + conditionals = { "italic" }, + }, + integrations = { + cmp = true, + nvimtree = true, + telescope = true, + }, +}) + + +local colorscheme = "catppuccin" local status_ok, _ = pcall(vim.cmd, "colorscheme " .. colorscheme) if not status_ok then