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
RUN git clone https://github.com/nvim-lua/kickstart.nvim.git "${XDG_CONFIG_HOME}"/nvim \
&& cd ${XDG_CONFIG_HOME}/nvim \
&& git reset --hard e6710a461ab08513af80c213929ff64e75b5e456 \
&& git reset --hard ea4335f5af2fabbf063f8bf946f05583f215f904 \
&& git apply /tmp/updates.patch \
&& cp /tmp/init.lua ${XDG_CONFIG_HOME}/nvim/lua/custom/plugins \
&& nvim --headless "+Lazy! sync" +qa

View File

@ -1,22 +1,31 @@
diff --git a/init.lua b/init.lua
index 292ec07..284e1dc 100644
index 506bbaf..b8d0561 100644
--- a/init.lua
+++ b/init.lua
@@ -101,8 +101,12 @@ vim.opt.number = true
-- Experiment for yourself to see if you like it!
-- vim.opt.relativenumber = true
@@ -91,7 +91,7 @@ vim.g.mapleader = ' '
vim.g.maplocalleader = ' '
+-- Make relative line numbers default
+vim.wo.number = true
+vim.wo.relativenumber = true
+
-- Enable mouse mode, can be useful for resizing splits for example!
-- Set to true if you have a Nerd Font installed
-vim.g.have_nerd_font = false
+vim.g.have_nerd_font = true
-- [[ 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'
+-- Disable mouse mode
+vim.opt.mouse = ''
-- Don't show the mode, since it's already in status line
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.
vim.opt.scrolloff = 10
@ -31,7 +40,7 @@ index 292ec07..284e1dc 100644
-- [[ Basic Keymaps ]]
-- See `:help vim.keymap.set()`
@@ -249,6 +261,66 @@ require('lazy').setup {
@@ -255,6 +263,66 @@ require('lazy').setup({
topdelete = { 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 = {},
--
@ -117,7 +134,7 @@ index 292ec07..284e1dc 100644
lua_ls = {
-- cmd = {...},
-- 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
@@ -596,6 +684,21 @@ require('lazy').setup {
@@ -592,6 +677,21 @@ require('lazy').setup({
-- by the server configuration above. Useful when disabling
-- certain features of an LSP (for example, turning off formatting for tsserver)
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)
end,
},
@@ -781,7 +884,31 @@ 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 = {
+ 'css',
+ 'dockerfile',
+ 'eex',
+ 'elixir',
+ 'erlang',
+ 'gitcommit',
+ 'go',
+ 'heex',
+ 'html',
+ 'http',
+ 'javascript',
+ 'json',
+ 'lua',
+ 'markdown',
+ 'markdown_inline',
+ 'python',
+ 'sql',
+ 'toml',
+ 'tsx',
+ 'typescript',
+ 'vim',
+ 'vimdoc',
+ 'yaml',
+ },
-- Autoinstall languages that are not installed
auto_install = true,
highlight = { enable = true },
@@ -807,14 +934,14 @@ require('lazy').setup {
@@ -793,7 +893,31 @@ require('lazy').setup({
'nvim-treesitter/nvim-treesitter',
build = ':TSUpdate',
opts = {
- ensure_installed = { 'bash', 'c', 'html', 'lua', 'markdown', 'vim', 'vimdoc' },
+ ensure_installed = {
+ 'css',
+ 'dockerfile',
+ 'eex',
+ 'elixir',
+ 'erlang',
+ 'gitcommit',
+ 'go',
+ 'heex',
+ 'html',
+ 'http',
+ 'javascript',
+ 'json',
+ 'lua',
+ 'markdown',
+ 'markdown_inline',
+ 'python',
+ 'sql',
+ 'toml',
+ 'tsx',
+ 'typescript',
+ 'vim',
+ 'vimdoc',
+ 'yaml',
+ },
-- Autoinstall languages that are not installed
auto_install = true,
highlight = {
@@ -830,14 +954,14 @@ require('lazy').setup({
-- Uncomment any of the lines below to enable them (you will need to restart nvim).
--
-- require 'kickstart.plugins.debug',
@ -197,6 +214,6 @@ index 292ec07..284e1dc 100644
-- 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`
}, {
ui = {
-- If you have a Nerd Font, set icons to an empty table which will use the