From f259ac15a831731aa8bff255b7de78b9a823428e Mon Sep 17 00:00:00 2001 From: ksyasuda Date: Wed, 16 Aug 2023 19:29:40 -0700 Subject: [PATCH] update --- plugin-confs/nvim-cmp.lua | 13 +++++++++++-- plugin-confs/telescope.lua | 2 +- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/plugin-confs/nvim-cmp.lua b/plugin-confs/nvim-cmp.lua index 31bdb38..9aebe69 100644 --- a/plugin-confs/nvim-cmp.lua +++ b/plugin-confs/nvim-cmp.lua @@ -5,6 +5,17 @@ local lspconfig = require('lspconfig') -- luasnip setup local luasnip = require 'luasnip' local highlight = require('cmp.utils.highlight') +local capabilities = require('cmp_nvim_lsp').default_capabilities() + +local has_words_before = function() + if vim.api.nvim_buf_get_option(0, "buftype") == "prompt" then + return false + end + local line, col = unpack(vim.api.nvim_win_get_cursor(0)) + return col ~= 0 and + vim.api.nvim_buf_get_text(0, line - 1, 0, line - 1, col, {})[1]:match( + "^%s*$") == nil +end lspkind.init({ symbol_map = { Copilot = "" } }) @@ -201,8 +212,6 @@ cmp.setup.cmdline(':', { }) }) -local capabilities = require('cmp_nvim_lsp').default_capabilities() - local servers = { 'bashls', 'jedi_language_server', 'jsonls', 'yamlls', 'vimls', 'dotls', 'dockerls', 'html', 'cssls', 'lua_ls' diff --git a/plugin-confs/telescope.lua b/plugin-confs/telescope.lua index 5c67b30..8ae9869 100644 --- a/plugin-confs/telescope.lua +++ b/plugin-confs/telescope.lua @@ -20,7 +20,7 @@ ts.setup({ -- map actions.which_key to (default: ) -- actions.which_key shows the mappings for your picker, -- e.g. git_{create, delete, ...}_branch for the git_branches picker - -- [""] = "which_key" + [""] = "which_key" } }, file_ignore_patterns = { "^node_modules/", "^env/", "^__pycache__/" }