Messy upgrades
This commit is contained in:
parent
4af126e14e
commit
b3f3fc70f0
100
init.lua
100
init.lua
|
@ -90,14 +90,24 @@ P.S. You can delete this when you're done too. It's your config now! :)
|
|||
vim.g.mapleader = ' '
|
||||
vim.g.maplocalleader = ' '
|
||||
|
||||
vim.api.nvim_exec(
|
||||
[[
|
||||
autocmd BufNewFile,BufRead *.mdx set filetype=markdown.mdx
|
||||
]],
|
||||
false
|
||||
)
|
||||
|
||||
-- Set to true if you have a Nerd Font installed and selected in the terminal
|
||||
vim.g.have_nerd_font = false
|
||||
vim.g.have_nerd_font = true
|
||||
|
||||
-- [[ Setting options ]]
|
||||
-- See `:help vim.opt`
|
||||
-- NOTE: You can change these options as you wish!
|
||||
-- For more options, you can see `:help option-list`
|
||||
|
||||
-- Make fish the default shell
|
||||
vim.opt.shell = vim.fn.executable 'fish' == 1 and 'fish' or vim.env.SHELL
|
||||
|
||||
-- Make line numbers default
|
||||
vim.opt.number = true
|
||||
-- You can also add relative line numbers, to help with jumping.
|
||||
|
@ -145,9 +155,11 @@ vim.opt.splitbelow = true
|
|||
-- See `:help 'list'`
|
||||
-- and `:help 'listchars'`
|
||||
vim.opt.list = true
|
||||
vim.opt.listchars = { tab = '» ', trail = '·', nbsp = '␣' }
|
||||
vim.opt.listchars = { tab = ' ', trail = '·', nbsp = '␣' }
|
||||
vim.opt.tabstop = 2 -- Always 8 (see :h tabstop)
|
||||
vim.opt.softtabstop = 2 -- Tabs should be 2 spaces wide
|
||||
vim.opt.shiftwidth = 2 -- Tabs should be 2 spaces wide
|
||||
|
||||
-- Preview substitutions live, as you type!
|
||||
vim.opt.inccommand = 'split'
|
||||
|
||||
-- Show which line your cursor is on
|
||||
|
@ -194,6 +206,15 @@ vim.keymap.set('n', '<C-l>', '<C-w><C-l>', { desc = 'Move focus to the right win
|
|||
vim.keymap.set('n', '<C-j>', '<C-w><C-j>', { desc = 'Move focus to the lower window' })
|
||||
vim.keymap.set('n', '<C-k>', '<C-w><C-k>', { desc = 'Move focus to the upper window' })
|
||||
|
||||
-- Keybinds for custom plugins
|
||||
-- NvimTree
|
||||
vim.api.nvim_set_keymap('n', '<C-n>', ':NvimTreeToggle<cr>', { silent = true, noremap = true })
|
||||
|
||||
-- NvTerm
|
||||
vim.keymap.set('n', '<leader>tt', function()
|
||||
require('nvterm.terminal').toggle 'horizontal'
|
||||
end, { desc = '[T]oggle [T]erminal' })
|
||||
|
||||
-- NOTE: Some terminals have coliding keymaps or are not able to send distinct keycodes
|
||||
-- vim.keymap.set("n", "<C-S-h>", "<C-w>H", { desc = "Move window to the left" })
|
||||
-- vim.keymap.set("n", "<C-S-l>", "<C-w>L", { desc = "Move window to the right" })
|
||||
|
@ -519,6 +540,7 @@ require('lazy').setup({
|
|||
-- That is to say, every time a new file is opened that is associated with
|
||||
-- an lsp (for example, opening `main.rs` is associated with `rust_analyzer`) this
|
||||
-- function will be executed to configure the current buffer
|
||||
|
||||
vim.api.nvim_create_autocmd('LspAttach', {
|
||||
group = vim.api.nvim_create_augroup('kickstart-lsp-attach', { clear = true }),
|
||||
callback = function(event)
|
||||
|
@ -659,6 +681,16 @@ require('lazy').setup({
|
|||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||
capabilities = vim.tbl_deep_extend('force', capabilities, require('cmp_nvim_lsp').default_capabilities())
|
||||
|
||||
-- Setup Swift
|
||||
require('lspconfig').sourcekit.setup {
|
||||
capabilities = {
|
||||
workspace = {
|
||||
didChangeWatchedFiles = {
|
||||
dynamicRegistration = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
-- Enable the following language servers
|
||||
-- Feel free to add/remove any LSPs that you want here. They will automatically be installed.
|
||||
--
|
||||
|
@ -679,9 +711,8 @@ require('lazy').setup({
|
|||
-- https://github.com/pmizio/typescript-tools.nvim
|
||||
--
|
||||
-- But for many setups, the LSP (`ts_ls`) will work just fine
|
||||
-- ts_ls = {},
|
||||
--
|
||||
|
||||
ts_ls = {},
|
||||
jdtls = {},
|
||||
lua_ls = {
|
||||
-- cmd = { ... },
|
||||
-- filetypes = { ... },
|
||||
|
@ -714,6 +745,7 @@ require('lazy').setup({
|
|||
local ensure_installed = vim.tbl_keys(servers or {})
|
||||
vim.list_extend(ensure_installed, {
|
||||
'stylua', -- Used to format Lua code
|
||||
'prettierd',
|
||||
})
|
||||
require('mason-tool-installer').setup { ensure_installed = ensure_installed }
|
||||
|
||||
|
@ -770,11 +802,20 @@ require('lazy').setup({
|
|||
-- python = { "isort", "black" },
|
||||
--
|
||||
-- You can use 'stop_after_first' to run the first available formatter from the list
|
||||
-- javascript = { "prettierd", "prettier", stop_after_first = true },
|
||||
markdown = { 'prettierd', 'prettier', stop_after_first = true },
|
||||
javascript = { 'prettierd', 'prettier', stop_after_first = true },
|
||||
typescript = { 'prettierd', 'prettier', stop_after_first = true },
|
||||
typescriptreact = { 'prettierd', 'prettier', stop_after_first = true },
|
||||
json = { 'prettierd', 'prettier', stop_after_first = true },
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
{ -- highlight color strings
|
||||
'brenoprata10/nvim-highlight-colors',
|
||||
config = function()
|
||||
require('nvim-highlight-colors').setup {}
|
||||
end,
|
||||
},
|
||||
{ -- Autocompletion
|
||||
'hrsh7th/nvim-cmp',
|
||||
event = 'InsertEnter',
|
||||
|
@ -825,7 +866,9 @@ require('lazy').setup({
|
|||
end,
|
||||
},
|
||||
completion = { completeopt = 'menu,menuone,noinsert' },
|
||||
|
||||
formatting = {
|
||||
format = require('nvim-highlight-colors').format,
|
||||
},
|
||||
-- For an understanding of why these mappings were
|
||||
-- chosen, you will need to read `:help ins-completion`
|
||||
--
|
||||
|
@ -843,7 +886,7 @@ require('lazy').setup({
|
|||
-- Accept ([y]es) the completion.
|
||||
-- This will auto-import if your LSP supports it.
|
||||
-- This will expand snippets if the LSP sent a snippet.
|
||||
['<C-y>'] = cmp.mapping.confirm { select = true },
|
||||
['<S-CR>'] = cmp.mapping.confirm { select = true },
|
||||
|
||||
-- If you prefer more traditional completion keymaps,
|
||||
-- you can uncomment the following lines
|
||||
|
@ -890,6 +933,8 @@ require('lazy').setup({
|
|||
{ name = 'nvim_lsp_signature_help' },
|
||||
},
|
||||
}
|
||||
local cmp_autopairs = require 'nvim-autopairs.completion.cmp'
|
||||
cmp.event:on('confirm_done', cmp_autopairs.on_confirm_done())
|
||||
end,
|
||||
},
|
||||
|
||||
|
@ -955,6 +1000,40 @@ require('lazy').setup({
|
|||
-- Check out: https://github.com/echasnovski/mini.nvim
|
||||
end,
|
||||
},
|
||||
{
|
||||
'nvim-tree/nvim-tree.lua',
|
||||
version = '*',
|
||||
lazy = false,
|
||||
dependencies = {
|
||||
'nvim-tree/nvim-web-devicons',
|
||||
},
|
||||
config = function()
|
||||
require('nvim-tree').setup {}
|
||||
end,
|
||||
},
|
||||
{
|
||||
'NvChad/nvterm',
|
||||
config = function()
|
||||
require('nvterm').setup()
|
||||
end,
|
||||
},
|
||||
{
|
||||
'davidmh/mdx.nvim',
|
||||
config = true,
|
||||
dependencies = { 'nvim-treesitter/nvim-treesitter' },
|
||||
},
|
||||
{
|
||||
'windwp/nvim-autopairs',
|
||||
event = 'InsertEnter',
|
||||
config = true,
|
||||
-- use opts = {} for passing setup options
|
||||
-- this is equivalent to setup({}) function
|
||||
},
|
||||
{
|
||||
'windwp/nvim-ts-autotag',
|
||||
lazy = false,
|
||||
config = true,
|
||||
},
|
||||
{ -- Highlight, edit, and navigate code
|
||||
'nvim-treesitter/nvim-treesitter',
|
||||
build = ':TSUpdate',
|
||||
|
@ -1030,4 +1109,3 @@ require('lazy').setup({
|
|||
})
|
||||
|
||||
-- The line beneath this is called `modeline`. See `:help modeline`
|
||||
-- vim: ts=2 sts=2 sw=2 et
|
||||
|
|
|
@ -1,27 +1,34 @@
|
|||
{
|
||||
"LuaSnip": { "branch": "master", "commit": "45db5addf8d0a201e1cf247cae4cdce605ad3768" },
|
||||
"cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
|
||||
"LuaSnip": { "branch": "master", "commit": "c9b9a22904c97d0eb69ccb9bab76037838326817" },
|
||||
"cmp-nvim-lsp": { "branch": "main", "commit": "99290b3ec1322070bcfb9e846450a46f6efa50f0" },
|
||||
"cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "031e6ba70b0ad5eee49fd2120ff7a2e325b17fa7" },
|
||||
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
||||
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
|
||||
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
|
||||
"conform.nvim": { "branch": "master", "commit": "f9ef25a7ef00267b7d13bfc00b0dea22d78702d5" },
|
||||
"fidget.nvim": { "branch": "main", "commit": "d9ba6b7bfe29b3119a610892af67602641da778e" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "1ef74b546732f185d0f806860fa5404df7614f28" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "48b52b5cfcf8f88ed0aff8fde573a5cc20b1306d" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "7010000889bfb6c26065e0b0f7f1e6aa9163edd9" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
|
||||
"lazydev.nvim": { "branch": "main", "commit": "2367a6c0a01eb9edb0464731cc0fb61ed9ab9d2c" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "1a31f824b9cd5bc6f342fc29e9a53b60d74af245" },
|
||||
"mason-tool-installer.nvim": { "branch": "main", "commit": "98767d37f8e5255a5111fc1e3163232d4dc07bda" },
|
||||
"mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" },
|
||||
"mason.nvim": { "branch": "main", "commit": "fc98833b6da5de5a9c5b1446ac541577059555be" },
|
||||
"mdx.nvim": { "branch": "main", "commit": "464a74be368dce212cff02f6305845dc7f209ab3" },
|
||||
"mini.nvim": { "branch": "main", "commit": "3ad46cdb7a51281e0024416023b56cf5c7909ae7" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "ae644feb7b67bf1ce4260c231d1d4300b19c6f30" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "d88ae6623fef09251e3aa20001bb761686eae730" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "b6a6d8997c46dc15682020ce4fddc5a89ee1ac0d" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "ec289423a1693aeae6cd0d503bac2856af74edaa" },
|
||||
"nvim-autopairs": { "branch": "master", "commit": "4d74e75913832866aa7de35e4202463ddf6efd1b" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "1e1900b0769324a9675ef85b38f99cca29e203b3" },
|
||||
"nvim-highlight-colors": { "branch": "main", "commit": "982543ec460199de5bdc491745dc9faa6bcc19b6" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "200280dab91a7df2ca42fd2ab3cb4c5fab056666" },
|
||||
"nvim-tree.lua": { "branch": "master", "commit": "6709463b2d18e77f7a946027917aa00d4aaed6f4" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "e329e94a6a0a5ccf6ec8bfec1d10faf5eaae665f" },
|
||||
"nvim-ts-autotag": { "branch": "main", "commit": "a1d526af391f6aebb25a8795cbc05351ed3620b5" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "4c3a5848ee0b09ecdea73adcd2a689190aeb728c" },
|
||||
"nvterm": { "branch": "main", "commit": "9d7ba3b6e368243175d38e1ec956e0476fd86ed9" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
|
||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "1f08ed60cafc8f6168b72b80be2b2ea149813e55" },
|
||||
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
|
||||
"telescope.nvim": { "branch": "0.1.x", "commit": "fe999db6e0c39c8984519ead75660e0e2d3245d3" },
|
||||
"telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" },
|
||||
"todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" },
|
||||
"tokyonight.nvim": { "branch": "main", "commit": "057ef5d260c1931f1dffd0f052c685dcd14100a3" },
|
||||
"vim-sleuth": { "branch": "master", "commit": "be69bff86754b1aa5adcbb527d7fcd1635a84080" },
|
||||
"which-key.nvim": { "branch": "main", "commit": "bfec3d6bc0a9b0b2cb11644642f78c2c3915eef0" }
|
||||
"which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" }
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue