-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Features/zsh notes and releases (#76)
* Centralize posix configs in .config/posix-shell and add zsh support * Add RELEASE file to project * Adjust shells and main README * Add prepare build script to CI * Remove .gitignore from Dockerfile and prepare_build and add to .stow-local-ignore * Fix tmux conf filename * Localize lsp plugins in lua/plugins/lsp * Switch Dockerfile nvim to stable * Fix lsp formatting, lua language server and completion capbilities * Remove github workflows until there's a better plan to test * Add Containerfile and update README * Shots fired * Remove CI specific scripts (for now..) * Remove RELEASE file until automated releases are implemented
- Loading branch information
1 parent
cec5ce6
commit 152ea20
Showing
26 changed files
with
346 additions
and
213 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,16 @@ | ||
source ~/.bash_profile | ||
export SHELL=bash | ||
|
||
source ~/.config/posix-shell/profile | ||
|
||
shopt -s histappend | ||
|
||
# enable programmable completion features (you don't need to enable | ||
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile | ||
# sources /etc/bash.bashrc). | ||
if ! shopt -oq posix; then | ||
if [ -f /usr/share/bash-completion/bash_completion ]; then | ||
. /usr/share/bash-completion/bash_completion | ||
elif [ -f /etc/bash_completion ]; then | ||
. /etc/bash_completion | ||
fi | ||
fi |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
local lspconfig_ok, lspconfig = pcall(require, "lspconfig") | ||
|
||
if not lspconfig_ok then | ||
return | ||
end | ||
|
||
-- Mappings. | ||
-- See `:help vim.diagnostic.*` for documentation on any of the below functions | ||
local opts = { noremap = true, silent = true } | ||
vim.keymap.set("n", "<space>e", vim.diagnostic.open_float, opts) | ||
vim.keymap.set("n", "[d", vim.diagnostic.goto_prev, opts) | ||
vim.keymap.set("n", "]d", vim.diagnostic.goto_next, opts) | ||
vim.keymap.set("n", "<space>q", vim.diagnostic.setloclist, opts) | ||
|
||
-- Use an on_attach function to only map the following keys | ||
-- after the language server attaches to the current buffer | ||
local on_attach = function(_, bufnr) | ||
-- Enable completion triggered by <c-x><c-o> | ||
-- vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc') | ||
|
||
-- Mappings. | ||
-- See `:help vim.lsp.*` for documentation on any of the below functions | ||
local bufopts = { noremap = true, silent = true, buffer = bufnr } | ||
vim.keymap.set("n", "gD", vim.lsp.buf.declaration, bufopts) | ||
vim.keymap.set("n", "gd", vim.lsp.buf.definition, bufopts) | ||
vim.keymap.set("n", "K", vim.lsp.buf.hover, bufopts) | ||
vim.keymap.set("n", "gi", vim.lsp.buf.implementation, bufopts) | ||
vim.keymap.set("n", "<C-k>", vim.lsp.buf.signature_help, bufopts) | ||
vim.keymap.set("n", "<space>wa", vim.lsp.buf.add_workspace_folder, bufopts) | ||
vim.keymap.set("n", "<space>wr", vim.lsp.buf.remove_workspace_folder, bufopts) | ||
vim.keymap.set("n", "<space>wl", function() | ||
print(vim.inspect(vim.lsp.buf.list_workspace_folders())) | ||
end, bufopts) | ||
vim.keymap.set("n", "<space>D", vim.lsp.buf.type_definition, bufopts) | ||
vim.keymap.set("n", "<space>rn", vim.lsp.buf.rename, bufopts) | ||
vim.keymap.set("n", "<space>ca", vim.lsp.buf.code_action, bufopts) | ||
vim.keymap.set("n", "gr", vim.lsp.buf.references, bufopts) | ||
vim.keymap.set("n", "<space>f", function() | ||
vim.lsp.buf.format({ async = true }) | ||
end, bufopts) | ||
end | ||
|
||
local lsp_flags = { | ||
-- This is the default in Nvim 0.7+ | ||
debounce_text_changes = 150, | ||
} | ||
|
||
lspconfig.dockerls.setup({ | ||
on_attach = on_attach, | ||
flags = lsp_flags, | ||
}) | ||
|
||
lspconfig.hls.setup({ | ||
on_attach = on_attach, | ||
flags = lsp_flags, | ||
cmd = { "haskell-language-server-wrapper", "--lsp" }, | ||
filetypes = { "haskell", "lhaskell" }, | ||
|
||
-- Server specific settings... | ||
settings = { | ||
["haskell"] = { | ||
formattingProvider = "hfmt", | ||
}, | ||
}, | ||
}) | ||
|
||
lspconfig.pyright.setup({ | ||
on_attach = on_attach, | ||
flags = lsp_flags, | ||
}) | ||
|
||
lspconfig.rust_analyzer.setup({ | ||
on_attach = on_attach, | ||
flags = lsp_flags, | ||
-- Server-specific settings... | ||
settings = { | ||
["rust-analyzer"] = {}, | ||
}, | ||
}) | ||
|
||
lspconfig.tsserver.setup({ | ||
on_attach = on_attach, | ||
flags = lsp_flags, | ||
}) | ||
|
||
lspconfig.lua_ls.setup({ | ||
settings = { | ||
Lua = { | ||
runtime = { | ||
-- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim) | ||
version = "LuaJIT", | ||
}, | ||
diagnostics = { | ||
-- Get the language server to recognize the `vim` global | ||
globals = { "use", "vim" }, | ||
}, | ||
workspace = { | ||
-- Make the server aware of Neovim runtime files | ||
library = vim.api.nvim_get_runtime_file("", true), | ||
}, | ||
-- Do not send telemetry data containing a randomized but unique identifier | ||
telemetry = { | ||
enable = false, | ||
}, | ||
}, | ||
}, | ||
}) |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.