You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
110 lines
4.0 KiB
Lua
110 lines
4.0 KiB
Lua
local function map(mode, lhs, rhs, opts)
|
|
local options = { noremap = true }
|
|
if opts then
|
|
options = vim.tbl_extend("force", options, opts)
|
|
end
|
|
vim.api.nvim_set_keymap(mode, lhs, rhs, options)
|
|
end
|
|
|
|
|
|
return {
|
|
-- Configure AstroNvim updates
|
|
updater = {
|
|
remote = "origin", -- remote to use
|
|
channel = "stable", -- "stable" or "nightly"
|
|
version = "latest", -- "latest", tag name, or regex search like "v1.*" to only do updates before v2 (STABLE ONLY)
|
|
branch = "nightly", -- branch name (NIGHTLY ONLY)
|
|
commit = nil, -- commit hash (NIGHTLY ONLY)
|
|
pin_plugins = nil, -- nil, true, false (nil will pin plugins on stable only)
|
|
skip_prompts = false, -- skip prompts about breaking changes
|
|
show_changelog = true, -- show the changelog after performing an update
|
|
auto_quit = false, -- automatically quit the current session after a successful update
|
|
remotes = { -- easily add new remotes to track
|
|
-- ["remote_name"] = "https://remote_url.come/repo.git", -- full remote url
|
|
-- ["remote2"] = "github_user/repo", -- GitHub user/repo shortcut,
|
|
-- ["remote3"] = "github_user", -- GitHub user assume AstroNvim fork
|
|
},
|
|
},
|
|
|
|
-- Set colorscheme to use
|
|
colorscheme = "catppuccin",
|
|
|
|
-- Diagnostics configuration (for vim.diagnostics.config({...})) when diagnostics are on
|
|
diagnostics = {
|
|
virtual_text = true,
|
|
underline = true,
|
|
},
|
|
|
|
lsp = {
|
|
-- customize lsp formatting options
|
|
formatting = {
|
|
-- control auto formatting on save
|
|
format_on_save = {
|
|
enabled = false, -- enable or disable format on save globally
|
|
allow_filetypes = { -- enable format on save for specified filetypes only
|
|
-- "go",
|
|
},
|
|
ignore_filetypes = { -- disable format on save for specified filetypes
|
|
-- "python",
|
|
},
|
|
},
|
|
disabled = { -- disable formatting capabilities for the listed language servers
|
|
-- disable lua_ls formatting capability if you want to use StyLua to format your lua code
|
|
-- "lua_ls",
|
|
},
|
|
timeout_ms = 1000, -- default format timeout
|
|
-- filter = function(client) -- fully override the default formatting function
|
|
-- return true
|
|
-- end
|
|
},
|
|
-- enable servers that you already have installed without mason
|
|
servers = {
|
|
-- "pyright"
|
|
},
|
|
},
|
|
|
|
-- Configure require("lazy").setup() options
|
|
lazy = {
|
|
defaults = { lazy = true },
|
|
performance = {
|
|
rtp = {
|
|
-- customize default disabled vim plugins
|
|
disabled_plugins = { "tohtml", "gzip", "matchit", "zipPlugin", "netrwPlugin", "tarPlugin" },
|
|
},
|
|
},
|
|
},
|
|
|
|
-- This function is run last and is a good place to configuring
|
|
-- augroups/autocommands and custom filetypes also this just pure lua so
|
|
-- anything that doesn't fit in the normal config locations above can go here
|
|
polish = function()
|
|
vim.cmd "set nornu"
|
|
map("t", "jkl;", "<C-\\><C-n>'")
|
|
map("t", "neio", "<C-\\><C-n>'")
|
|
|
|
require("notify").setup({
|
|
background_colour = '#000000'
|
|
})
|
|
|
|
vim.g.neovide_transparency = .3
|
|
vim.g.neovide_window_blurred = true
|
|
vim.g.neovide_background_color = string.format("#0f1117%x", math.floor(255 * (1 - vim.g.neovide_transparency)))
|
|
vim.opt.title = true
|
|
|
|
if vim.g.neovide then
|
|
vim.keymap.set('n', '<D-s>', ':w<CR>') -- Save
|
|
vim.keymap.set('v', '<D-c>', '"+y') -- Copy
|
|
vim.keymap.set('n', '<D-v>', '"+P') -- Paste normal mode
|
|
vim.keymap.set('v', '<D-v>', '"+P') -- Paste visual mode
|
|
vim.keymap.set('c', '<D-v>', '<C-R>+') -- Paste command mode
|
|
vim.keymap.set('i', '<D-v>', '<ESC>l"+Pli') -- Paste insert mode
|
|
end
|
|
|
|
-- Allow clipboard copy paste in neovim
|
|
vim.api.nvim_set_keymap('', '<D-v>', '+p<CR>', { noremap = true, silent = true})
|
|
vim.api.nvim_set_keymap('!', '<D-v>', '<C-R>+', { noremap = true, silent = true})
|
|
vim.api.nvim_set_keymap('t', '<D-v>', '<C-R>+', { noremap = true, silent = true})
|
|
vim.api.nvim_set_keymap('v', '<D-v>', '<C-R>+', { noremap = true, silent = true})
|
|
end,
|
|
}
|