Basically rebase

This commit is contained in:
Vladislav 2024-03-04 02:52:39 +01:00
parent c9122e89e3
commit 6e53b7028d
No known key found for this signature in database
GPG Key ID: 07A1CCBD643CA257
3 changed files with 44 additions and 14 deletions

View File

@ -232,7 +232,7 @@ require('lazy').setup {
-- require('Comment').setup({})
-- "gc" to comment visual regions/lines
{ 'numToStr/Comment.nvim', opts = {} },
{ 'numToStr/Comment.nvim', opts = {} },
-- Here is a more advanced example where we pass configuration
-- options to `gitsigns.nvim`. This is equivalent to the following lua:
@ -267,7 +267,7 @@ require('lazy').setup {
-- after the plugin has been loaded:
-- config = function() ... end
{ -- Useful plugin to show you pending keybinds.
{ -- Useful plugin to show you pending keybinds.
'folke/which-key.nvim',
event = 'VimEnter', -- Sets the loading event to 'VimEnter'
config = function() -- This is the function that runs, AFTER loading
@ -534,7 +534,13 @@ require('lazy').setup {
-- clangd = {},
-- gopls = {},
-- pyright = {},
-- rust_analyzer = {},
rust_analyzer = {
settings = {
check = {
command = "clippy",
},
},
},
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
--
-- Some languages (like typescript) have entire language plugins that can be useful:
@ -605,6 +611,8 @@ require('lazy').setup {
{ -- Autoformat
'stevearc/conform.nvim',
event = { "BufWritePre" },
cmd = { "ConformInfo" },
opts = {
notify_on_error = false,
format_on_save = {
@ -612,15 +620,18 @@ require('lazy').setup {
lsp_fallback = true,
},
formatters_by_ft = {
lua = { 'stylua' },
-- Conform can also run multiple formatters sequentially
-- python = { "isort", "black" },
--
-- You can use a sub-list to tell conform to run *until* a formatter
-- is found.
-- javascript = { { "prettierd", "prettier" } },
lua = { "stylua" },
python = { "isort", "black" },
javascript = { { "prettierd", "prettier" } },
typescript = { { "prettierd", "prettier" } },
rust = { "rustfmt" },
cpp = { "clang-format" },
},
},
init = function()
-- If you want the formatexpr, here is the place to set it
vim.o.formatexpr = "v:lua.require'conform'.formatexpr()"
end,
},
{ -- Autocompletion
@ -722,7 +733,7 @@ require('lazy').setup {
--
-- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme`
'folke/tokyonight.nvim',
lazy = false, -- make sure we load this during startup if it is your main colorscheme
lazy = false, -- make sure we load this during startup if it is your main colorscheme
priority = 1000, -- make sure to load this before all the other start plugins
config = function()
-- Load the colorscheme here
@ -781,7 +792,7 @@ require('lazy').setup {
---@diagnostic disable-next-line: missing-fields
require('nvim-treesitter.configs').setup {
ensure_installed = { 'bash', 'c', 'html', 'lua', 'markdown', 'vim', 'vimdoc' },
ensure_installed = { 'bash', 'c', 'html', 'lua', 'markdown', 'vim', 'vimdoc', 'rust', 'svelte', 'typescript', 'tsx', 'javascript' },
-- Autoinstall languages that are not installed
auto_install = true,
highlight = { enable = true },
@ -806,7 +817,7 @@ require('lazy').setup {
-- Here are some example plugins that I've included in the kickstart repository.
-- Uncomment any of the lines below to enable them (you will need to restart nvim).
--
-- require 'kickstart.plugins.debug',
require 'kickstart.plugins.debug',
-- require 'kickstart.plugins.indent_line',
-- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua`
@ -814,7 +825,7 @@ require('lazy').setup {
--
-- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
-- For additional information, see `:help lazy.nvim-lazy.nvim-structuring-your-plugins`
-- { import = 'custom.plugins' },
{ import = 'custom.plugins' },
}
-- The line beneath this is called `modeline`. See `:help modeline`

View File

@ -0,0 +1,10 @@
return { -- Copilot
'github/copilot.vim',
init = function()
vim.keymap.set('i', '<C-J>', 'copilot#Accept("\\<CR>")', {
expr = true,
replace_keycodes = false
})
vim.g.copilot_no_tab_map = true
end
}

View File

@ -0,0 +1,9 @@
return {
-- Managing crates.io dependencies --
'saecki/crates.nvim',
tag = 'stable',
event = { "BufRead Cargo.toml" },
config = function()
require('crates').setup()
end,
},