+3
-1
lua/fk/lsp/init.lua
+3
-1
lua/fk/lsp/init.lua
···
6
6
require("nvim-lsp-installer").on_server_ready(function(server)
7
7
server:setup(require "fk.lsp.providers"(server, {
8
8
on_attach = require "fk.lsp.attach",
9
-
capabilities = require("cmp_nvim_lsp").update_capabilities(vim.lsp.protocol.make_client_capabilities()),
9
+
capabilities = require("cmp_nvim_lsp").update_capabilities(
10
+
vim.lsp.protocol.make_client_capabilities()
11
+
),
10
12
flags = { debounce_text_changes = 150 },
11
13
}))
12
14
vim.cmd [[ do User LspAttachBuffers ]]
+5
-1
lua/fk/lsp/providers/init.lua
+5
-1
lua/fk/lsp/providers/init.lua
···
3
3
---@return table
4
4
return function(server, opts)
5
5
if server.name == "sumneko_lua" then
6
-
return vim.tbl_extend("force", opts, require("lua-dev").setup { lspconfig = server:get_default_options() })
6
+
return vim.tbl_extend(
7
+
"force",
8
+
opts,
9
+
require("lua-dev").setup { lspconfig = server:get_default_options() }
10
+
)
7
11
end
8
12
9
13
if server.name == "pyright" then
+5
-1
lua/fk/plugin.lua
+5
-1
lua/fk/plugin.lua
···
21
21
22
22
-- git
23
23
use { "lewis6991/gitsigns.nvim", config = get_config "fk.plugin.gitsigns" }
24
-
use { "TimUntersberger/neogit", cmd = "Neogit", config = get_config "fk.plugin.neogit" }
24
+
use {
25
+
"TimUntersberger/neogit",
26
+
cmd = "Neogit",
27
+
config = get_config "fk.plugin.neogit",
28
+
}
25
29
26
30
-- language specific
27
31
use { "~/code/gopher.nvim", ft = "go" }
+28
-4
lua/fk/plugin/cmp.lua
+28
-4
lua/fk/plugin/cmp.lua
···
10
10
}
11
11
12
12
-- Autopairs
13
-
cmp.event:on("confirm_done", require("nvim-autopairs.completion.cmp").on_confirm_done { map_char = { tex = "" } })
13
+
cmp.event:on(
14
+
"confirm_done",
15
+
require("nvim-autopairs.completion.cmp").on_confirm_done {
16
+
map_char = { tex = "" },
17
+
}
18
+
)
14
19
15
20
cmp.setup {
16
21
snippet = {
···
58
63
["<C-f>"] = cmp.mapping.scroll_docs(4),
59
64
["<C-Space>"] = cmp.mapping.complete(),
60
65
["<C-e>"] = cmp.mapping.close(),
61
-
["<CR>"] = cmp.mapping.confirm { behavior = cmp.ConfirmBehavior.Replace, select = false },
66
+
["<CR>"] = cmp.mapping.confirm {
67
+
behavior = cmp.ConfirmBehavior.Replace,
68
+
select = false,
69
+
},
62
70
["<Tab>"] = function(fallback)
63
71
if cmp.visible() then
64
72
cmp.select_next_item()
65
73
elseif luasnip.expand_or_jumpable() then
66
-
vim.fn.feedkeys(vim.api.nvim_replace_termcodes("<Plug>luasnip-expand-or-jump", true, true, true), "")
74
+
vim.fn.feedkeys(
75
+
vim.api.nvim_replace_termcodes(
76
+
"<Plug>luasnip-expand-or-jump",
77
+
true,
78
+
true,
79
+
true
80
+
),
81
+
""
82
+
)
67
83
else
68
84
fallback()
69
85
end
···
72
88
if cmp.visible() then
73
89
cmp.select_prev_item()
74
90
elseif luasnip.jumpable(-1) then
75
-
vim.fn.feedkeys(vim.api.nvim_replace_termcodes("<Plug>luasnip-jump-prev", true, true, true), "")
91
+
vim.fn.feedkeys(
92
+
vim.api.nvim_replace_termcodes(
93
+
"<Plug>luasnip-jump-prev",
94
+
true,
95
+
true,
96
+
true
97
+
),
98
+
""
99
+
)
76
100
else
77
101
fallback()
78
102
end
+8
-1
lua/fk/plugin/telescope.lua
+8
-1
lua/fk/plugin/telescope.lua
···
17
17
horizontal = { mirror = false },
18
18
vertical = { mirror = false },
19
19
},
20
-
file_ignore_patterns = { ".git", "node_modules", "__pycache__", "target", "vendor", "env", ".bin" },
20
+
file_ignore_patterns = {
21
+
"node_modules",
22
+
"__pycache__",
23
+
"target",
24
+
"vendor",
25
+
".git",
26
+
".bin",
27
+
},
21
28
winblend = 0,
22
29
border = {},
23
30
borderchars = { "─", "│", "─", "│", "╭", "╮", "╯", "╰" },