Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: minimal basic ide #17

Closed
wants to merge 30 commits into from
Closed

feat: minimal basic ide #17

wants to merge 30 commits into from

Conversation

0x736d
Copy link
Contributor

@0x736d 0x736d commented Oct 4, 2022

Tries to fix #1

features

  • Basic IDE setup with formatting, diagnostics and code action support for few common languages.
  • Better UI/UX for vim.ui.select and vim.ui.input using dressing.nvim with telescope backend.
  • Refactoring support through code actions using refactoring.nvim
  • Code actions for for git operations at the current cursor position i.e. stage/preview/reset hunk etc..

languages support added

Language servers for only c/c++, rust and go is manually configured.

  • C/C++
  • Typescript/Javascript
  • python
  • go
  • rust
  • bash
  • html
  • css
  • json
  • yaml
  • toml
  • dockerfile

additional plugins added

0x736d and others added 6 commits October 7, 2022 00:28
@kronikpillow
Copy link

kronikpillow commented Oct 27, 2022

this is actually a very good setup ... it's even better then the default one that comes with lvim, i'd definitely approve this as a template ...

only thing i'd add is lvim as a global to lsp, as lvim is marked as a undefined global in this setup

@0x736d
Copy link
Contributor Author

0x736d commented Oct 27, 2022

@kronikpillow should be fixed after the recent commit

@LostNeophyte
Copy link
Member

LostNeophyte commented Dec 5, 2022

hi, sorry for the silence, are you still willing to work on this?

@0x736d
Copy link
Contributor Author

0x736d commented Dec 6, 2022

@LostNeophyte yes on my spare time... but I was waiting on a review of some sort so I know if something needs changing in the existing PR.

@LostNeophyte
Copy link
Member

LostNeophyte commented Dec 6, 2022 via email

config.lua Outdated Show resolved Hide resolved
config.lua Outdated Show resolved Hide resolved
config.lua Outdated Show resolved Hide resolved
config.lua Outdated Show resolved Hide resolved
config.lua Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
guidelines.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Show resolved Hide resolved
- remove `on_init`, `on_attach`, `capabilities` since `lvim.lsp.manager` already resolves default values for them

- remove redundant builtin config value
@0x736d
Copy link
Contributor Author

0x736d commented Dec 6, 2022

@LostNeophyte I have added the suggested changes, also let me know if you want to add/remove any plugin.

Copy link
Member

@LostNeophyte LostNeophyte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, Thanks :)

@@ -2,8 +2,77 @@

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's move this file into .github/README.md

@@ -0,0 +1,5 @@
# Submission Guidelines
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

- [Keybinds](#additional-keybinds)
</details>

## Supported languages
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## Supported languages
## Available configurations

> formatting, diagnostics, completions should work out of the box for the languages
> below with the `LunarVim` configuration in this branch

- C/C++
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should probably link to the branch

Comment on lines +41 to +78
## Requirements

Most of the language servers installation should happen automatically, but there
is a few that are manually configured and may requires manual installation.

Install them with the command below

```
:MasonInstall clangd rust_analyzer gopls
```

Binaries needed for diagnostics and formatting requires manual installation.
You need to install them using the builtin `mason.nvim` or with your favorite package
manager.

use the command below to install them with mason

```
:MasonInstall eslint_d prettier yamllint taplo goimports golangci-lint shellcheck shfmt hadolint flake8 black
```

### Additional keybinds

> **Note**
> Leader is mapped to <kbd>Space</kbd>

| Mode | Key | Action |
| ------ | ------------------------------------------- | --------------------------------------------- |
| visual | <kbd>Leader</kbd>+<kbd>r</kbd>+<kbd>r</kbd> | Refactor selection |
| normal | <kbd>Leader</kbd>+<kbd>P</kbd> | Project menu |
| normal | <kbd>Leader</kbd>+<kbd>r</kbd>+<kbd>o</kbd> | Search and replace (open spectre panel) |
| normal | <kbd>Leader</kbd>+<kbd>r</kbd>+<kbd>f</kbd> | Search and replace (search current file) |
| normal | <kbd>Leader</kbd>+<kbd>r</kbd>+<kbd>c</kbd> | Search and replace (search word under cursor) |
| normal | <kbd>Leader</kbd>+<kbd>t</kbd>+<kbd>w</kbc> | Workspace diagnostics |
| normal | <kbd>Leader</kbd>+<kbd>t</kbd>+<kbd>d</kbc> | Document diagnostics |
| normal | <kbd>Leader</kbd>+<kbd>t</kbd>+<kbd>t</kbc> | LSP Type definitions |
| normal | <kbd>Leader</kbd>+<kbd>t</kbd>+<kbd>r</kbc> | LSP references |
| normal | <kbd>Leader</kbd>+<kbd>t</kbd>+<kbd>q</kbc> | Quickfix |
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please link to the docs site instead to avoid information decay

@@ -0,0 +1,251 @@
lvim.format_on_save = true
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't need this file as it overlaps with purpose with the branches and config.example.lua, it would also be yet another piece of documentation that require maintenance.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kylo252 So no config.lua in master branch and have links in README.md for branches with their respective lang/ide configuration... 😕 ( I think the original idea was to have examples configuration for few common languages and plugins etc.. )

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To clarify, I'm talking about linking to this file instead: https://github.com/LunarVim/LunarVim/blob/d3ade21d85084634517848a7fd3582bbf2d6c278/utils/installer/config.example.lua

We should ideally have a single "common" example config.lua, that's always kept up to date with any changes/recommendations. We can always update that file, if you have any concrete ideas, see LunarVim/LunarVim#3519.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the late response... I've added all the changes to #56 since after removing config.lua from this PR it wouldn't be addressing #1 anymore.

@0x736d
Copy link
Contributor Author

0x736d commented Dec 15, 2022

closing in favor of #56

@0x736d 0x736d closed this Dec 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Hacktoberfest] Good basic IDE setup for the master branch
6 participants