fix: bad cmp suggestions

This commit is contained in:
Klesh Wong 2022-08-11 14:42:29 +08:00
parent c9d041e710
commit 235f9a6fe4
3 changed files with 20 additions and 18 deletions

2
bin/m
View File

@ -1,5 +1,7 @@
#!/bin/sh #!/bin/sh
[ -n "$TMUX" ] && tmux rename-window "neomutt" [ -n "$TMUX" ] && tmux rename-window "neomutt"
cd ~/Desktop
neomutt neomutt
cd -
[ -n "$TMUX" ] && tmux set automatic-rename on [ -n "$TMUX" ] && tmux set automatic-rename on

View File

@ -30,7 +30,7 @@ require("packer").startup(function(use)
-- lsp -- lsp
use "neovim/nvim-lspconfig" use "neovim/nvim-lspconfig"
use "jose-elias-alvarez/null-ls.nvim" -- use "jose-elias-alvarez/null-ls.nvim"
-- nvim-cmp -- nvim-cmp
use "hrsh7th/nvim-cmp" -- The completion plugin use "hrsh7th/nvim-cmp" -- The completion plugin

View File

@ -35,11 +35,11 @@ local language_servers = {
-- document_formatting = false, -- document_formatting = false,
-- document_range_formatting = false, -- document_range_formatting = false,
-- } -- }
on_attach = function(client, bufnr) -- on_attach = function(client, bufnr)
on_attach(client, bufnr) -- on_attach(client, bufnr)
client.resolved_capabilities.document_formatting = false -- client.resolved_capabilities.document_formatting = false
client.resolved_capabilities.document_range_formatting = false -- client.resolved_capabilities.document_range_formatting = false
end -- end
}, },
-- grammarly = {}, -- grammarly = {},
-- marksman = {}, -- marksman = {},
@ -134,15 +134,15 @@ if cmp_status_ok and luasnip_status_ok then
end end
local null_ls_ok, null_ls = pcall(require, "null-ls") -- local null_ls_ok, null_ls = pcall(require, "null-ls")
if null_ls_ok then -- if null_ls_ok then
null_ls.setup({ -- null_ls.setup({
sources = { -- sources = {
null_ls.builtins.formatting.stylua, -- -- null_ls.builtins.formatting.stylua,
null_ls.builtins.diagnostics.eslint, -- null_ls.builtins.diagnostics.eslint,
null_ls.builtins.completion.spell, -- null_ls.builtins.completion.spell,
null_ls.builtins.formatting.goimports, -- null_ls.builtins.formatting.goimports,
null_ls.builtins.formatting.gofumpt, -- null_ls.builtins.formatting.gofumpt,
}, -- },
}) -- })
end -- end