diff --git a/README.md b/README.md index 427bf01..22ea620 100644 --- a/README.md +++ b/README.md @@ -48,6 +48,8 @@ The configs are an attempt at including some IDE functionalities - Markdown in editor rendering - Telescope fuzzy search for files and file contents +LSP configurations for additional servers can be created from the form of already configured ones or the original source of configurations can be used: https://github.com/neovim/nvim-lspconfig + ### Tmux _The_ terminal multiplexer for windowing and pane setups for long running shell sessions. diff --git a/nvim/after/lsp/ansiblels.lua b/nvim/after/lsp/ansiblels.lua new file mode 100644 index 0000000..95bcffd --- /dev/null +++ b/nvim/after/lsp/ansiblels.lua @@ -0,0 +1,25 @@ +return { + cmd = { 'ansible-language-server', '--stdio' }, + settings = { + ansible = { + python = { + interpreterPath = 'python', + }, + ansible = { + path = 'ansible', + }, + executionEnvironment = { + enabled = false, + }, + validation = { + enabled = true, + lint = { + enabled = true, + path = 'ansible-lint', + }, + }, + }, + }, + filetypes = { 'yaml.ansible' }, + root_markers = { 'ansible.cfg', '.ansible-lint' }, +} diff --git a/nvim/after/lsp/arduino_language_server.lua b/nvim/after/lsp/arduino_language_server.lua new file mode 100644 index 0000000..4dad1ba --- /dev/null +++ b/nvim/after/lsp/arduino_language_server.lua @@ -0,0 +1,20 @@ +-- local util = require 'lspconfig.util' + +return { + filetypes = { 'arduino' }, + root_dir = function(bufnr, on_dir) + local fname = vim.api.nvim_buf_get_name(bufnr) + -- on_dir(util.root_pattern('*.ino')(fname)) + end, + cmd = { + 'arduino-language-server', + }, + capabilities = { + textDocument = { + semanticTokens = vim.NIL, + }, + workspace = { + semanticTokens = vim.NIL, + }, + }, +} diff --git a/nvim/after/lsp/marksman.lua b/nvim/after/lsp/marksman.lua index 98e0cb1..be7535d 100644 --- a/nvim/after/lsp/marksman.lua +++ b/nvim/after/lsp/marksman.lua @@ -1,4 +1,5 @@ return { - cmd = { 'marksman' }, - filetypes = { 'md', 'markdown', 'telekasten' }, + cmd = { 'marksman', 'server' }, + filetypes = { 'markdown', 'markdown.mdx' }, + root_markers = { '.marksman.toml', '.git' }, } diff --git a/nvim/lua/plugins/language_support.lua b/nvim/lua/plugins/language_support.lua index 4b0b313..d012455 100644 --- a/nvim/lua/plugins/language_support.lua +++ b/nvim/lua/plugins/language_support.lua @@ -25,11 +25,6 @@ vim.diagnostic.config({ } }) --- Install and enable the language server settings from nvim-lspconfig --- vim.pack.add({ --- 'https://github.com/neovim/nvim-lspconfig', --- }) - -- Auto set keymaps and other settings on LSP attach vim.api.nvim_create_autocmd('LspAttach', { group = vim.api.nvim_create_augroup('my.lsp', {}), @@ -55,11 +50,15 @@ vim.api.nvim_create_autocmd('LspAttach', { -- Enable LSP engines local enabled_lsps = { + 'ansiblels', + 'arduino_language_server', 'clangd', 'bashls', 'gdscript', + 'intelephense', 'jinja_lsp', 'lua_ls', + 'marksman', 'pylsp', 'r_language_server', 'rust_analyzer', diff --git a/nvim/lua/plugins/mason.lua b/nvim/lua/plugins/mason.lua deleted file mode 100644 index e7fdb24..0000000 --- a/nvim/lua/plugins/mason.lua +++ /dev/null @@ -1,23 +0,0 @@ --- vim.pack.add({ --- 'https://github.com/mason-org/mason.nvim', --- 'https://github.com/mason-org/mason-lspconfig.nvim', --- }) - --- require('mason').setup() --- require('mason-lspconfig').setup { --- automatic_enable = true, --- ensure_installed = { - -- 'ansiblels', -- Ansible - -- 'arduino_language_server', -- Arduino specific C - -- 'bashls', -- Bash - -- 'clangd', -- C/C++ - -- 'intelephense', -- PHP - -- 'jinja_lsp', -- Jinja2 - -- 'lua_ls', -- Lua - -- 'marksman', -- markdown - -- 'pylsp', -- Python - -- 'rust_analyzer', -- Rust - -- 'shellcheck', -- Bash - -- 'yamlls', -- YAML --- } --- } diff --git a/zsh/zsh_functions b/zsh/zsh_functions index a8f01a9..083b1d9 100644 --- a/zsh/zsh_functions +++ b/zsh/zsh_functions @@ -1,8 +1,7 @@ ### Custom functions # Timing function for checking zsh load speed function timezsh() { - shell=$SHELL - for i in $(seq 1 10) + for _ in $(seq 1 10) do ts=$(date +%s%N) $SHELL -i -c exit @@ -18,5 +17,5 @@ function timezsh() { # } function path() { - echo -e ${PATH//:/\\n} + echo -e "${PATH//:/\\n}" }