ide/patch/kickstart.nvim/updates.patch
João Paulo Dubas 0800fe0c4c chore: upgrade system runtimes and clis(#17)
The following runtimes and cli's were upgraded:

* `awscli` from 2.13.30 to 2.13.38
* `go` from 1.21.3 to 1.21.4
* `helm` from 3.13.1 to 3.13.2
* `kubectl` from 1.27.7 to 1.28.4
* `lefthook` from 1.5.2 to 1.5.3
* `node` from 21.1.0 to 21.2.0
* `poetry` from 1.6.1 to 1.7.1
* `terraform` from 1.6.2 to 1.6.4
* `kickstart.nvim` to the latest version

Also, some additions were made:

* [`tilt`][0] to make it easier to handle multiple services.
* Map key to open terminal vertically in `neovim`
* Aliases to commands in `fish`

[0]: https://tilt.dev

Co-authored-by: Joao P Dubas <joao.dubas@gmail.com>
Reviewed-on: #17
2023-11-24 14:41:39 +00:00

136 lines
3.9 KiB
Diff

diff --git a/init.lua b/init.lua
index 3a98da0..e8e41b4 100644
--- a/init.lua
+++ b/init.lua
@@ -229,7 +229,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 ]]
@@ -239,11 +239,12 @@ require('lazy').setup({
-- Set highlight on search
vim.o.hlsearch = false
--- Make line numbers default
+-- Make relative line numbers default
vim.wo.number = true
+vim.wo.relativenumber = true
--- Enable mouse mode
-vim.o.mouse = 'a'
+-- Disable mouse mode
+vim.o.mouse = ''
-- Sync clipboard between OS and Neovim.
-- Remove this option if you want your OS clipboard to remain independent.
@@ -273,6 +274,14 @@ vim.o.completeopt = 'menuone,noselect'
-- NOTE: You should make sure your terminal supports this
vim.o.termguicolors = true
+-- Set foldmethod
+-- See `:help foldmethod`
+vim.opt.foldmethod = 'expr'
+vim.opt.foldexpr = 'v:lua.vim.treesitter.foldexpr()'
+vim.opt.foldnestmax = 5
+vim.opt.foldlevel = 1
+vim.opt.foldenable = false
+
-- [[ Basic Keymaps ]]
-- Keymaps for better default experience
@@ -378,11 +387,33 @@ vim.keymap.set('n', '<leader>sr', require('telescope.builtin').resume, { desc =
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' },
-
+ 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. Defaults to false (but you can change for yourself!)
auto_install = false,
-
highlight = { enable = true },
indent = { enable = true },
incremental_selection = {
@@ -511,19 +542,24 @@ require('mason-lspconfig').setup()
-- If you want to override the default filetypes that your language server will attach to you can
-- define the property 'filetypes' to the map in question.
local servers = {
- -- clangd = {},
- -- gopls = {},
- -- pyright = {},
- -- rust_analyzer = {},
- -- tsserver = {},
- -- html = { filetypes = { 'html', 'twig', 'hbs'} },
-
+ elixirls = {
+ elixirLS = {
+ dialyzerEnabled = true,
+ dialyzerFormat = "dialyxir_long",
+ fetchDeps = false,
+ mixEnv = "test"
+ }
+ },
+ gopls = {},
+ html = { filetypes = { 'html', 'twig', 'hbs'} },
lua_ls = {
Lua = {
workspace = { checkThirdParty = false },
telemetry = { enable = false },
},
},
+ pyright = {},
+ tsserver = {},
}
-- Setup neovim lua configuration
@@ -542,12 +578,20 @@ mason_lspconfig.setup {
mason_lspconfig.setup_handlers {
function(server_name)
- require('lspconfig')[server_name].setup {
+ local opts = {
capabilities = capabilities,
on_attach = on_attach,
settings = servers[server_name],
filetypes = (servers[server_name] or {}).filetypes,
}
+ if server_name == 'elixirls' then
+ local version = vim.fn.system('rtx current elixir') or ''
+ local match_version = string.match(version, '^1.11')
+ if match_version ~= nil then
+ opts = vim.tbl_extend('keep', opts, { cmd = { vim.fn.expand('$LOCAL_SRC_HOME') .. '/elixir-ls/release/language_server.sh' } })
+ end
+ end
+ require('lspconfig')[server_name].setup(opts)
end,
}