PHPStorm의 한글 Typo 검사로 밑줄그어짐

알파벳 단어의 스펠링 검사는 너무나 유용하지만 한글 리터럴의 밑줄이 그어진 것은 여간 보기 불편한 것이 아니다. 그래서 따로 한글에서만 제외하는 방법은 구글링하다가 포기했고, literal 및 comment에서만 Typo 검사를 제외하기로 했다.

 

Preferences > Inspections > Proofreading > Type

https://blog.jetbrains.com/phpstorm/2021/07/phpstorm-2021-2-release/#refactoring_opportunities

 

PhpStorm 2021.2: Generics, Enums, Array Shapes, Inspections, Refactorings, and More | The PhpStorm Blog

PhpStorm 2021.2 is now available! This major release introduces preliminary support for generics in PHP, enums for PHP 8.1, one-line array shapes, improved automatic formatting of PHP code, new ins

blog.jetbrains.com

This group includes inspections that can help you find good candidates for refactoring. They are disabled by default, but even in this disabled state, you’ll see an additional gutter icon 

 near code detected by these inspections (instead of having it underlined in the editor). Clicking the gutter icon will invoke the suggested refactoring.

Let’s take a look at three of them in action and see how you can combine them with PhpStorm refactorings.

ProjectTree Color Highlighter

 

디렉토리별 색상을 지정할 수 있어 프레임워크에서 개발할 때 유용하네 👍

https://www.figma.com/file/6MzpCEXKjsp34dhdFxBD2x/WWDC-2022-Wallpaper?node-id=0%3A1 

 

Figma

Created with Figma

www.figma.com

WWDC2022 메인 배너 이미지가 너무 마음에 들어 배경화면으로 설정하고 싶었으나 해상도가 안맞아 위, 아래만 조금 수정했다. 개인용도로 사용해도 괜찮겠지..!?

문자 뷰어

 

가끔 포스팅을할 때 맥의 심볼들을 찾아 입력해야 하는데 구글링하는게 여간 귀찮은게 아니였다. 맥에서 특수문자나 이모지를 입력할 때 자주 사용하는 입력기를 띄우고(Control + Command + Space) 아래 리스트를 검색 입력란에 찾아 즐겨찾기로 등록해준다.

 

심볼 (지칭어) 유니코드
⌘ (Command) U+2318
⌥ (Option) U+2325
⇧ (Shift) U+21E7
⌃ (Control) U+2303
U+2193
U+2191
U+2192
U+2190

 

Rider UI Theme Pack
Rider UI Theme Pack
Gradianto Theme
Gradianto
Visual Assist Dark Theme
Visual Assist Dark Theme

최근에 다시 테마에 변경 고질병이 재발해서 테마와 폰트를 이것 저것 적용해가며 새로운 환경을 만들었다.

나 이제 더 이상 테마 변경과 폰트 변경으로 내 시간을 소비하지 않으리..

적용 테마 및 폰트

  • 폰트
    • D2Coding Ligature
      • Size 14.7 / Line Height 1.3
  • 테마
    • Preferences > Plugins > Rider UI Theme Pack
      • Rider Melon Dark
    • Gradianto Nature Green
    • Visual Assist Dark

기타 Keymap 설정

File Structure

Command 단축키 지정 비고
File Structure ⌘⇧P 현재 클래스 파일의 파일 구조(Method 등) 리스트업 해준다.
Find Usage ⌥ + Click 클래스나 메소드드가 사용되는 위치를 찾아준다.
Split Right ⌘⌥⌃→ 현재 보고있는 파일을 우측 Split 파일로 만들어준다.
Next Difference ⌘⇧↓ Version Control System
Previous Difference ⌘⇧↑ Version Control System

 

와이파이 및 랜 케이들 동시 활성화

 

맥에서 와이파이와 랜 케이블이 동시에 활성화돼 있으면 어느쪽 통신을 타게될까?

