nix fmt to update lua files
This commit is contained in:
parent
330feb587f
commit
2fd7a24284
6 changed files with 219 additions and 219 deletions
|
@ -8,13 +8,13 @@ vim.g.loaded_netrwPlugin = 1
|
|||
vim.opt.termguicolors = true
|
||||
require("nvim-tree").setup()
|
||||
|
||||
require("lualine").setup {
|
||||
require("lualine").setup({
|
||||
options = {
|
||||
theme = "auto",
|
||||
icons_enabled = true,
|
||||
globalstatus = true,
|
||||
}
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
require("gitsigns").setup()
|
||||
|
||||
|
@ -34,7 +34,7 @@ opt.showmode = false
|
|||
opt.mouse = ""
|
||||
opt.wrap = false
|
||||
|
||||
vim.cmd.colorscheme "iceberg"
|
||||
vim.cmd.colorscheme("iceberg")
|
||||
|
||||
keymap.set("n", "<space>s", require("nvim-tree.api").tree.toggle, {
|
||||
desc = "toggle nvim-tree",
|
||||
|
|
|
@ -8,7 +8,7 @@ keymap.set("n", "<leader>fc", fzf.resume, { silent = true })
|
|||
keymap.set("n", "<leader>fs", fzf.treesitter, { silent = true })
|
||||
keymap.set("n", "<leader>fg", fzf.grep_project, { silent = true })
|
||||
|
||||
fzf.setup {
|
||||
fzf.setup({
|
||||
"fzf-native",
|
||||
keymap = {
|
||||
fzf = {
|
||||
|
@ -16,6 +16,6 @@ fzf.setup {
|
|||
["ctrl-d"] = "half-page-down",
|
||||
["ctrl-j"] = "preview-page-down",
|
||||
["ctrl-k"] = "preview-page-up",
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
})
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
local hop = require('hop')
|
||||
local hop = require("hop")
|
||||
local keymap = vim.keymap
|
||||
|
||||
hop.setup {
|
||||
case_insensitive = true;
|
||||
hop.setup({
|
||||
case_insensitive = true,
|
||||
char2_fallback_key = "<CR>",
|
||||
quit_key = "<Esc",
|
||||
}
|
||||
})
|
||||
|
||||
keymap.set({ 'n', 'v', 'o' }, '<C-t>', "", {
|
||||
silent = true;
|
||||
noremap = true;
|
||||
keymap.set({ "n", "v", "o" }, "<C-t>", "", {
|
||||
silent = true,
|
||||
noremap = true,
|
||||
callback = function()
|
||||
hop.hint_char1()
|
||||
end,
|
||||
|
|
|
@ -8,22 +8,22 @@ keymap.set("n", "gr", lsp.buf.references)
|
|||
keymap.set("n", "[d", diagnostic.goto_prev)
|
||||
keymap.set("n", "]d", diagnostic.goto_next)
|
||||
|
||||
diagnostic.config {
|
||||
diagnostic.config({
|
||||
signs = false,
|
||||
}
|
||||
})
|
||||
|
||||
local lspconfig = require("lspconfig")
|
||||
local capabilities = require("cmp_nvim_lsp").default_capabilities()
|
||||
|
||||
lspconfig.pylsp.setup { capabilities = capabilities }
|
||||
lspconfig.clangd.setup { capabilities = capabilities }
|
||||
lspconfig.vimls.setup { capabilities = capabilities }
|
||||
lspconfig.bashls.setup { capabilities = capabilities }
|
||||
lspconfig.rust_analyzer.setup {
|
||||
lspconfig.pylsp.setup({ capabilities = capabilities })
|
||||
lspconfig.clangd.setup({ capabilities = capabilities })
|
||||
lspconfig.vimls.setup({ capabilities = capabilities })
|
||||
lspconfig.bashls.setup({ capabilities = capabilities })
|
||||
lspconfig.rust_analyzer.setup({
|
||||
capabilities = capabilities,
|
||||
}
|
||||
})
|
||||
|
||||
lspconfig.gopls.setup {
|
||||
lspconfig.gopls.setup({
|
||||
settings = {
|
||||
gopls = {
|
||||
analyses = {
|
||||
|
@ -31,46 +31,46 @@ lspconfig.gopls.setup {
|
|||
},
|
||||
staticcheck = true,
|
||||
gofumpt = true,
|
||||
}
|
||||
},
|
||||
},
|
||||
capabilities = capabilities,
|
||||
}
|
||||
})
|
||||
|
||||
lspconfig.lua_ls.setup {
|
||||
lspconfig.lua_ls.setup({
|
||||
capabilities = capabilities,
|
||||
on_init = function(client)
|
||||
if client.workspace_folders then
|
||||
local path = client.workspace_folders[1].name
|
||||
if vim.uv.fs_stat(path..'/.luarc.json') or vim.uv.fs_stat(path..'/.luarc.jsonc') then
|
||||
if vim.uv.fs_stat(path .. "/.luarc.json") or vim.uv.fs_stat(path .. "/.luarc.jsonc") then
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
client.config.settings.Lua = vim.tbl_deep_extend('force', client.config.settings.Lua, {
|
||||
client.config.settings.Lua = vim.tbl_deep_extend("force", client.config.settings.Lua, {
|
||||
runtime = {
|
||||
-- Tell the language server which version of Lua you're using
|
||||
-- (most likely LuaJIT in the case of Neovim)
|
||||
version = 'LuaJIT'
|
||||
version = "LuaJIT",
|
||||
},
|
||||
-- Make the server aware of Neovim runtime files
|
||||
workspace = {
|
||||
checkThirdParty = false,
|
||||
library = {
|
||||
vim.env.VIMRUNTIME
|
||||
vim.env.VIMRUNTIME,
|
||||
-- Depending on the usage, you might want to add additional paths here.
|
||||
-- "${3rd}/luv/library"
|
||||
-- "${3rd}/busted/library",
|
||||
}
|
||||
},
|
||||
-- or pull in all of 'runtimepath'. NOTE: this is a lot slower
|
||||
-- library = vim.api.nvim_get_runtime_file("", true)
|
||||
}
|
||||
},
|
||||
})
|
||||
end,
|
||||
settings = {
|
||||
Lua = {}
|
||||
}
|
||||
}
|
||||
Lua = {},
|
||||
},
|
||||
})
|
||||
|
||||
lspconfig.nixd.setup { capabilities = capabilities }
|
||||
lspconfig.sqls.setup { capabilities = capabilities }
|
||||
lspconfig.hls.setup { capabilities = capabilities }
|
||||
lspconfig.nixd.setup({ capabilities = capabilities })
|
||||
lspconfig.sqls.setup({ capabilities = capabilities })
|
||||
lspconfig.hls.setup({ capabilities = capabilities })
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
local cmp = require("cmp")
|
||||
local luasnip = require("luasnip");
|
||||
local luasnip = require("luasnip")
|
||||
|
||||
cmp.setup {
|
||||
cmp.setup({
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
require('luasnip').lsp_expand(args.body)
|
||||
require("luasnip").lsp_expand(args.body)
|
||||
end,
|
||||
},
|
||||
mapping = {
|
||||
|
@ -50,5 +50,5 @@ cmp.setup {
|
|||
}, {
|
||||
{ name = "buffer" },
|
||||
{ name = "path" },
|
||||
}),
|
||||
})
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ local plugin_specs = {
|
|||
|
||||
{
|
||||
"hrsh7th/nvim-cmp",
|
||||
event = 'VeryLazy',
|
||||
event = "VeryLazy",
|
||||
dependencies = {
|
||||
"hrsh7th/cmp-nvim-lsp",
|
||||
"hrsh7th/cmp-path",
|
||||
|
@ -83,14 +83,14 @@ local plugin_specs = {
|
|||
{ "nvim-lualine/lualine.nvim", dependencies = { "nvim-tree/nvim-web-devicons" } },
|
||||
|
||||
{
|
||||
'smoka7/hop.nvim',
|
||||
"smoka7/hop.nvim",
|
||||
version = "*",
|
||||
config = function()
|
||||
require("config.hop")
|
||||
end,
|
||||
},
|
||||
|
||||
{ "cocopon/iceberg.vim" }
|
||||
{ "cocopon/iceberg.vim" },
|
||||
}
|
||||
|
||||
require("lazy").setup({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue