update arch
This commit is contained in:
15
.config/nvim/lua/configs/conform.lua
Normal file
15
.config/nvim/lua/configs/conform.lua
Normal file
@@ -0,0 +1,15 @@
|
||||
local options = {
|
||||
formatters_by_ft = {
|
||||
lua = { "stylua" },
|
||||
-- css = { "prettier" },
|
||||
-- html = { "prettier" },
|
||||
},
|
||||
|
||||
-- format_on_save = {
|
||||
-- -- These options will be passed to conform.format()
|
||||
-- timeout_ms = 500,
|
||||
-- lsp_fallback = true,
|
||||
-- },
|
||||
}
|
||||
|
||||
require("conform").setup(options)
|
||||
47
.config/nvim/lua/configs/lazy.lua
Normal file
47
.config/nvim/lua/configs/lazy.lua
Normal file
@@ -0,0 +1,47 @@
|
||||
return {
|
||||
defaults = { lazy = true },
|
||||
install = { colorscheme = { "nvchad" } },
|
||||
|
||||
ui = {
|
||||
icons = {
|
||||
ft = "",
|
||||
lazy = " ",
|
||||
loaded = "",
|
||||
not_loaded = "",
|
||||
},
|
||||
},
|
||||
|
||||
performance = {
|
||||
rtp = {
|
||||
disabled_plugins = {
|
||||
"2html_plugin",
|
||||
"tohtml",
|
||||
"getscript",
|
||||
"getscriptPlugin",
|
||||
"gzip",
|
||||
"logipat",
|
||||
"netrw",
|
||||
"netrwPlugin",
|
||||
"netrwSettings",
|
||||
"netrwFileHandlers",
|
||||
"matchit",
|
||||
"tar",
|
||||
"tarPlugin",
|
||||
"rrhelper",
|
||||
"spellfile_plugin",
|
||||
"vimball",
|
||||
"vimballPlugin",
|
||||
"zip",
|
||||
"zipPlugin",
|
||||
"tutor",
|
||||
"rplugin",
|
||||
"syntax",
|
||||
"synmenu",
|
||||
"optwin",
|
||||
"compiler",
|
||||
"bugreport",
|
||||
"ftplugin",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
23
.config/nvim/lua/configs/lspconfig.lua
Normal file
23
.config/nvim/lua/configs/lspconfig.lua
Normal file
@@ -0,0 +1,23 @@
|
||||
-- EXAMPLE
|
||||
local on_attach = require("nvchad.configs.lspconfig").on_attach
|
||||
local on_init = require("nvchad.configs.lspconfig").on_init
|
||||
local capabilities = require("nvchad.configs.lspconfig").capabilities
|
||||
|
||||
local lspconfig = require "lspconfig"
|
||||
local servers = { "html", "cssls" }
|
||||
|
||||
-- lsps with default config
|
||||
for _, lsp in ipairs(servers) do
|
||||
lspconfig[lsp].setup {
|
||||
on_attach = on_attach,
|
||||
on_init = on_init,
|
||||
capabilities = capabilities,
|
||||
}
|
||||
end
|
||||
|
||||
-- typescript
|
||||
lspconfig.tsserver.setup {
|
||||
on_attach = on_attach,
|
||||
on_init = on_init,
|
||||
capabilities = capabilities,
|
||||
}
|
||||
96
.config/nvim/lua/configs/mappings.lua
Normal file
96
.config/nvim/lua/configs/mappings.lua
Normal file
@@ -0,0 +1,96 @@
|
||||
local M = {}
|
||||
|
||||
M.general = {
|
||||
n = {
|
||||
["<C-h>"] = {"<cmd> TmuxNavigateLeft<CR>", "window left"},
|
||||
["<C-l>"] = {"<cmd> TmuxNavigateRight<CR>", "window right"},
|
||||
["<C-j>"] = {"<cmd> TmuxNavigateDown<CR>", "window down"},
|
||||
["<C-k>"] = {"<cmd> TmuxNavigateUp<CR>", "window up"},
|
||||
}
|
||||
}
|
||||
|
||||
M.dap = {
|
||||
plugin = true,
|
||||
n = {
|
||||
["<leader>db"] = {
|
||||
"<cmd> DapToggleBreakpoint <CR>",
|
||||
"Add breakpoint at line"
|
||||
},
|
||||
["<F5>"] = {
|
||||
"<cmd> DapContinue <CR>",
|
||||
"Start Debugging"
|
||||
},
|
||||
["<F6>"] = {
|
||||
"<cmd> DapTerminate <CR>",
|
||||
"Stop Debugging"
|
||||
},
|
||||
["<F10>"] = {
|
||||
"<cmd> DapStepOver <CR>",
|
||||
"Step Over"
|
||||
},
|
||||
["<F11>"] = {
|
||||
"<cmd> DapStepInto <CR>",
|
||||
"Step Into"
|
||||
},
|
||||
["<F12>"] = {
|
||||
"<cmd> DapStepOut <CR>",
|
||||
"Stop Out"
|
||||
},
|
||||
["<leader>dus"] = {
|
||||
function ()
|
||||
local widgets = require('dap.ui.widgets');
|
||||
local sidebar = widgets.sidebar(widgets.scopes);
|
||||
sidebar.open();
|
||||
end,
|
||||
"Open debugging sidebar"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
M.dap_go = {
|
||||
plugin = true,
|
||||
n = {
|
||||
["<leader>dgt"] = {
|
||||
function()
|
||||
require('dap-go').debug_test()
|
||||
end,
|
||||
"Debug go test"
|
||||
},
|
||||
["<leader>dgl"] = {
|
||||
function()
|
||||
require('dap-go').debug_last()
|
||||
end,
|
||||
"Debug last go test"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
M.gopher = {
|
||||
plugin = true,
|
||||
n = {
|
||||
["<leader>gsj"] = {
|
||||
"<cmd> GoTagAdd json <CR>",
|
||||
"Add json struct tags"
|
||||
},
|
||||
["<leader>gse"] = {
|
||||
"<cmd> GoTagAdd env <CR>",
|
||||
"Add env struct tags"
|
||||
},
|
||||
["<leader>gsy"] = {
|
||||
"<cmd> GoTagAdd yaml <CR>",
|
||||
"Add yaml struct tags"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
M.crates = {
|
||||
n = {
|
||||
["<leader>rcu"] = {
|
||||
function ()
|
||||
require('crates').upgrade_all_crates()
|
||||
end,
|
||||
"update crates"
|
||||
}
|
||||
}
|
||||
}
|
||||
return M
|
||||
11
.config/nvim/lua/configs/treesitter.lua
Normal file
11
.config/nvim/lua/configs/treesitter.lua
Normal file
@@ -0,0 +1,11 @@
|
||||
local parser_config = require 'nvim-treesitter.parsers'.get_parser_configs()
|
||||
--parser_config.powershell_es = {
|
||||
-- install_info = {
|
||||
-- url = "/home/user/.local/share/tree-sitter-PowerShell",
|
||||
-- files = { "src/parser.c" },
|
||||
-- generate_requires_npm = false,
|
||||
-- requires_generate_from_grammar = false,
|
||||
-- },
|
||||
-- filetype = "ps1",
|
||||
--}
|
||||
return parser_config
|
||||
Reference in New Issue
Block a user