Skip to content

Commit

Permalink
replace d2lang support with markdown and mermaid stuff, remove perl
Browse files Browse the repository at this point in the history
  • Loading branch information
Szwendacz99 authored and Maciej Lebiest committed Aug 3, 2023
1 parent b8ecf5f commit 3958be3
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 8 deletions.
9 changes: 2 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ ENV PYTHON_DEVEL_PKGS="\
python3\
conda"

ENV PERL_DEVEL_PKGS="perl-App-cpanminus"

ENV MASON_PKGS=" \
bash-language-server \
css-lsp \
Expand All @@ -39,7 +37,6 @@ ENV MASON_PKGS=" \
lemminx \
lua-language-server \
marksman \
perlnavigator \
phpcs \
phpstan \
pyright \
Expand All @@ -56,11 +53,9 @@ ENV PIP_PKGS="pynvim ansible ansible-lint"
COPY . /root/.config/nvim
# install system dependencies
RUN dnf install -y \
${GENERAL_PKGS} ${NEOVIM_PKGS} ${PYTHON_DEVEL_PKGS} ${PERL_DEVEL_PKGS} \
${GENERAL_PKGS} ${NEOVIM_PKGS} ${PYTHON_DEVEL_PKGS} \
&& dnf clean all && \
cpanm PLS && \
pip install ${PIP_PKGS} && \
curl -fsSL https://d2lang.com/install.sh | sh -s --
pip install ${PIP_PKGS}

RUN rm /root/.config/nvim/lazy-lock.json || true
# install lsp and linters using mason
Expand Down
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,24 @@ This container will not be removed on exit, you can reenter later with:
podman start -ai {project/container name}
```

## Additional packages to install as needed

### Perl lang

For Perl language support run this command to install required packages for
lsp server:

```bash
dnf install -y perl-App-cpanminus;
cpanm PLS;
```

And then in neovim:

```bash
:MasonInstall perlnavigator
```

## Inside vim

```vim
Expand Down Expand Up @@ -240,6 +258,14 @@ All that is saved in image, so that is why image is so heavy.
|Ctrl+v | Open selection as a vsplit|
|Ctrl+t | Open selection in new tab |

#### Markdown Preview

Mardkown Preview plugin commands:

```bash
:MarkdownPreview*
```

#### Git stuff

|keys|action|
Expand Down
6 changes: 6 additions & 0 deletions lua/general.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ local function map(mode, lhs, rhs, opts)
vim.api.nvim_set_keymap(mode, lhs, rhs, options)
end

--mardown preview settings
vim.cmd [[
let g:mkdp_echo_preview_url = 1
]]


----------------------
-- general setup start
----------------------
Expand Down
6 changes: 5 additions & 1 deletion lua/lazy-load.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
require("lazy").setup({
{ 'terrastruct/d2-vim' },
{
'iamcco/markdown-preview.nvim',
build = function() vim.fn["mkdp#util#install"]() end
},
{ 'mracos/mermaid.vim' },
-- Nvim-tree stuff
{ 'nvim-tree/nvim-web-devicons' }, -- optional, for file icons
{
Expand Down

0 comments on commit 3958be3

Please sign in to comment.