From 739c2899b5a42bf4c4cee77e295811abe4f51ada Mon Sep 17 00:00:00 2001 From: Ezequiel Torres Feyuk Date: Sun, 6 Oct 2024 16:48:59 -0300 Subject: [PATCH] Initial custom changes (#1) * Made after 1 week working in MacOS. For now --- init.lua | 43 +++++++++++++++++++++++++++++++------------ 1 file changed, 31 insertions(+), 12 deletions(-) diff --git a/init.lua b/init.lua index ea86b792..c43783df 100644 --- a/init.lua +++ b/init.lua @@ -84,6 +84,11 @@ I hope you enjoy your Neovim journey, P.S. You can delete this when you're done too. It's your config now! :) --]] +-- NOTE: Particular configuration set by etorres +vim.opt.tabstop = 4 +vim.opt.expandtab = true +vim.opt.shiftwidth = 4 + -- Set as the leader key -- See `:help mapleader` -- NOTE: Must happen before plugins are loaded (otherwise wrong leader will be used) @@ -91,7 +96,7 @@ vim.g.mapleader = ' ' vim.g.maplocalleader = ' ' -- 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` @@ -102,7 +107,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 = false -- Enable mouse mode, can be useful for resizing splits for example! vim.opt.mouse = 'a' @@ -382,11 +387,12 @@ require('lazy').setup({ -- You can put your default mappings / updates / etc. in here -- All the info you're looking for is in `:help telescope.setup()` -- - -- defaults = { - -- mappings = { - -- i = { [''] = 'to_fuzzy_refine' }, - -- }, - -- }, + defaults = { + mappings = { + -- i = { [''] = 'to_fuzzy_refine' }, + i = { [''] = require('telescope.actions').delete_buffer }, + }, + }, -- pickers = {} extensions = { ['ui-select'] = { @@ -606,9 +612,20 @@ require('lazy').setup({ -- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/ local servers = { -- clangd = {}, - -- gopls = {}, - -- pyright = {}, - -- rust_analyzer = {}, + gopls = {}, + rust_analyzer = {}, + pylsp = { + settings = { + pylsp = { + plugins = { + mccabe = { enabled = false }, + pyflakes = { enabled = false }, + pycodestyle = { ignore = { 'W391' }, maxLineLength = 120, enabled = true }, + }, + }, + }, + }, + bashls = {}, -- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs -- -- Some languages (like typescript) have entire language plugins that can be useful: @@ -647,6 +664,8 @@ require('lazy').setup({ local ensure_installed = vim.tbl_keys(servers or {}) vim.list_extend(ensure_installed, { 'stylua', -- Used to format Lua code + 'autopep8', -- Used to format Python code + 'flake8', -- Used to format Python code }) require('mason-tool-installer').setup { ensure_installed = ensure_installed } @@ -888,7 +907,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', 'go' }, -- Autoinstall languages that are not installed auto_install = true, highlight = { @@ -921,7 +940,7 @@ require('lazy').setup({ -- require 'kickstart.plugins.indent_line', -- require 'kickstart.plugins.lint', -- require 'kickstart.plugins.autopairs', - -- require 'kickstart.plugins.neo-tree', + require 'kickstart.plugins.neo-tree', -- require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps -- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua`