diff --git a/init.lua b/init.lua index 776c6873ff6..cedf6bf3106 100644 --- a/init.lua +++ b/init.lua @@ -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' @@ -121,6 +121,11 @@ end) -- Enable break indent vim.opt.breakindent = true +-- tabs +vim.opt.tabstop = 4 +vim.opt.shiftwidth = 4 +vim.opt.softtabstop = 4 + -- Save undo history vim.opt.undofile = true @@ -533,23 +538,23 @@ require('lazy').setup({ -- Execute a code action, usually your cursor needs to be on top of an error -- or a suggestion from your LSP for this to activate. - map('gra', vim.lsp.buf.code_action, '[G]oto Code [A]ction', { 'n', 'x' }) + map('ga', vim.lsp.buf.code_action, '[G]oto Code [A]ction', { 'n', 'x' }) -- Find references for the word under your cursor. - map('grr', require('telescope.builtin').lsp_references, '[G]oto [R]eferences') + map('gr', require('telescope.builtin').lsp_references, '[G]oto [R]eferences') -- Jump to the implementation of the word under your cursor. -- Useful when your language has ways of declaring types without an actual implementation. - map('gri', require('telescope.builtin').lsp_implementations, '[G]oto [I]mplementation') + map('gi', require('telescope.builtin').lsp_implementations, '[G]oto [I]mplementation') -- Jump to the definition of the word under your cursor. -- This is where a variable was first declared, or where a function is defined, etc. -- To jump back, press . - map('grd', require('telescope.builtin').lsp_definitions, '[G]oto [D]efinition') + map('gd', require('telescope.builtin').lsp_definitions, '[G]oto [D]efinition') -- WARN: This is not Goto Definition, this is Goto Declaration. -- For example, in C this would take you to the header. - map('grD', vim.lsp.buf.declaration, '[G]oto [D]eclaration') + map('gD', vim.lsp.buf.declaration, '[G]oto [D]eclaration') -- Fuzzy find all the symbols in your current document. -- Symbols are things like variables, functions, types, etc. @@ -663,8 +668,9 @@ 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 = { - -- clangd = {}, - -- gopls = {}, + clangd = {}, + gopls = {}, + qmlls = {}, -- pyright = {}, -- rust_analyzer = {}, -- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs @@ -673,7 +679,6 @@ require('lazy').setup({ -- https://github.com/pmizio/typescript-tools.nvim -- -- But for many setups, the LSP (`ts_ls`) will work just fine - -- ts_ls = {}, -- lua_ls = { @@ -685,6 +690,9 @@ require('lazy').setup({ completion = { callSnippet = 'Replace', }, + library = { + '${3rd}/love2d/library', + }, -- You can toggle below to ignore Lua_LS's noisy `missing-fields` warnings -- diagnostics = { disable = { 'missing-fields' } }, }, @@ -748,7 +756,7 @@ require('lazy').setup({ -- Disable "format_on_save lsp_fallback" for languages that don't -- have a well standardized coding style. You can add additional -- languages here or re-enable it for the disabled ones. - local disable_filetypes = { c = true, cpp = true } + local disable_filetypes = {} if disable_filetypes[vim.bo[bufnr].filetype] then return nil else @@ -760,12 +768,16 @@ require('lazy').setup({ end, formatters_by_ft = { lua = { 'stylua' }, + go = { 'gofmt' }, + c = { 'clang_format' }, + cpp = { 'clang_format' }, -- Conform can also run multiple formatters sequentially -- python = { "isort", "black" }, -- -- You can use 'stop_after_first' to run the first available formatter from the list -- javascript = { "prettierd", "prettier", stop_after_first = true }, }, + formatters = {}, }, }, @@ -868,28 +880,6 @@ require('lazy').setup({ }, }, - { -- You can easily change to a different colorscheme. - -- Change the name of the colorscheme plugin below, and then - -- change the command in the config to whatever the name of that colorscheme is. - -- - -- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme`. - 'folke/tokyonight.nvim', - priority = 1000, -- Make sure to load this before all the other start plugins. - config = function() - ---@diagnostic disable-next-line: missing-fields - require('tokyonight').setup { - styles = { - comments = { italic = false }, -- Disable italics in comments - }, - } - - -- Load the colorscheme here. - -- Like many other themes, this one has different styles, and you could load - -- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'. - vim.cmd.colorscheme 'tokyonight-night' - end, - }, - -- Highlight todo, notes, etc in comments { 'folke/todo-comments.nvim', event = 'VimEnter', dependencies = { 'nvim-lua/plenary.nvim' }, opts = { signs = false } }, @@ -936,7 +926,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 = { @@ -968,8 +958,9 @@ require('lazy').setup({ -- require 'kickstart.plugins.debug', -- require 'kickstart.plugins.indent_line', -- require 'kickstart.plugins.lint', - -- require 'kickstart.plugins.autopairs', - -- require 'kickstart.plugins.neo-tree', + require 'kickstart.plugins.autopairs', + require 'kickstart.plugins.neo-tree', + require 'kickstart.plugins.rose-pine', -- 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` diff --git a/lua/kickstart/plugins/neo-tree.lua b/lua/kickstart/plugins/neo-tree.lua index bd4422695aa..02a77f91519 100644 --- a/lua/kickstart/plugins/neo-tree.lua +++ b/lua/kickstart/plugins/neo-tree.lua @@ -6,7 +6,6 @@ return { version = '*', dependencies = { 'nvim-lua/plenary.nvim', - 'nvim-tree/nvim-web-devicons', -- not strictly required, but recommended 'MunifTanjim/nui.nvim', }, cmd = 'Neotree', @@ -15,6 +14,10 @@ return { }, opts = { filesystem = { + filtered_items = { + visible = true, + hide_dotfiles = false, + }, window = { mappings = { ['\\'] = 'close_window', diff --git a/lua/kickstart/plugins/nvim-tree.lua b/lua/kickstart/plugins/nvim-tree.lua new file mode 100644 index 00000000000..0513d818879 --- /dev/null +++ b/lua/kickstart/plugins/nvim-tree.lua @@ -0,0 +1,6 @@ +return { + 'nvim-tree/nvim-tree.lua', + keys = { + { 'n', 'e', ':NvimTreeToggle', { silent = true } }, + }, +} diff --git a/lua/kickstart/plugins/present.lua b/lua/kickstart/plugins/present.lua new file mode 100644 index 00000000000..e6a417001ee --- /dev/null +++ b/lua/kickstart/plugins/present.lua @@ -0,0 +1,9 @@ +return { + { + dir = '~/Escritorio/code/plugins/present.nvim/', + config = function() + local todo = require 'present' + todo.setup {} + end, + }, +} diff --git a/lua/kickstart/plugins/rose-pine.lua b/lua/kickstart/plugins/rose-pine.lua new file mode 100644 index 00000000000..047839665fd --- /dev/null +++ b/lua/kickstart/plugins/rose-pine.lua @@ -0,0 +1,9 @@ +-- lua/plugins/rose-pine.lua +return { + 'rose-pine/neovim', + name = 'rose-pine', + config = function() + require('rose-pine').setup { disable_background = true } + vim.cmd 'colorscheme rose-pine' + end, +} diff --git a/lua/kickstart/plugins/tabs.lua b/lua/kickstart/plugins/tabs.lua new file mode 100644 index 00000000000..e69de29bb2d