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