Basically rebase
This commit is contained in:
parent
c9122e89e3
commit
6e53b7028d
33
init.lua
33
init.lua
|
@ -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
|
||||
|
@ -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`
|
||||
|
|
|
@ -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
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
return {
|
||||
-- Managing crates.io dependencies --
|
||||
'saecki/crates.nvim',
|
||||
tag = 'stable',
|
||||
event = { "BufRead Cargo.toml" },
|
||||
config = function()
|
||||
require('crates').setup()
|
||||
end,
|
||||
},
|
Loading…
Reference in New Issue