fix ktfmt
This commit is contained in:
@ -29,6 +29,11 @@ return {
|
|||||||
{ "udalov/kotlin-vim", ft = "kotlin" },
|
{ "udalov/kotlin-vim", ft = "kotlin" },
|
||||||
{ "ray-x/go.nvim", ft = "go" },
|
{ "ray-x/go.nvim", ft = "go" },
|
||||||
{ "ray-x/guihua.lua", ft = "go" },
|
{ "ray-x/guihua.lua", ft = "go" },
|
||||||
|
{
|
||||||
|
"mrcjkb/rustaceanvim",
|
||||||
|
version = "^3", -- Recommended
|
||||||
|
ft = { "rust" },
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"saecki/crates.nvim",
|
"saecki/crates.nvim",
|
||||||
ft = "rust",
|
ft = "rust",
|
||||||
@ -38,11 +43,6 @@ return {
|
|||||||
require("crates").setup()
|
require("crates").setup()
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"mrcjkb/rustaceanvim",
|
|
||||||
version = "^3", -- Recommended
|
|
||||||
ft = { "rust" },
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"rafcamlet/nvim-luapad",
|
"rafcamlet/nvim-luapad",
|
||||||
config = function()
|
config = function()
|
||||||
|
@ -6,8 +6,10 @@ end
|
|||||||
|
|
||||||
vim.opt.rtp:append("/google/src/head/depot/google3/experimental/users/fentanes/nvgoog")
|
vim.opt.rtp:append("/google/src/head/depot/google3/experimental/users/fentanes/nvgoog")
|
||||||
|
|
||||||
local glug = require("nvgoog.google.util.glug").glug
|
-- local glug = require("nvgoog.google.util.glug").glug
|
||||||
local glugOpts = require("nvgoog.google.util.glug").glugOpts
|
-- local glugOpts = require("nvgoog.google.util.glug").glugOpts
|
||||||
|
local glug = require("glug").glug
|
||||||
|
local glugOpts = require("glug").glugOpts
|
||||||
local veryLazy = require("nvgoog.util").veryLazy
|
local veryLazy = require("nvgoog.util").veryLazy
|
||||||
|
|
||||||
return {
|
return {
|
||||||
@ -16,9 +18,8 @@ return {
|
|||||||
-- Load google paths like //google/* with `gf`
|
-- Load google paths like //google/* with `gf`
|
||||||
{ import = "nvgoog.google.misc" },
|
{ import = "nvgoog.google.misc" },
|
||||||
-- maktaba is required by all google plugins
|
-- maktaba is required by all google plugins
|
||||||
-- maktaba is required by all google plugins
|
|
||||||
glug("maktaba", {
|
glug("maktaba", {
|
||||||
lazy = true,
|
lazy = false,
|
||||||
dependencies = {},
|
dependencies = {},
|
||||||
config = function() -- init?
|
config = function() -- init?
|
||||||
vim.cmd("source /usr/share/vim/google/glug/bootstrap.vim")
|
vim.cmd("source /usr/share/vim/google/glug/bootstrap.vim")
|
||||||
@ -88,14 +89,7 @@ return {
|
|||||||
"CorpWebChromeCs",
|
"CorpWebChromeCs",
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
{
|
glug("relatedfiles", {
|
||||||
name = "relatedfiles",
|
|
||||||
dir = "/usr/share/vim/google/relatedfiles",
|
|
||||||
dependencies = { "glaive" },
|
|
||||||
config = function()
|
|
||||||
vim.cmd([[Glaive relatedfiles]])
|
|
||||||
end,
|
|
||||||
|
|
||||||
keys = {
|
keys = {
|
||||||
{
|
{
|
||||||
"<leader>rb",
|
"<leader>rb",
|
||||||
@ -110,14 +104,13 @@ return {
|
|||||||
":exec relatedfiles#selector#JumpToCodeFile()<CR>",
|
":exec relatedfiles#selector#JumpToCodeFile()<CR>",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
}),
|
||||||
{ "junegunn/fzf", dir = "~/.fzf", build = "./install --all" },
|
{ "junegunn/fzf", dir = "~/.fzf", build = "./install --all" },
|
||||||
{ "junegunn/fzf.vim", dependencies = { "junegunn/fzf" } },
|
{ "junegunn/fzf.vim", dependencies = { "junegunn/fzf" } },
|
||||||
-- Format google code
|
-- Format google code
|
||||||
glug("codefmt-google", {
|
glug("codefmt-google", {
|
||||||
dependencies = { glug("codefmt") },
|
dependencies = {
|
||||||
cmd = { "FormatLines", "FormatCode", "AutoFormatBuffer" },
|
glug("codefmt", {
|
||||||
event = "BufWritePre",
|
|
||||||
-- TODO: remove prettier when http://cl/549024543 is submitted and deployed
|
-- TODO: remove prettier when http://cl/549024543 is submitted and deployed
|
||||||
-- - remove prettier from the plugin options
|
-- - remove prettier from the plugin options
|
||||||
-- - set js/ts to use prettier instead of clang-format
|
-- - set js/ts to use prettier instead of clang-format
|
||||||
@ -127,7 +120,7 @@ return {
|
|||||||
clang_format_style = "function('codefmtgoogle#GetClangFormatStyle')",
|
clang_format_style = "function('codefmtgoogle#GetClangFormatStyle')",
|
||||||
gofmt_executable = "/usr/lib/google-golang/bin/gofmt",
|
gofmt_executable = "/usr/lib/google-golang/bin/gofmt",
|
||||||
prettier_executable = "/google/data/ro/teams/prettier/prettier",
|
prettier_executable = "/google/data/ro/teams/prettier/prettier",
|
||||||
ktfmt_executable = { "/google/bin/releases/kotlin-google-eng/ktfmt/ktfmt_deploy.jar", "--google-style" },
|
ktfmt_executable = { "/google/bin/releases/kotlin-google-eng/ktfmt/ktfmt", "--google-style" },
|
||||||
auto_format = {
|
auto_format = {
|
||||||
["borg"] = "gclfmt",
|
["borg"] = "gclfmt",
|
||||||
["gcl"] = "gclfmt",
|
["gcl"] = "gclfmt",
|
||||||
@ -140,6 +133,7 @@ return {
|
|||||||
["dart"] = "dartfmt",
|
["dart"] = "dartfmt",
|
||||||
["go"] = "gofmt",
|
["go"] = "gofmt",
|
||||||
["java"] = "google-java-format",
|
["java"] = "google-java-format",
|
||||||
|
["kotlin"] = "ktfmt",
|
||||||
["jslayout"] = "jslfmt",
|
["jslayout"] = "jslfmt",
|
||||||
["markdown"] = "mdformat",
|
["markdown"] = "mdformat",
|
||||||
["ncl"] = "nclfmt",
|
["ncl"] = "nclfmt",
|
||||||
@ -150,6 +144,10 @@ return {
|
|||||||
["sql"] = "format_sql",
|
["sql"] = "format_sql",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
cmd = { "FormatLines", "FormatCode", "AutoFormatBuffer" },
|
||||||
|
event = "BufWritePre",
|
||||||
-- Setting up autocmds in init allows deferring loading the plugin until
|
-- Setting up autocmds in init allows deferring loading the plugin until
|
||||||
-- the `BufWritePre` event. One caveat is we must call `codefmt#FormatBuffer()`
|
-- the `BufWritePre` event. One caveat is we must call `codefmt#FormatBuffer()`
|
||||||
-- manually the first time since the plugin relies on the `BufWritePre` command to call it,
|
-- manually the first time since the plugin relies on the `BufWritePre` command to call it,
|
||||||
|
Reference in New Issue
Block a user