fix offset encoding
This commit is contained in:
@ -48,6 +48,7 @@
|
|||||||
"leap.nvim": { "branch": "main", "commit": "626be4c4ec040aeaf6466c9aae17ee0ab09f1a5b" },
|
"leap.nvim": { "branch": "main", "commit": "626be4c4ec040aeaf6466c9aae17ee0ab09f1a5b" },
|
||||||
"libp.nvim": { "branch": "main", "commit": "636b1748e92f66022c1763f32b2ded6b8606eda5" },
|
"libp.nvim": { "branch": "main", "commit": "636b1748e92f66022c1763f32b2ded6b8606eda5" },
|
||||||
"lsp-status.nvim": { "branch": "master", "commit": "54f48eb5017632d81d0fd40112065f1d062d0629" },
|
"lsp-status.nvim": { "branch": "master", "commit": "54f48eb5017632d81d0fd40112065f1d062d0629" },
|
||||||
|
"lsp-timeout.nvim": { "branch": "main", "commit": "6325906730330105a9adc41d0ceb8499b3072e2b" },
|
||||||
"lsp-virtual-improved.nvim": { "branch": "master", "commit": "db9cd544b7febdf4c48374e351b3903143b4477d" },
|
"lsp-virtual-improved.nvim": { "branch": "master", "commit": "db9cd544b7febdf4c48374e351b3903143b4477d" },
|
||||||
"lsp-zero.nvim": { "branch": "v3.x", "commit": "e00dcf8a6019a88139626c1668dccdc295abd324" },
|
"lsp-zero.nvim": { "branch": "v3.x", "commit": "e00dcf8a6019a88139626c1668dccdc295abd324" },
|
||||||
"lsp_lines.nvim": { "branch": "main", "commit": "dbfd8e96ec2696e1ceedcd23fd70e842256e3dea" },
|
"lsp_lines.nvim": { "branch": "main", "commit": "dbfd8e96ec2696e1ceedcd23fd70e842256e3dea" },
|
||||||
|
@ -13,7 +13,6 @@ function M.setup(capabilities)
|
|||||||
"--forward_sync_responses",
|
"--forward_sync_responses",
|
||||||
-- "--debug_relay",
|
-- "--debug_relay",
|
||||||
},
|
},
|
||||||
offset_encoding = "utf-8",
|
|
||||||
filetypes = {
|
filetypes = {
|
||||||
"c",
|
"c",
|
||||||
"cpp",
|
"cpp",
|
||||||
@ -39,7 +38,6 @@ function M.setup(capabilities)
|
|||||||
"--lint_on_save=false",
|
"--lint_on_save=false",
|
||||||
"--max_qps=10",
|
"--max_qps=10",
|
||||||
},
|
},
|
||||||
offset_encoding = "utf-8",
|
|
||||||
filetypes = {
|
filetypes = {
|
||||||
"c",
|
"c",
|
||||||
"cpp",
|
"cpp",
|
||||||
@ -97,7 +95,7 @@ function M.setup(capabilities)
|
|||||||
end
|
end
|
||||||
|
|
||||||
lspconfig.ciderlsp.setup({
|
lspconfig.ciderlsp.setup({
|
||||||
capabilities = require("cmp_nvim_lsp").default_capabilities(vim.lsp.protocol.make_client_capabilities()),
|
gapabilities = require("cmp_nvim_lsp").default_capabilities(vim.lsp.protocol.make_client_capabilities()),
|
||||||
on_attach = cider_on_attach,
|
on_attach = cider_on_attach,
|
||||||
handlers = cider_lsp_handlers,
|
handlers = cider_lsp_handlers,
|
||||||
})
|
})
|
||||||
|
@ -12,12 +12,6 @@ return {
|
|||||||
{ "nvim-lua/plenary.nvim", lazy = false },
|
{ "nvim-lua/plenary.nvim", lazy = false },
|
||||||
{ "squk/java-syntax.vim", ft = "java" },
|
{ "squk/java-syntax.vim", ft = "java" },
|
||||||
{ "udalov/kotlin-vim", event = "VeryLazy", ft = "kotlin" },
|
{ "udalov/kotlin-vim", event = "VeryLazy", ft = "kotlin" },
|
||||||
{
|
|
||||||
"ray-x/go.nvim",
|
|
||||||
ft = "go",
|
|
||||||
cond = not use_google(),
|
|
||||||
dependencies = { "ray-x/guihua.lua" },
|
|
||||||
},
|
|
||||||
{ "andymass/vim-matchup", event = "VimEnter" },
|
{ "andymass/vim-matchup", event = "VimEnter" },
|
||||||
{ "jghauser/mkdir.nvim", event = "BufWritePre" },
|
{ "jghauser/mkdir.nvim", event = "BufWritePre" },
|
||||||
-- Session management
|
-- Session management
|
||||||
|
@ -44,7 +44,7 @@ return {
|
|||||||
"hinell/lsp-timeout.nvim",
|
"hinell/lsp-timeout.nvim",
|
||||||
event = { "LspAttach" },
|
event = { "LspAttach" },
|
||||||
dependencies = { "neovim/nvim-lspconfig" },
|
dependencies = { "neovim/nvim-lspconfig" },
|
||||||
cond = not use_google(),
|
-- cond = not use_google(),
|
||||||
config = function()
|
config = function()
|
||||||
vim.g.lspTimeoutConfig = {
|
vim.g.lspTimeoutConfig = {
|
||||||
filetypes = {
|
filetypes = {
|
||||||
@ -56,14 +56,18 @@ return {
|
|||||||
}
|
}
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"ray-x/go.nvim",
|
||||||
|
ft = "go",
|
||||||
|
-- cond = not use_google(),
|
||||||
|
dependencies = { "ray-x/guihua.lua" },
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"neovim/nvim-lspconfig",
|
"neovim/nvim-lspconfig",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"hrsh7th/nvim-cmp",
|
"hrsh7th/nvim-cmp",
|
||||||
"nvim-lua/lsp-status.nvim",
|
"nvim-lua/lsp-status.nvim",
|
||||||
"VonHeikemen/lsp-zero.nvim",
|
"VonHeikemen/lsp-zero.nvim",
|
||||||
"ray-x/go.nvim",
|
|
||||||
"ray-x/guihua.lua",
|
|
||||||
},
|
},
|
||||||
keys = {
|
keys = {
|
||||||
{ "<leader>rn", "<cmd>lua vim.lsp.buf.rename()<CR>" },
|
{ "<leader>rn", "<cmd>lua vim.lsp.buf.rename()<CR>" },
|
||||||
@ -92,6 +96,7 @@ return {
|
|||||||
local capabilities =
|
local capabilities =
|
||||||
require("cmp_nvim_lsp").default_capabilities(vim.lsp.protocol.make_client_capabilities())
|
require("cmp_nvim_lsp").default_capabilities(vim.lsp.protocol.make_client_capabilities())
|
||||||
capabilities = vim.tbl_extend("keep", capabilities or {}, lsp_status.capabilities)
|
capabilities = vim.tbl_extend("keep", capabilities or {}, lsp_status.capabilities)
|
||||||
|
capabilities.offsetEncoding = { "utf-16" }
|
||||||
|
|
||||||
local lspconfig = require("lspconfig")
|
local lspconfig = require("lspconfig")
|
||||||
local configs = require("lspconfig.configs")
|
local configs = require("lspconfig.configs")
|
||||||
@ -107,21 +112,25 @@ return {
|
|||||||
vim.cmd([[autocmd FileType gdscript setlocal autoindent noexpandtab tabstop=4 shiftwidth=4]])
|
vim.cmd([[autocmd FileType gdscript setlocal autoindent noexpandtab tabstop=4 shiftwidth=4]])
|
||||||
|
|
||||||
-- Golang
|
-- Golang
|
||||||
if not use_google then
|
-- if not use_google then
|
||||||
require("go").setup({
|
require("go").setup({
|
||||||
lsp_cfg = {
|
capabilities = capabilities,
|
||||||
capabilities = capabilities,
|
-- root_dir = function(fname)
|
||||||
},
|
-- return string.match(fname, "(/google/src/cloud/[%w_-]+/[%w_-]+/google3/).+$")
|
||||||
})
|
-- end,
|
||||||
local format_sync_grp = vim.api.nvim_create_augroup("GoFormat", {})
|
-- lsp_cfg = {},
|
||||||
vim.api.nvim_create_autocmd("BufWritePre", {
|
})
|
||||||
pattern = "*.go",
|
|
||||||
callback = function()
|
-- Run gofmt + goimports on save
|
||||||
require("go.format").goimport()
|
local format_sync_grp = vim.api.nvim_create_augroup("goimports", {})
|
||||||
end,
|
vim.api.nvim_create_autocmd("BufWritePre", {
|
||||||
group = format_sync_grp,
|
pattern = "*.go",
|
||||||
})
|
callback = function()
|
||||||
end
|
require("go.format").goimports()
|
||||||
|
end,
|
||||||
|
group = format_sync_grp,
|
||||||
|
})
|
||||||
|
-- end
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,15 @@ return {
|
|||||||
{
|
{
|
||||||
"vxpm/ferris.nvim",
|
"vxpm/ferris.nvim",
|
||||||
ft = "rust",
|
ft = "rust",
|
||||||
|
config = function()
|
||||||
|
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||||
|
capabilities.offsetEncoding = { "utf-16" }
|
||||||
|
require("lspconfig").rust_analyzer.setup({
|
||||||
|
-- offset_encoding = "utf-8",
|
||||||
|
-- capabilities,
|
||||||
|
settings = { ["rust-analyzer"] = {} },
|
||||||
|
})
|
||||||
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user