From beba0144da84735ea63835959d99231866454b87 Mon Sep 17 00:00:00 2001 From: Tyler Hallada Date: Fri, 1 Dec 2023 15:26:00 -0500 Subject: [PATCH] Some fixes and add plugins --- lua/install-plugins.lua | 9 ++++++++- lua/plugins/fugitive.lua | 2 ++ lua/plugins/lualine-nvim.lua | 14 +++++++++++++- lua/plugins/null-ls-nvim.lua | 1 + lua/plugins/nvim-cmp.lua | 10 +++++++++- lua/plugins/nvim-colorizer.lua | 1 + lua/plugins/octo-nvim.lua | 4 ++++ lua/user/settings.lua | 2 ++ 8 files changed, 40 insertions(+), 3 deletions(-) create mode 100644 lua/plugins/nvim-colorizer.lua create mode 100644 lua/plugins/octo-nvim.lua diff --git a/lua/install-plugins.lua b/lua/install-plugins.lua index d5f0bab..bbce7b1 100644 --- a/lua/install-plugins.lua +++ b/lua/install-plugins.lua @@ -117,6 +117,7 @@ return require('packer').startup(function(use) 'weilbith/nvim-code-action-menu', cmd = 'CodeActionMenu', } + use 'onsails/lspkind.nvim' use { 'nvim-treesitter/nvim-treesitter', run = function() require('nvim-treesitter.install').update({ with_sync = true }) end, @@ -270,7 +271,7 @@ return require('packer').startup(function(use) 'kyazdani42/nvim-web-devicons', }, config = function() - require('octo').setup() + require('plugins.octo-nvim') end } use { @@ -397,6 +398,12 @@ return require('packer').startup(function(use) require('plugins.drex-nvim') end, } + use { + 'norcalli/nvim-colorizer.lua', + config = function() + require('plugins.nvim-colorizer') + end, + } use { 'folke/which-key.nvim', config = function() diff --git a/lua/plugins/fugitive.lua b/lua/plugins/fugitive.lua index 210da27..c53cbf6 100644 --- a/lua/plugins/fugitive.lua +++ b/lua/plugins/fugitive.lua @@ -7,3 +7,5 @@ vim.keymap.set('n', 'gp', [[Git push]], { noremap = false, sile vim.keymap.set('n', 'gf', [[Git push --force]], { noremap = false, silent = true }) vim.keymap.set('n', 'gu', [[Git pull]], { noremap = false, silent = true }) vim.keymap.set('n', 'gh', [[Git diff --cached]], { noremap = false, silent = true }) +vim.keymap.set('n', 'go', [[Gbrowse]], { noremap = false, silent = true }) +vim.keymap.set('v', 'go', [[Gbrowse]], { noremap = false, silent = true }) diff --git a/lua/plugins/lualine-nvim.lua b/lua/plugins/lualine-nvim.lua index 3b56aba..2a37495 100644 --- a/lua/plugins/lualine-nvim.lua +++ b/lua/plugins/lualine-nvim.lua @@ -9,5 +9,17 @@ require('lualine').setup({ path = 1, -- 0 = just filename, 1 = relative path, 2 = absolute path }, }, - } + }, + inactive_sections = { + lualine_a = {}, + lualine_b = {}, + lualine_c = { { + 'filename', + file_status = true, -- displays file status (readonly status, modified status) + path = 1 -- 0 = just filename, 1 = relative path, 2 = absolute path + } }, + lualine_x = { 'location' }, + lualine_y = {}, + lualine_z = {} + }, }) diff --git a/lua/plugins/null-ls-nvim.lua b/lua/plugins/null-ls-nvim.lua index 6c0abe5..afbee07 100644 --- a/lua/plugins/null-ls-nvim.lua +++ b/lua/plugins/null-ls-nvim.lua @@ -51,6 +51,7 @@ null_ls.setup({ sources = { -- Linter -- null_ls.builtins.diagnostics.eslint_d, + -- null_ls.builtins.diagnostics.prettierd, -- null_ls.builtins.diagnostics.jsonlint, null_ls.builtins.diagnostics.markdownlint, null_ls.builtins.diagnostics.stylelint, diff --git a/lua/plugins/nvim-cmp.lua b/lua/plugins/nvim-cmp.lua index 8b2f239..b89296b 100644 --- a/lua/plugins/nvim-cmp.lua +++ b/lua/plugins/nvim-cmp.lua @@ -1,4 +1,5 @@ -local cmp = require'cmp' +local cmp = require('cmp') +local lspkind = require('lspkind') cmp.setup({ experimental = { ghost_text = true }, @@ -66,6 +67,13 @@ cmp.setup({ comparators = { function(...) return require('cmp_buffer'):compare_locality(...) end, } + }, + formatting = { + format = lspkind.cmp_format({ + mode = 'symbol_text', + maxwidth = 50, + ellipsis_char = '…', + }) } }) diff --git a/lua/plugins/nvim-colorizer.lua b/lua/plugins/nvim-colorizer.lua new file mode 100644 index 0000000..1bd1636 --- /dev/null +++ b/lua/plugins/nvim-colorizer.lua @@ -0,0 +1 @@ +require('colorizer').setup() diff --git a/lua/plugins/octo-nvim.lua b/lua/plugins/octo-nvim.lua new file mode 100644 index 0000000..3acfead --- /dev/null +++ b/lua/plugins/octo-nvim.lua @@ -0,0 +1,4 @@ +require('octo').setup() + +-- Doesn't work, need to set this in settings too +vim.api.nvim_set_hl(0, 'OctoEditable', { bg = '#313131' }) diff --git a/lua/user/settings.lua b/lua/user/settings.lua index 3fe0e28..206fc5e 100644 --- a/lua/user/settings.lua +++ b/lua/user/settings.lua @@ -76,3 +76,5 @@ vim.cmd([[set formatoptions+=wantrqlc]]) vim.g.neovide_scroll_animation_length = 0.3 -- default: 0.3 vim.g.neovide_cursor_animation_length = 0.06 vim.g.neovide_cursor_trail_size = 0.2 -- default: 0.8 + +vim.api.nvim_set_hl(0, 'OctoEditable', { bg = '#313131' })