당연히 물리적 LAN 케이블로 통신을 할 것이지만, 정말로 궁금해서 그냥 간단하게 기록해본다.

 

내가 거주하고 있는 오피스텔의 인터넷은 주식회사 딜라이브 인터넷이 기본적으로 점유하고있다. 기본적으로 속도는 100M 안으로 찍히지만 대역폭이 너무 작은 것이 체감될 정도다. Apple 서버와의 통신은 QoS가 걸려있는게 당연할 정도로 느껴진다. 인터넷을 통한 맥을 포맷할 때면 항상 타임아웃으로 실패한다.

 

각설하고. 아래는 물리적 랜 케이블을 제거하고 와이파이를 통한 인터넷 속도 체크.

 

와이파이 속도

 

바로 다시 아래는 와이파이 활성화 및 인터넷 LAN 케이블을 꽂고 다시 속도 측정.

 

LAN 케이블 속도

 

역시 자연스럽게 더 빠른 LAN 케이블로 통신을 하고있다. 👍

Goals

라라벨 프레임워크로 개발된 애플리케이션을 Github Action을 통해 CI(Continuous Integration) 수행. Docker Hub 저장소에 Push 해보기.

Dev Environments

도커(Docker)와 상호작용을 하기위해 라라벨에서 기본으로 제공하는 Sail 명령어를 사용한다. 아래 이미지는 $ sail artisan about 을 실행하여 현재 내 개발환경에 대한 상태를 출력하였다. 버전만 참고하길 바란다.

  • Laravel 9.27.0
  • PHP Version 8.1.9
  • Composer Version 2.4.1

sail artisan about

Docker 파일 구성하기

Sail의 기본 목적이 Docker를 구성하고 상호작용을 도와주는 도구로써 다음의 명령어를 통해 기본적인 Docker 파일을 도출할 수 있다.

$ sail php artisan sail:publish

현재 컨텍스트에서 ./docker/[version]/Docker 파일들이 생길 것이다. 하지만 해당 파일을 바로 사용하게되면 다음과 같은 에러가 발생한다.

groupadd: invalid group ID 'sail'

./docker/8.1/Docker 파일을 열어 아래와 같이 수정하고 시작하자.

ARG WWWGROUP=1000

docker-compose.yml 파일에는 도출된 Docker 파일을 바라볼 수 있게 다음과 같이 변경될 것이다.

# For more information: https://laravel.com/docs/sail  
version: '3'  
services:  
    laravel.test:  
        build:  
            context: ./docker/8.1  
            dockerfile: Dockerfile  
...

Github, workflows 구성하기

main 브랜치에 push된 순간 build 되도록 ./.github/workflows/docker.yml 파일을 생성하고 아래와 같이 내용을 구성한다.

name: CI  

on:  
  push:  
    branches:  
      - main  

jobs:  
  build:  
    runs-on: ubuntu-latest  
    steps:  
      -  
        name: Checkout Github Action  
        uses: actions/checkout@v2  
      -  
        name: Login to DockerHub  
        uses: docker/login-action@v1  
        with:  
          username: ${{ secrets.DOCKER\_HUB\_USERNAME }}  
          password: ${{ secrets.DOCKER\_HUB\_ACCESS\_TOKEN }}  
      -  
        name: Build and Push  
        uses: docker/build-push-action@v2  
        with:  
          context: ./docker/8.1/  
          push: true  
          tags: ${{ secrets.DOCKER\_HUB\_USERNAME }}/thesolo:latest

${{ secrets.* }} 비밀키 관련하여 Github 저장소의 Setting에서 설정가능하다.

로컬 이미지 빌드

Docker 파일의 내용이 일부 변경 되었으므로 로컬 개발환경에서 동일한 개발 환경을 맞추기 위해 이미지를 새로 빌드하고 다시 시작해보자.

$ sail build --no-cache

$ sail up

참고

+ Recent posts