From 9c4f4133327bee81f9953c7c299b7b8234bda70b Mon Sep 17 00:00:00 2001 From: Tovi Jaeschke-Rogers Date: Thu, 14 Nov 2024 12:15:37 +1030 Subject: [PATCH] feat: add csvview to nvim plugins --- .config/nvim/lua/core/autocmd.lua | 2 +- .config/nvim/lua/plugins/csvview.lua | 6 ++++++ .config/nvim/lua/plugins/lspconfig.lua | 3 ++- .config/nvim/lua/plugins/nvim-cmp.lua | 13 +++++++++++++ .config/zsh/.zshrc | 2 ++ 5 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 .config/nvim/lua/plugins/csvview.lua diff --git a/.config/nvim/lua/core/autocmd.lua b/.config/nvim/lua/core/autocmd.lua index ddac426..f6b69f3 100644 --- a/.config/nvim/lua/core/autocmd.lua +++ b/.config/nvim/lua/core/autocmd.lua @@ -28,7 +28,7 @@ local aucmd_dict = { FileType = { { -- Set tabstop to 2 for Dart, Vue, JavaScript, TypeScript, and JSON files - pattern = "dart,vue,javascript,typescript,json,markdown", + pattern = "dart,vue,javascript,typescript,typescriptreact,json,markdown", callback = function() vim.opt_local.tabstop = 2 vim.opt_local.softtabstop = 2 diff --git a/.config/nvim/lua/plugins/csvview.lua b/.config/nvim/lua/plugins/csvview.lua new file mode 100644 index 0000000..f3f25f8 --- /dev/null +++ b/.config/nvim/lua/plugins/csvview.lua @@ -0,0 +1,6 @@ +return { + 'hat0uma/csvview.nvim', + config = function() + require('csvview').setup() + end +} diff --git a/.config/nvim/lua/plugins/lspconfig.lua b/.config/nvim/lua/plugins/lspconfig.lua index 196903e..76d6188 100644 --- a/.config/nvim/lua/plugins/lspconfig.lua +++ b/.config/nvim/lua/plugins/lspconfig.lua @@ -159,7 +159,7 @@ return { { name = "@vue/typescript-plugin", location = base_path .. "/@vue/typescript-plugin", - languages = { "javascript", "typescript", "vue" }, + languages = { "javascript", "typescript", "vue", "react" }, }, }, }, @@ -167,6 +167,7 @@ return { "javascript", "typescript", "vue", + "typescriptreact", }, }, diff --git a/.config/nvim/lua/plugins/nvim-cmp.lua b/.config/nvim/lua/plugins/nvim-cmp.lua index 68cc64c..3086111 100644 --- a/.config/nvim/lua/plugins/nvim-cmp.lua +++ b/.config/nvim/lua/plugins/nvim-cmp.lua @@ -28,6 +28,8 @@ return { "hrsh7th/cmp-buffer", "hrsh7th/cmp-path", "hrsh7th/cmp-nvim-lsp-signature-help", + + "Snikimonkd/cmp-go-pkgs", }, config = function() local cmp = require("cmp") @@ -68,11 +70,21 @@ return { { name = "buffer" }, { name = "path" }, { name = "vim-dadbod-completion" }, + { name = "go_pkgs" }, }, + matching = { + disallow_fullfuzzy_matching = false, + disallow_partial_fuzzy_matching = false, + disallow_fuzzy_matching = false, + disallow_partial_matching = false, + disallow_symbol_nonprefix_matching = false, + disallow_prefix_unmatching = false, + }, formatting = { expandable_indicator = true, fields = { "abbr", "kind", "menu" }, format = lspkind.cmp_format({ + with_text = true, mode = "symbol_text", menu = { nvim_lua = "[API]", @@ -81,6 +93,7 @@ return { vim_dadbod_completion = "[DBUI]", path = "[PATH]", buffer = "[BUFF]", + go_pkgs = "[PKGS]", }, }), }, diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc index a2ca0ef..02e4cf1 100644 --- a/.config/zsh/.zshrc +++ b/.config/zsh/.zshrc @@ -114,5 +114,7 @@ if [ -f "$HOME/.cargo/env" ]; then . "$HOME/.cargo/env" fi +export PATH=~/.config/composer/vendor/bin:$PATH + # Speed debugging # zprof