feat: update my changes

This commit is contained in:
Kitso Gidion Namane 2023-10-11 16:22:37 +02:00
parent 58f2dbab70
commit 89012d749d
No known key found for this signature in database
GPG key ID: 7BF6158A95B74623
4 changed files with 99 additions and 16 deletions

View file

@ -13,7 +13,7 @@ Kickstart.nvim is a template for your own configuration.
Once you've done that, you should start exploring, configuring and tinkering to
explore Neovim!
If you don't know anything about Lua, I recommend taking some time to read through
If you don't know anything about Lua, I recommend taking some time fto read through
a guide. One possible example:
- https://learnxinyminutes.com/docs/lua/
@ -74,6 +74,9 @@ require('lazy').setup({
-- Detect tabstop and shiftwidth automatically
'tpope/vim-sleuth',
-- Vim motion games
'ThePrimeagen/vim-be-good',
-- NOTE: This is where your plugins related to LSP can be installed.
-- The configuration is done below. Search for lspconfig to find it below.
{
@ -86,7 +89,7 @@ require('lazy').setup({
-- Useful status updates for LSP
-- NOTE: `opts = {}` is the same as calling `require('fidget').setup({})`
{ 'j-hui/fidget.nvim', tag = 'legacy', opts = {} },
{ 'j-hui/fidget.nvim', tag = 'legacy', opts = {} },
-- Additional lua configuration, makes nvim stuff amazing!
'folke/neodev.nvim',
@ -110,7 +113,7 @@ require('lazy').setup({
},
-- Useful plugin to show you pending keybinds.
{ 'folke/which-key.nvim', opts = {} },
{ 'folke/which-key.nvim', opts = {} },
{
-- Adds git related signs to the gutter, as well as utilities for managing changes
'lewis6991/gitsigns.nvim',
@ -183,7 +186,7 @@ require('lazy').setup({
},
-- "gc" to comment visual regions/lines
{ 'numToStr/Comment.nvim', opts = {} },
{ 'numToStr/Comment.nvim', opts = {} },
-- Fuzzy Finder (files, lsp, etc)
{
@ -218,8 +221,8 @@ require('lazy').setup({
-- NOTE: Next Step on Your Neovim Journey: Add/Configure additional "plugins" for kickstart
-- These are some example plugins that I've included in the kickstart repository.
-- Uncomment any of the lines below to enable them.
-- require 'kickstart.plugins.autoformat',
-- require 'kickstart.plugins.debug',
require 'kickstart.plugins.autoformat',
require 'kickstart.plugins.debug',
-- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua`
-- You can use this folder to prevent any conflicts with this init.lua if you're interested in keeping
@ -227,7 +230,7 @@ require('lazy').setup({
-- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
--
-- For additional information see: https://github.com/folke/lazy.nvim#-structuring-your-plugins
-- { import = 'custom.plugins' },
{ import = 'custom.plugins' },
}, {})
-- [[ Setting options ]]
@ -237,8 +240,8 @@ require('lazy').setup({
-- Set highlight on search
vim.o.hlsearch = false
-- Make line numbers default
vim.wo.number = true
-- Make relative line numbers default
vim.wo.relativenumber = true
-- Enable mouse mode
vim.o.mouse = 'a'
@ -271,6 +274,11 @@ vim.o.completeopt = 'menuone,noselect'
-- NOTE: You should make sure your terminal supports this
vim.o.termguicolors = true
-- fix indentation
vim.o.tabstop = 4
vim.o.softtabstop = 4
vim.o.shiftwidth = 4
-- [[ Basic Keymaps ]]
-- Keymaps for better default experience
@ -329,14 +337,13 @@ vim.keymap.set('n', '<leader>sr', require('telescope.builtin').resume, { desc =
-- [[ Configure Treesitter ]]
-- See `:help nvim-treesitter`
-- Defer Treesitter setup after first render to improve startup time of 'nvim {filename}'
vim.defer_fn(function()
require('nvim-treesitter.configs').setup {
-- Add languages to be installed here that you want installed for treesitter
ensure_installed = { 'c', 'cpp', 'go', 'lua', 'python', 'rust', 'tsx', 'javascript', 'typescript', 'vimdoc', 'vim', 'bash' },
require('nvim-treesitter.configs').setup {
-- Add languages to be installed here that you want installed for treesitter
ensure_installed = { 'c', 'cpp', 'go', 'lua', 'python', 'rust', 'tsx', 'javascript', 'typescript', 'vimdoc', 'vim', 'kdl', 'swift',
'sql', 'yaml', 'json' },
-- Autoinstall languages that are not installed. Defaults to false (but you can change for yourself!)
auto_install = false,
-- Autoinstall languages that are not installed. Defaults to false (but you can change for yourself!)
auto_install = true,
highlight = { enable = true },
indent = { enable = true },
@ -512,6 +519,14 @@ mason_lspconfig.setup_handlers {
end,
}
require('lspconfig').sourcekit.setup {
capabilities = capabilities,
on_attach = on_attach,
root_dir = function()
return vim.fn.getcwd()
end
}
-- [[ Configure nvim-cmp ]]
-- See `:help cmp`
local cmp = require 'cmp'