diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..52a0f05 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +spell/* diff --git a/.luarc.json b/.luarc.json new file mode 100644 index 0000000..ceb1818 --- /dev/null +++ b/.luarc.json @@ -0,0 +1,12 @@ +{ + "runtime.version": "LuaJIT", + "runtime.path": [ + "lua/?.lua", + "lua/?/init.lua" + ], + "diagnostics.globals": ["vim"], + "workspace.checkThirdParty": false, + "workspace.library": [ + "$VIMRUNTIME" + ] +} diff --git a/after/lsp/lsp_ls.lua b/after/lsp/lsp_ls.lua new file mode 100644 index 0000000..08acbcd --- /dev/null +++ b/after/lsp/lsp_ls.lua @@ -0,0 +1,35 @@ +-- ┌────────────────────┐ +-- │ LSP config example │ +-- └────────────────────┘ +-- +-- This file contains configuration of 'lua_ls' language server. +-- Source: https://github.com/LuaLS/lua-language-server +-- +-- It is used by `:h vim.lsp.enable()` and `:h vim.lsp.config()`. +-- See `:h vim.lsp.Config` and `:h vim.lsp.ClientConfig` for all available fields. +-- +-- This config is designed for Lua's activity around Neovim. It provides only +-- basic config and can be further improved. +return { + on_attach = function(client, buf_id) + -- Reduce very long list of triggers for better 'mini.completion' experience + client.server_capabilities.completionProvider.triggerCharacters = + { '.', ':', '#', '(' } + + -- Use this function to define buffer-local mappings and behavior that depend + -- on attached client or only makes sense if there is language server attached. + end, + -- LuaLS Structure of these settings comes from LuaLS, not Neovim + settings = { + Lua = { + -- Define runtime properties. Use 'LuaJIT', as it is built into Neovim. + runtime = { version = 'LuaJIT', path = vim.split(package.path, ';') }, + workspace = { + -- Don't analyze code from submodules + ignoreSubmodules = true, + -- Add Neovim's methods for easier code writing + library = { vim.env.VIMRUNTIME }, + }, + }, + }, +} diff --git a/plugin/20_keymaps.lua b/plugin/20_keymaps.lua index 561fe6b..7bf19cb 100644 --- a/plugin/20_keymaps.lua +++ b/plugin/20_keymaps.lua @@ -170,6 +170,8 @@ xmap_leader('lf', formatting_cmd, 'Format selection') nmap_leader('or', 'lua MiniMisc.resize_window()', 'Resize to default width') nmap_leader('ot', 'lua MiniTrailspace.trim()', 'Trim trailspace') nmap_leader('oz', 'lua MiniMisc.zoom()', 'Zoom toggle') +nmap_leader('om', 'Mason', 'Open Mason') +nmap_leader('ou', 'DepsUpdate', 'Update plugins') -- s is for 'Session'. Common usage: -- - `sn` - start new session diff --git a/plugin/40_plugins.lua b/plugin/40_plugins.lua index 8c6369f..a776989 100644 --- a/plugin/40_plugins.lua +++ b/plugin/40_plugins.lua @@ -37,6 +37,11 @@ now_if_args(function() 'lua', 'vimdoc', 'markdown', + 'yaml', + 'toml', + 'python', + 'javascript', + 'typst', -- Add here more languages with which you want to use tree-sitter -- To see available languages: -- - Execute `:=require('nvim-treesitter').get_available()` @@ -76,8 +81,8 @@ now_if_args(function() -- Use `:h vim.lsp.config()` or 'after/lsp/' directory to configure servers. -- Uncomment and tweak the following `vim.lsp.enable()` call to enable servers. vim.lsp.enable({ - -- -- For example, if `lua-language-server` is installed, use `'lua_ls'` entry 'lua_ls', + 'basedpyright', }) end)