first commit
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
local opts = { noremap=true, silent=true }
|
||||
require("bufresize").setup({
|
||||
register = {
|
||||
keys = {
|
||||
{ "n", "<C-w><", "<C-w><", opts },
|
||||
{ "n", "<C-w>>", "<C-w>>", opts },
|
||||
{ "n", "<C-w>+", "<C-w>+", opts },
|
||||
{ "n", "<C-w>-", "<C-w>-", opts },
|
||||
{ "n", "<C-w>_", "<C-w>_", opts },
|
||||
{ "n", "<C-w>=", "<C-w>=", opts },
|
||||
{ "n", "<C-w>|", "<C-w>|", opts },
|
||||
{ "", "<LeftRelease>", "<LeftRelease>", opts },
|
||||
{ "i", "<LeftRelease>", "<LeftRelease><C-o>", opts },
|
||||
},
|
||||
trigger_events = { "BufWinEnter", "WinEnter" },
|
||||
},
|
||||
resize = {
|
||||
keys = {},
|
||||
trigger_events = { "VimResized" },
|
||||
increment = false,
|
||||
},
|
||||
})
|
||||
@@ -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,
|
||||
-- },
|
||||
}
|
||||
|
||||
return options
|
||||
@@ -0,0 +1,64 @@
|
||||
require("copilot").setup({
|
||||
panel = {
|
||||
enabled = true,
|
||||
auto_refresh = true,
|
||||
keymap = {
|
||||
jump_prev = "[[",
|
||||
jump_next = "]]",
|
||||
accept = "<CR>",
|
||||
refresh = "gr",
|
||||
open = "<M-CR>"
|
||||
},
|
||||
layout = {
|
||||
position = "bottom", -- | top | left | right | horizontal | vertical
|
||||
ratio = 0.4
|
||||
},
|
||||
},
|
||||
suggestion = {
|
||||
enabled = true,
|
||||
auto_trigger = true,
|
||||
hide_during_completion = true,
|
||||
debounce = 75,
|
||||
keymap = {
|
||||
accept = "<M-l>",
|
||||
accept_word = false,
|
||||
accept_line = false,
|
||||
next = "<M-]>",
|
||||
prev = "<M-[>",
|
||||
dismiss = "<C-]>",
|
||||
},
|
||||
},
|
||||
filetypes = {
|
||||
yaml = false,
|
||||
markdown = false,
|
||||
help = false,
|
||||
gitcommit = false,
|
||||
gitrebase = false,
|
||||
hgcommit = false,
|
||||
svn = false,
|
||||
cvs = false,
|
||||
python = false,
|
||||
html = false,
|
||||
css = false,
|
||||
sh = false,
|
||||
tex = false,
|
||||
typescript = false,
|
||||
java = false,
|
||||
swift = false,
|
||||
cpp = false,
|
||||
hypr = false,
|
||||
["."] = false,
|
||||
},
|
||||
copilot_node_command = 'node', -- Node.js version must be > 18.x
|
||||
server_opts_overrides = {},
|
||||
vim.api.nvim_create_autocmd({ "VimLeavePre" }, {
|
||||
callback = function()
|
||||
vim.cmd( "CopilotChatSave AutoSave" )
|
||||
end,
|
||||
}),
|
||||
vim.api.nvim_create_autocmd( "VimEnter", {
|
||||
callback = function()
|
||||
vim.cmd( "CopilotChatLoad AutoSave" )
|
||||
end,
|
||||
}),
|
||||
})
|
||||
@@ -0,0 +1,62 @@
|
||||
require("focus").setup({
|
||||
enable = true,
|
||||
commands = true,
|
||||
autoresize = {
|
||||
enable = true,
|
||||
width = 0,
|
||||
height = 0,
|
||||
minwidth = 0,
|
||||
minheight = 0,
|
||||
height_quickfix = 10,
|
||||
},
|
||||
split = {
|
||||
bufnew = false,
|
||||
tmux = false,
|
||||
},
|
||||
ui = {
|
||||
number = false,
|
||||
relativenumber = false,
|
||||
hybridnumber = false,
|
||||
absolutenumber_unfocussed = false,
|
||||
|
||||
cursorline = true,
|
||||
cursorcolumn = false,
|
||||
colorcolumn = {
|
||||
enable = false,
|
||||
list = '+1',
|
||||
},
|
||||
signcolumn = true,
|
||||
winhighlight = false,
|
||||
}
|
||||
})
|
||||
|
||||
local ignore_filetypes = {"NvimTree"}
|
||||
local ignore_buftypes = {"prompt", "popup"}
|
||||
|
||||
local augroup =
|
||||
vim.api.nvim_create_augroup("FocusDisable", { clear = true })
|
||||
|
||||
vim.api.nvim_create_autocmd("WinEnter", {
|
||||
group = augroup,
|
||||
callback = function(_)
|
||||
if vim.tbl_contains(ignore_buftypes, vim.bo.buftype)
|
||||
then
|
||||
vim.w.focus_disable = true
|
||||
else
|
||||
vim.w.focus_disable = false
|
||||
end
|
||||
end,
|
||||
desc = "Disable focus autoresize for BufType",
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
group = augroup,
|
||||
callback = function(_)
|
||||
if vim.tbl_contains(ignore_filetypes, vim.bo.filetype) then
|
||||
vim.b.focus_disable = true
|
||||
else
|
||||
vim.b.focus_disable = false
|
||||
end
|
||||
end,
|
||||
desc = "Disable focus autoresize for FileType",
|
||||
})
|
||||
@@ -0,0 +1,47 @@
|
||||
return {
|
||||
defaults = { lazy = false },
|
||||
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",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
-- load defaults i.e lua_lsp
|
||||
require("nvchad.configs.lspconfig").defaults()
|
||||
-- require'lspconfig'.hyprls.setup{}
|
||||
-- require'lspconfig'.texlab.setup{}
|
||||
|
||||
local lspconfig = require "lspconfig"
|
||||
local nvlsp = require "nvchad.configs.lspconfig"
|
||||
|
||||
-- EXAMPLE
|
||||
local servers = {
|
||||
"html",
|
||||
"cssls",
|
||||
"bashls",
|
||||
"texlab",
|
||||
"hyprls",
|
||||
"pyright",
|
||||
"ts_ls",
|
||||
"java_language_server",
|
||||
"sourcekit",
|
||||
}
|
||||
|
||||
-- lsps with default config
|
||||
for _, lsp in ipairs(servers) do
|
||||
lspconfig[lsp].setup {
|
||||
on_attach = nvlsp.on_attach,
|
||||
on_init = nvlsp.on_init,
|
||||
capabilities = nvlsp.capabilities,
|
||||
}
|
||||
end
|
||||
|
||||
-- configuring single server, example: typescript
|
||||
-- lspconfig.ts_ls.setup {
|
||||
-- on_attach = nvlsp.on_attach,
|
||||
-- on_init = nvlsp.on_init,
|
||||
-- capabilities = nvlsp.capabilities,
|
||||
-- }
|
||||
Reference in New Issue
Block a user