mirror of
https://github.com/iofq/nvim.nix.git
synced 2026-01-23 08:55:16 -06:00
no more copilot
This commit is contained in:
parent
d360f0e701
commit
5f5ac17935
10 changed files with 78 additions and 141 deletions
32
nvim/lsp/gopls.lua
Normal file
32
nvim/lsp/gopls.lua
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
return {
|
||||
settings = {
|
||||
gopls = {
|
||||
gofumpt = true,
|
||||
codelenses = {
|
||||
gc_details = true,
|
||||
test = true,
|
||||
},
|
||||
analyses = {
|
||||
unusedvariable = true,
|
||||
unusedparams = true,
|
||||
useany = true,
|
||||
unusedwrite = true,
|
||||
nilness = true,
|
||||
shadow = true,
|
||||
},
|
||||
hints = {
|
||||
assignVariableTypes = true,
|
||||
compositeLiteralFields = true,
|
||||
compositeLiteralTypes = true,
|
||||
constantValues = true,
|
||||
functionTypeParameters = true,
|
||||
rangeVariableTypes = true,
|
||||
parameterNames = true,
|
||||
},
|
||||
usePlaceholders = true,
|
||||
staticcheck = true,
|
||||
completeUnimported = true,
|
||||
semanticTokens = true,
|
||||
},
|
||||
},
|
||||
}
|
||||
23
nvim/lsp/lua_ls.lua
Normal file
23
nvim/lsp/lua_ls.lua
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
return {
|
||||
on_init = function(client)
|
||||
local path = client.workspace_folders[1].name
|
||||
if vim.loop.fs_stat(path .. '/.luarc.json') or vim.loop.fs_stat(path .. '/.luarc.jsonc') then
|
||||
return
|
||||
end
|
||||
|
||||
client.config.settings.Lua = vim.tbl_deep_extend('force', client.config.settings.Lua, {
|
||||
runtime = {
|
||||
version = 'LuaJIT',
|
||||
},
|
||||
workspace = {
|
||||
checkThirdParty = false,
|
||||
library = {
|
||||
vim.env.VIMRUNTIME,
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
settings = {
|
||||
Lua = {},
|
||||
},
|
||||
}
|
||||
|
|
@ -87,7 +87,6 @@ vim.keymap.set('n', '<S-h>', vim.cmd.bprev, { noremap = true, silent = true })
|
|||
vim.keymap.set('v', '<', '<gv')
|
||||
vim.keymap.set('v', '>', '>gv')
|
||||
vim.keymap.set({ 'v', 'n' }, 'q:', '<nop>')
|
||||
vim.keymap.set({ 'n', 'v' }, '<C-b>', '<C-a>') -- usually have C-a mapped to tmux
|
||||
|
||||
-- resize splits if window got resized
|
||||
vim.api.nvim_create_autocmd({ 'VimResized' }, {
|
||||
|
|
|
|||
|
|
@ -1,14 +0,0 @@
|
|||
return {
|
||||
{
|
||||
'zbirenbaum/copilot.lua',
|
||||
cmd = 'Copilot',
|
||||
opts = {
|
||||
panel = {
|
||||
enabled = false,
|
||||
},
|
||||
suggestion = {
|
||||
enabled = false,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
@ -4,7 +4,6 @@ return {
|
|||
event = 'VeryLazy',
|
||||
dependencies = {
|
||||
'mikavilpas/blink-ripgrep.nvim',
|
||||
'fang2hou/blink-copilot',
|
||||
},
|
||||
opts = {
|
||||
enabled = function()
|
||||
|
|
@ -24,7 +23,6 @@ return {
|
|||
'snippets',
|
||||
'omni',
|
||||
'ripgrep',
|
||||
'copilot',
|
||||
},
|
||||
providers = {
|
||||
snippets = {
|
||||
|
|
@ -36,20 +34,6 @@ return {
|
|||
score_offset = -30,
|
||||
async = true,
|
||||
},
|
||||
copilot = {
|
||||
module = 'blink-copilot',
|
||||
name = 'Copilot',
|
||||
score_offset = 10,
|
||||
async = true,
|
||||
opts = {
|
||||
max_completions = 2,
|
||||
debounce = 500,
|
||||
auto_refresh = {
|
||||
backward = false,
|
||||
forward = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
cmdline = {
|
||||
|
|
|
|||
|
|
@ -5,7 +5,8 @@ return {
|
|||
opts = {
|
||||
pinned = true,
|
||||
focus = true,
|
||||
auto_jump = true,
|
||||
follow = false,
|
||||
auto_close = false,
|
||||
win = {
|
||||
size = 0.25,
|
||||
position = 'right',
|
||||
|
|
@ -29,62 +30,6 @@ return {
|
|||
'saghen/blink.cmp',
|
||||
},
|
||||
config = function()
|
||||
vim.lsp.config('gopls', {
|
||||
settings = {
|
||||
gopls = {
|
||||
gofumpt = true,
|
||||
codelenses = {
|
||||
gc_details = true,
|
||||
test = true,
|
||||
},
|
||||
analyses = {
|
||||
unusedvariable = true,
|
||||
unusedparams = true,
|
||||
useany = true,
|
||||
unusedwrite = true,
|
||||
nilness = true,
|
||||
shadow = true,
|
||||
},
|
||||
hints = {
|
||||
assignVariableTypes = true,
|
||||
compositeLiteralFields = true,
|
||||
compositeLiteralTypes = true,
|
||||
constantValues = true,
|
||||
functionTypeParameters = true,
|
||||
rangeVariableTypes = true,
|
||||
parameterNames = true,
|
||||
},
|
||||
usePlaceholders = true,
|
||||
staticcheck = true,
|
||||
completeUnimported = true,
|
||||
semanticTokens = true,
|
||||
},
|
||||
},
|
||||
})
|
||||
vim.lsp.config('lua_ls', {
|
||||
on_init = function(client)
|
||||
local path = client.workspace_folders[1].name
|
||||
if vim.loop.fs_stat(path .. '/.luarc.json') or vim.loop.fs_stat(path .. '/.luarc.jsonc') then
|
||||
return
|
||||
end
|
||||
|
||||
client.config.settings.Lua = vim.tbl_deep_extend('force', client.config.settings.Lua, {
|
||||
runtime = {
|
||||
version = 'LuaJIT',
|
||||
},
|
||||
workspace = {
|
||||
checkThirdParty = false,
|
||||
library = {
|
||||
vim.env.VIMRUNTIME,
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
settings = {
|
||||
Lua = {},
|
||||
},
|
||||
})
|
||||
|
||||
vim.lsp.enable {
|
||||
'nil_ls',
|
||||
'phpactor',
|
||||
|
|
@ -207,6 +152,9 @@ return {
|
|||
go = { 'golangcilint' },
|
||||
ruby = { 'rubocop' },
|
||||
fish = { 'fish' },
|
||||
bash = { 'bash' },
|
||||
nix = { 'nix' },
|
||||
php = { 'php' },
|
||||
}
|
||||
vim.api.nvim_command('au BufWritePost * lua require("lint").try_lint()')
|
||||
end,
|
||||
|
|
|
|||
|
|
@ -9,14 +9,12 @@ return {
|
|||
opts = {
|
||||
bigfile = { enabled = true },
|
||||
bufdelete = { enabled = true },
|
||||
dim = { enabled = true },
|
||||
quickfile = { enabled = true },
|
||||
notifier = { enabled = true },
|
||||
terminal = { enabled = true },
|
||||
indent = { enabled = true },
|
||||
input = { enabled = true },
|
||||
words = { enabled = true },
|
||||
scope = { enabled = true },
|
||||
picker = {
|
||||
enabled = true,
|
||||
matcher = { frecency = true },
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue