Upgrade OS version and setup #30

Merged
joao.dubas merged 28 commits from jpd-upgrade-os into main 2024-03-28 00:18:20 +00:00
2 changed files with 69 additions and 52 deletions
Showing only changes of commit 33abae2b6e - Show all commits

View File

@ -169,7 +169,7 @@ COPY ./patch/kickstart.nvim/updates.patch /tmp
COPY ./config/nvim/lua/custom/plugins/init.lua /tmp COPY ./config/nvim/lua/custom/plugins/init.lua /tmp
RUN git clone https://github.com/nvim-lua/kickstart.nvim.git "${XDG_CONFIG_HOME}"/nvim \ RUN git clone https://github.com/nvim-lua/kickstart.nvim.git "${XDG_CONFIG_HOME}"/nvim \
&& cd ${XDG_CONFIG_HOME}/nvim \ && cd ${XDG_CONFIG_HOME}/nvim \
&& git reset --hard e6710a461ab08513af80c213929ff64e75b5e456 \ && git reset --hard ea4335f5af2fabbf063f8bf946f05583f215f904 \
&& git apply /tmp/updates.patch \ && git apply /tmp/updates.patch \
&& cp /tmp/init.lua ${XDG_CONFIG_HOME}/nvim/lua/custom/plugins \ && cp /tmp/init.lua ${XDG_CONFIG_HOME}/nvim/lua/custom/plugins \
&& nvim --headless "+Lazy! sync" +qa && nvim --headless "+Lazy! sync" +qa

View File

@ -1,22 +1,31 @@
diff --git a/init.lua b/init.lua diff --git a/init.lua b/init.lua
index 292ec07..284e1dc 100644 index 506bbaf..b8d0561 100644
--- a/init.lua --- a/init.lua
+++ b/init.lua +++ b/init.lua
@@ -101,8 +101,12 @@ vim.opt.number = true @@ -91,7 +91,7 @@ vim.g.mapleader = ' '
-- Experiment for yourself to see if you like it! vim.g.maplocalleader = ' '
-- vim.opt.relativenumber = true
+-- Make relative line numbers default -- Set to true if you have a Nerd Font installed
+vim.wo.number = true -vim.g.have_nerd_font = false
+vim.wo.relativenumber = true +vim.g.have_nerd_font = true
+
-- Enable mouse mode, can be useful for resizing splits for example! -- [[ Setting options ]]
-- See `:help vim.opt`
@@ -102,10 +102,10 @@ vim.g.have_nerd_font = false
vim.opt.number = true
-- You can also add relative line numbers, for help with jumping.
-- Experiment for yourself to see if you like it!
--- vim.opt.relativenumber = true
+vim.opt.relativenumber = true
--- Enable mouse mode, can be useful for resizing splits for example!
-vim.opt.mouse = 'a' -vim.opt.mouse = 'a'
+-- Disable mouse mode
+vim.opt.mouse = '' +vim.opt.mouse = ''
-- Don't show the mode, since it's already in status line -- Don't show the mode, since it's already in status line
vim.opt.showmode = false vim.opt.showmode = false
@@ -148,6 +152,14 @@ vim.opt.cursorline = true @@ -154,6 +154,14 @@ vim.opt.cursorline = true
-- Minimal number of screen lines to keep above and below the cursor. -- Minimal number of screen lines to keep above and below the cursor.
vim.opt.scrolloff = 10 vim.opt.scrolloff = 10
@ -31,7 +40,7 @@ index 292ec07..284e1dc 100644
-- [[ Basic Keymaps ]] -- [[ Basic Keymaps ]]
-- See `:help vim.keymap.set()` -- See `:help vim.keymap.set()`
@@ -249,6 +261,66 @@ require('lazy').setup { @@ -255,6 +263,66 @@ require('lazy').setup({
topdelete = { text = '‾' }, topdelete = { text = '‾' },
changedelete = { text = '~' }, changedelete = { text = '~' },
}, },
@ -98,7 +107,15 @@ index 292ec07..284e1dc 100644
}, },
}, },
@@ -544,6 +616,18 @@ require('lazy').setup { @@ -283,6 +351,7 @@ require('lazy').setup({
require('which-key').register {
['<leader>c'] = { name = '[C]ode', _ = 'which_key_ignore' },
['<leader>d'] = { name = '[D]ocument', _ = 'which_key_ignore' },
+ ['<leader>h'] = { name = 'Git [h]unk', _ = 'which_key_ignore' },
['<leader>r'] = { name = '[R]ename', _ = 'which_key_ignore' },
['<leader>s'] = { name = '[S]earch', _ = 'which_key_ignore' },
['<leader>w'] = { name = '[W]orkspace', _ = 'which_key_ignore' },
@@ -552,6 +621,18 @@ require('lazy').setup({
-- tsserver = {}, -- tsserver = {},
-- --
@ -117,7 +134,7 @@ index 292ec07..284e1dc 100644
lua_ls = { lua_ls = {
-- cmd = {...}, -- cmd = {...},
-- filetypes { ...}, -- filetypes { ...},
@@ -570,6 +654,10 @@ require('lazy').setup { @@ -566,6 +647,10 @@ require('lazy').setup({
}, },
}, },
}, },
@ -128,7 +145,7 @@ index 292ec07..284e1dc 100644
} }
-- Ensure the servers and tools above are installed -- Ensure the servers and tools above are installed
@@ -596,6 +684,21 @@ require('lazy').setup { @@ -592,6 +677,21 @@ require('lazy').setup({
-- by the server configuration above. Useful when disabling -- by the server configuration above. Useful when disabling
-- certain features of an LSP (for example, turning off formatting for tsserver) -- certain features of an LSP (for example, turning off formatting for tsserver)
server.capabilities = vim.tbl_deep_extend('force', {}, capabilities, server.capabilities or {}) server.capabilities = vim.tbl_deep_extend('force', {}, capabilities, server.capabilities or {})
@ -150,40 +167,40 @@ index 292ec07..284e1dc 100644
require('lspconfig')[server_name].setup(server) require('lspconfig')[server_name].setup(server)
end, end,
}, },
@@ -781,7 +884,31 @@ require('lazy').setup { @@ -793,7 +893,31 @@ require('lazy').setup({
'nvim-treesitter/nvim-treesitter',
---@diagnostic disable-next-line: missing-fields build = ':TSUpdate',
require('nvim-treesitter.configs').setup { opts = {
- ensure_installed = { 'bash', 'c', 'html', 'lua', 'markdown', 'vim', 'vimdoc' }, - ensure_installed = { 'bash', 'c', 'html', 'lua', 'markdown', 'vim', 'vimdoc' },
+ ensure_installed = { + ensure_installed = {
+ 'css', + 'css',
+ 'dockerfile', + 'dockerfile',
+ 'eex', + 'eex',
+ 'elixir', + 'elixir',
+ 'erlang', + 'erlang',
+ 'gitcommit', + 'gitcommit',
+ 'go', + 'go',
+ 'heex', + 'heex',
+ 'html', + 'html',
+ 'http', + 'http',
+ 'javascript', + 'javascript',
+ 'json', + 'json',
+ 'lua', + 'lua',
+ 'markdown', + 'markdown',
+ 'markdown_inline', + 'markdown_inline',
+ 'python', + 'python',
+ 'sql', + 'sql',
+ 'toml', + 'toml',
+ 'tsx', + 'tsx',
+ 'typescript', + 'typescript',
+ 'vim', + 'vim',
+ 'vimdoc', + 'vimdoc',
+ 'yaml', + 'yaml',
+ }, + },
-- Autoinstall languages that are not installed -- Autoinstall languages that are not installed
auto_install = true, auto_install = true,
highlight = { enable = true }, highlight = {
@@ -807,14 +934,14 @@ require('lazy').setup { @@ -830,14 +954,14 @@ require('lazy').setup({
-- Uncomment any of the lines below to enable them (you will need to restart nvim). -- Uncomment any of the lines below to enable them (you will need to restart nvim).
-- --
-- require 'kickstart.plugins.debug', -- require 'kickstart.plugins.debug',
@ -197,6 +214,6 @@ index 292ec07..284e1dc 100644
-- For additional information, see `:help lazy.nvim-lazy.nvim-structuring-your-plugins` -- For additional information, see `:help lazy.nvim-lazy.nvim-structuring-your-plugins`
- -- { import = 'custom.plugins' }, - -- { import = 'custom.plugins' },
+ { import = 'custom.plugins' }, + { import = 'custom.plugins' },
} }, {
ui = {
-- The line beneath this is called `modeline`. See `:help modeline` -- If you have a Nerd Font, set icons to an empty table which will use the