"first commit to kickstart"

This commit is contained in:
Palonko Chongo 2025-03-08 08:46:06 +01:00
parent 5bdde24dfb
commit ac376a6588
6 changed files with 200 additions and 10 deletions

View file

@ -102,7 +102,7 @@ vim.g.have_nerd_font = false
vim.opt.number = true
-- You can also add relative line numbers, to 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'
@ -175,10 +175,10 @@ vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { desc = 'Open diagn
vim.keymap.set('t', '<Esc><Esc>', '<C-\\><C-n>', { desc = 'Exit terminal mode' })
-- TIP: Disable arrow keys in normal mode
-- vim.keymap.set('n', '<left>', '<cmd>echo "Use h to move!!"<CR>')
-- vim.keymap.set('n', '<right>', '<cmd>echo "Use l to move!!"<CR>')
-- vim.keymap.set('n', '<up>', '<cmd>echo "Use k to move!!"<CR>')
-- vim.keymap.set('n', '<down>', '<cmd>echo "Use j to move!!"<CR>')
vim.keymap.set('n', '<left>', '<cmd>echo "Use h to move!!"<CR>')
vim.keymap.set('n', '<right>', '<cmd>echo "Use l to move!!"<CR>')
vim.keymap.set('n', '<up>', '<cmd>echo "Use k to move!!"<CR>')
vim.keymap.set('n', '<down>', '<cmd>echo "Use j to move!!"<CR>')
-- Keybinds to make split navigation easier.
-- Use CTRL+<hjkl> to switch between windows
@ -229,7 +229,18 @@ vim.opt.rtp:prepend(lazypath)
require('lazy').setup({
-- NOTE: Plugins can be added with a link (or for a github repo: 'owner/repo' link).
'tpope/vim-sleuth', -- Detect tabstop and shiftwidth automatically
'ionide/Ionide-vim',
{
'DanielGavin/ols',
opts = {
init_options = {
checker_args = '-strict-style',
collections = {
{ name = 'shared', path = vim.fn.expand '$HOME/odin-lib' },
},
},
},
},
-- NOTE: Plugins can also be added by using a table,
-- with the first argument being the link and the following
-- keys can be used to configure plugin behavior/loading/etc.
@ -435,6 +446,18 @@ require('lazy').setup({
vim.keymap.set('n', '<leader>sn', function()
builtin.find_files { cwd = vim.fn.stdpath 'config' }
end, { desc = '[S]earch [N]eovim files' })
-- Shortcut for searching your Odin source files
vim.keymap.set('n', '<leader>so', function()
builtin.find_files { cwd = '/home/default/.odin' }
end, { desc = '[S]earch [O]din source files' })
-- Shortcut for searching your Odin source files
vim.keymap.set('n', '<leader>sog', function()
builtin.live_grep { cwd = '/home/default/.odin' }
end, { desc = '[S]earch [O]din by [G]rep' })
-- Shortcut for fuzzy finding your Odin source files
vim.keymap.set('n', '<leader>sof', function()
builtin.grep_string { shorten_path = true, word_match = '-w', only_sort_text = true, search = '', cwd = '/home/default/.odin' }
end, { desc = '[S]earch [O]din by [F]uzzy' })
end,
},
@ -461,7 +484,7 @@ require('lazy').setup({
{ 'williamboman/mason.nvim', opts = {} },
'williamboman/mason-lspconfig.nvim',
'WhoIsSethDaniel/mason-tool-installer.nvim',
'nvim-java/nvim-java',
-- Useful status updates for LSP.
{ 'j-hui/fidget.nvim', opts = {} },
@ -616,6 +639,8 @@ require('lazy').setup({
-- - settings (table): Override the default settings passed when initializing the server.
-- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/
local servers = {
fsautocomplete = {},
--jdtls = {},
-- clangd = {},
-- gopls = {},
-- pyright = {},
@ -626,7 +651,7 @@ 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 = {},
--
lua_ls = {
@ -665,6 +690,8 @@ require('lazy').setup({
require('mason-tool-installer').setup { ensure_installed = ensure_installed }
require('mason-lspconfig').setup {
ensure_installed = {}, -- explicitly set to an empty table (Kickstart populates installs via mason-tool-installer)
automatic_installation = false,
handlers = {
function(server_name)
local server = servers[server_name] or {}
@ -902,7 +929,7 @@ require('lazy').setup({
main = 'nvim-treesitter.configs', -- Sets main module to use for opts
-- [[ Configure Treesitter ]] See `:help nvim-treesitter`
opts = {
ensure_installed = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'markdown_inline', 'query', 'vim', 'vimdoc' },
ensure_installed = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'markdown_inline', 'query', 'vim', 'vimdoc', 'java' },
-- Autoinstall languages that are not installed
auto_install = true,
highlight = {